Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update table with HR-module table PA0002

Former Member
0 Likes
699

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 !

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
564

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

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 !

1 REPLY 1
Read only

Former Member
0 Likes
565

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