Google Search - Blog...........

Handling User Exits In HR ABAP



There are two main user exits for HR module, namely ZXPADU01 and ZXPADU02. The first one is for the PAI( putting the default values) and the second is for the PBO( after an event like enter or save) in the transaction. There are the exits for the transactions PA20,30,40 and PB20,30,40.

Please find the below code to work on.

case: innnn-infty.

when '0014'.

call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = i0014.

select * from pa0008
into corresponding fields of table it_pa0008
where pernr = i0014-pernr.

if sy-subrc = 0.
read table it_pa0008 index 1.

move it_pa0008 to lfs_0008.

do 40 times varying wagetypes-lga from lfs_0008-lga01 next lfs_0008-lga02
varying wagetypes-bet from lfs_0008-bet01 next lfs_0008-bet02.

check wagetypes-lga is not initial.

case wagetypes-lga.
when '1000'.
v_basic = wagetypes-bet.
endcase.

enddo.

endif.

v_hra = v_basic * 25 / 100.

v_final_amt = v_basic + v_hra.

if i0014-lgart = '2000'.

i0014-betrg = v_final_amt * ( 9 / 100 ). .
i0014-waers = 'SAR'.

elseif i0014-lgart = '2010'.

i0014-betrg = v_final_amt * ( 11 / 100 ).
i0014-waers = 'SAR'.

if i0014-betrg le 0.
i0014-betrg = i0014-betrg .
endif.

elseif i0014-lgart = '2020'.

i0014-betrg = v_final_amt * ( 2 / 100 ).

if i0014-betrg gt '900'.
i0014-betrg = '900'.
endif.

i0014-waers = 'SAR'.

if i0014-betrg le 0.
i0014-betrg = i0014-betrg.
endif.

endif.

call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = i0014
IMPORTING
prelp = innnn.

if sy-ucomm = ''.
show_data_again = 'X'.
else.
show_data_again = ''.
endif.


Here the show data again is required to display the contents after the event like enter or save or some other. if there is no manupulation of data, there is no use of show_data_again .




ALSO READ:

- Termination Workbench Report In HR ABAP.

- Service Calculation Report In HR ABAP.

- Use Of BAPI HR_MAINTAIN_MASTERDATA For Updating HR DATA.

- Upload The Over Time Report In HR ABAP.

- Displaying Off-Cycle Report In HR ABAP.

.....Back To Sub-Index On HR ABAP.

.....Back To MAIN INDEX.


No comments:

Post a Comment