2008 Jul 02 2:00 PM
Hi all,
inside a table ( TCJ04 ) there's a list of people. I would read the table PA0002 (HR infotype 2 ) and make an update on table TCJ04.
In other words, for exemple if a people leave a company, in the module PA0002 the system delete your name, and i would make an automatic deletion of this name also in the TCJ04 table.
The same if the company hire a people ( add name in PA0002 and automatic add in the TCJ04 ).
How I can make it ?? Some idea ?? With Dynamic Actions ??
Tks a lot !
2008 Jul 03 10:34 AM
I would suggest that you look at sap enhancement PBAS001 especially EXIT_SAPFP50M_002. This PAI . Your logic in ZXPADU02 would be something like this.
I would also suggest that you drive this user exit of IT0000 as this holds the status of an employee.
when '0000'.
MOVE innnn TO i0000.
call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
exporting
prelp = innnn
importing
pnnnn = i0000.
If i0000-stat2 = 0.
delete from entry frim table.
else.
check to see if they are a new starter.
endif.
call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
exporting
pnnnn = i0006
importing
prelp = innnn.
Hopefully this helps.
J
2008 Jul 03 10:34 AM
I would suggest that you look at sap enhancement PBAS001 especially EXIT_SAPFP50M_002. This PAI . Your logic in ZXPADU02 would be something like this.
I would also suggest that you drive this user exit of IT0000 as this holds the status of an employee.
when '0000'.
MOVE innnn TO i0000.
call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
exporting
prelp = innnn
importing
pnnnn = i0000.
If i0000-stat2 = 0.
delete from entry frim table.
else.
check to see if they are a new starter.
endif.
call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
exporting
pnnnn = i0006
importing
prelp = innnn.
Hopefully this helps.
J