Skip to Content
0
Former Member
Feb 09, 2006 at 10:08 PM

HR Macros

308 Views

When ever i use the follwing macros get more than one record.. what can be the possible cause ?

<b>rp_provide_from_last</b>

<b>rp-provide-from-frst</b>

In principle it should return me one record per infotype but i am getting more than one.. sometime it gives mw whole of the table for that employee record which i am processing..

I am using the PNP LDB.

I don't know whats going wrong.. Any help would be appriciated...

Here is the Code

  • start of selection

START-OF-SELECTION.

GET pernr.

  • Selecting the infotype record

rp_provide_from_last p0000 space sy-datum sy-datum.

  • Active

  • check if they are active today

IF p0000-stat2 = '3'.

  • if yes

lv_begin = '18000101'.

lv_process = 'X'.

  • append to table

ELSE.

CALL FUNCTION 'RP_HIRE_FIRE'

EXPORTING

beg = '18000101'

end = '99991231'

IMPORTING

fire_date = lv_termdate

hire_date = lv_hiredate

TABLES

pp0000 = p0000.

IF lv_termdate => '20050701'.

lv_begin = '20050701'.

lv_process = 'X'.

ENDIF.

ENDIF.

CHECK lv_process = 'X'.

rp-provide-from-frst p0000 space lv_begin '99991231'.

rp-provide-from-frst p0001 space lv_begin '99991231'.

rp-provide-from-frst p0002 space lv_begin '99991231'.

MOVE-CORRESPONDING p0000 TO wa_0000.

MOVE-CORRESPONDING p0001 TO wa_0001.

MOVE-CORRESPONDING p0002 TO wa_0002.

APPEND wa_0000 TO it_employee.

END-OF-SELECTION.

<b></b>