cancel
Showing results for 
Search instead for 
Did you mean: 

Effective Date for Time Evaluation without overwriting HRS

erp_superman
Explorer
0 Kudos

Hi SAP expert.

I am new to HR Schemas though I am familiar with Z8+ and IBM ALC, and this chip don't seem to have any registers.

I created a variable ZDESC in V_T511K and am setting the value to 0 before the effective date and 1 after the effective date.

I created a PE02-> type T (time evaluation) Rule named ZDSC which returns T after the effective date, F otherwise.

* ****     HRS=CZDESC 

* ****     HRS?0

* **** *  SCOND = T IF

* **** =  SCOND=F IF

I updated my PE01 time keeping schema &W30 to call the rule as follows:

"

" complex stuff before

"

IF ZDSC

"

" new time keeping logic

"

ELSE

"

"  old time keeping logic

"

ENDIF

"

" complex stuff after

"

Now my concern is that I am now overwriting HRS by setting it to ZDESC.  I do not wish to overwrite HRS.  Is there a way to do the following, or is there a better way to accomplish this?   I do not wish to have to determine whether or not HRS is in use by something else.

* ****     TEMP=HRS         " Imagined code

* ****     HRS=CZDESC 

* ****     HRS?0

* **** *  SCOND = T IF

* **** =  SCOND=F IF

* ****     HRS=TEMP        "Imagined code

Thanks,

Martin

Accepted Solutions (0)

Answers (1)

Answers (1)

seg_hr_it
Active Contributor
0 Kudos

Hi Martin,

I am not quite clear why you are worry to keep value in HRS as HRS is just to temporarily keep value from time types, constants, etc. HRS itself is nothing => so actually you don't need to keep it at all

Assuming the HRS before your new PCR as

HRS=DZABC (ZABC is a time type) then your PCR

* ****     HRS=CZDESC 

* ****     HRS?0

* **** *  SCOND = T IF

* **** =  SCOND=F IF

=> now you want to get value before your PCR, just call HRS=DZABC again

FYI if you want to store value temporarily without creating new time type to hold it, you can use operation ADDVS and get it via HRS=Kxxxx.

Hope it helps and get rid of your worry

Best Regards,

Woody (Trong Minh)

erp_superman
Explorer
0 Kudos

Woody, To reiterate: "Complex stuff before" may be setting HRS temporarily to a value for use by "complex stuff after". My code overwrites HRS which could be very bad.

When I tried to put HRS=Kxxxx after the second SCOND, the SE02 editor gave me fits, I don't think it likes things in a rule after a conditional on the same level.

This is what I wanted, but was unable to acheive.

* **** ADDVSxxxx

* ****     HRS=CZDESC 

* ****     HRS?0

* **** *  SCOND = T IF

* **** =  SCOND=F IF

* ****  HRS=Kxxxx

As an alternative to the above, I may be able to do this:

0. Define xxxx somewhere. Is this necessary or automatic?  If necessary, where is it declared/defined?

1.   PE02 - Define rule:  ZPUT

* **** ADDVSxxxx

2.  PE02 - Define rule: ZGET

* **** HRS=Kxxxx 

3. PE01 - Update Schema = save and restore HRS field.

"

" complex stuff before that might set HRS

"

ACTIO ZPUT                                      

IF ZDSC

ACTIO ZGET

"

" new time keeping logic, might use HRS

"

ELSE

ACTIO ZGET

"

" old time keeping logic, might use  HRS

"

ENDIF

"

" complex stuff after that might use HRS

"

jagan_gunja
Active Contributor
0 Kudos

Hrs from HRS is available in a PCR which has HRS=S, etc.  Then manipulate HR as you need and store in a t/t or in a variable.  It does not remain the same after a PCR is completed or changed in the same PCR after storing in a t/t or var..

To get this stored hrs, you need to have HRS op'n again in

(a)the same PCR above, if HRS have been changed after storing in t/t or var or

(b)in another PCR later after storing.

For checking eff date and processing as per old/ new business rules, use lines as per sample below assuming pcr ZSTO gets hrs from current DWS or wherever you need, manipulates it and stores in a var or t/t, which is available for use later by op'n

(i)HRS=Kxxxx on the current day or

(ii)HRS=Dxxxx for current day t/t value or by HRS=Lxxxx for prev day's t/t val.

     PIT ZSTO GEN                 

     IF ZDSC

     PIT yyyy GEN

     ....

     ....

     ELSE

     PIT xxxx GEN

     ....

     ENDIF

erp_superman
Explorer
0 Kudos

This message was moderated.

jagan_gunja
Active Contributor
0 Kudos

Many of the acronyms or abbreviations are standard among SAP HR functional consultants.   Same with any part of any response.

It is expected that people who post functional issues here, or respond, have some reasonable or at least basic knowledge in SAP HR configuration.

All the responses in this thread are basic for a functional consultant; hi-tech or complex stuff is way beyond this.

Before posting an issue, people are expected to search with a wild card of the issue in Google or in SCN.  Only if they can not find any reasonable close hits, they'd be expected to post here.

Refer to conditions of SCN use by navigating to 'Getting Started' at the top of the SCN screen, or see link below

Most importantly, as a standard courtesy, please spell a person's name properly!

Any way for your info, see below

t/t means time type configured in V_T555A.

op'n means operation.

txn means transaction.

par means parameter

PCR means personnel calculation rule created in PE02 txn; it is executable from most schema functions.

In PE04 txn when you enter a function name and press the I or info icon or in a schema line scroll to the function column and press help key or F1 key, you get to know the format of use for the function, par's to be used and effect, etc.  Similar help is available for an op'n.

DWS means Daily Work Schedule.  For a functional consultant this knowledge is expected.

HRS=Cxxxxx (my typing error - HRS with first position K with 4x's instead of C with 5x's) means the HRS field is assigned the value as of the time eval date from the constant xxxxx  in V_T511K.

Configure a constant xxxxx - with a suiotable text showing the purpose of the constant; e.g.,

ZCHG1  01.01.1900  31.12.9999  Change 1 effective date      0.00

Select this row. Delimit it to the effective date of this change; e.g., 01.07.2016 and change the value to say 1.00 (higher than previous period value).  This results in 2 rows as below

ZCHG1  01.01.1900  31.12.9999  Change 1 effective date      0.00

ZCHG1  01.07.2016  31.12.9999  Change 1 effective date      1.00

HRS=S gives the DWS hrs for the day based on the employee's work schedule rule in IT 7 and with any IT 2003 entered & valid for that date.

HRS=Dyyyy means the hrs already available at the execution of this op'n

PIT xxxx GEN

means xxxx is the PCR called by the schema function.

IF ZDSC        will execute the PCR ZDSC which returns the value of the flag as TRUE or FALSE; then for TRUE value, the schema executes the next schema lines till ELSE or ENDIF.

ELSE           results in executing the next schema lines till ENDIF or ELSEIF

ENDIF          is the schema function to end the IF loop.

Hope your understanding improves somewhat.

On this thread, I have spent a good amount of my time and do not intend to waste any further.  Sorry being blunt.