2010 Jan 21 3:05 PM
We have concurrent employment.
We have a new hired employee who stared on 01/04/2010 and has been assigned a main personnel assignmentPERNR( on joining date and the same employee has a different future additional assignment (NEW PERNR)of 01/22/2010. This has been maintained correctly in IT0000.
Now, in one of the reports, we have the below logic:
GET peras.
*----
>Get data for POSITION File
*----
>Get the current 0712 record
rp_provide_from_frst p0712 space pn-begda pn-endda.
IF pnp-sw-found EQ 1.
MOVE p0712-main_pernr TO t_seamsposition-personind.
IF p0712-pernr EQ p0712-main_pernr.
t_seamsposition-flag = '1'.
ELSE.
t_seamsposition-flag = '0'.
ENDIF.
ENDIF.
The program writes a record for each assignment an employee has. It uses u201CFuture as of todayu201D. pn-bega is today and pn-endda is 99991231. It tries to set an indicator on the record to tell if that record is the main assignment. In last nightu2019s run, both records had the flag set to 1.
Any clues please.
We have concurrent employment.
We have a new hired employee who stared on 01/04/2010 and has been assigned a main personnel assignmentPERNR( on joining date and the same employee has a different future additional assignment (NEW PERNR)of 01/22/2010. This has been maintained correctly in IT0000.
Now, in one of the reports, we have the below logic:
GET peras.
*----
>Get data for POSITION File
*----
>Get the current 0712 record
rp_provide_from_frst p0712 space pn-begda pn-endda.
IF pnp-sw-found EQ 1.
MOVE p0712-main_pernr TO t_seamsposition-personind.
IF p0712-pernr EQ p0712-main_pernr.
t_seamsposition-flag = '1'.
ELSE.
t_seamsposition-flag = '0'.
ENDIF.
ENDIF.
The program writes a record for each assignment an employee has. It uses u201CFuture as of todayu201D. pn-bega is today and pn-endda is 99991231. It tries to set an indicator on the record to tell if that record is the main assignment. In last nightu2019s run, both records had the flag set to 1.
Any clues please.
2010 Jan 21 4:15 PM
Hi, Kiran
Your problem is not very clear, i am not sure but you can check after the following change.
Replace this line
rp_provide_from_frst p0712 space pn-begda pn-endda.
With this one
rp_provide_from_last p0712 space pn-begda pn-endda.
Best Regards,
Faisal
2010 Jan 21 6:55 PM
Check if infotype PA0712 has any subtypes defined.
if so you need to give subtype as well while using the macro.
also in order to get the latest value use <last> instead of frst in the macro
rp_provide_from_last p0712 <subtype> pn-begda pn-endda.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |