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

Modify payroll result from ABAP

Former Member
0 Likes
943

How can I modify the some fields of payroll result from a ABAP program ???

I need modify some fields from rgdir. For example "juper" field"

Thanks

How can I modify the some fields of payroll result from a ABAP program ???

I need modify some fields from rgdir. For example "juper" field"

Thanks

4 REPLIES 4
Read only

former_member226519
Active Contributor
0 Likes
810

there are macros to import and export clusters:

rp-imp-c2-cd.

$errcode = rp-imp-cd-subrc.

rp-exp-c2-cd.

$errcode = rp-imp-cd-subrc.

Read only

0 Likes
810

Thanks

Could you give me more information, please ????

I try this, but it doesn't work:

cd-key-pernr = 2616.

rp-imp-c2-cd.

IF rp-imp-cd-subrc EQ 0.

READ TABLE RGDIR WITH KEY seqnr = '00072'.

rgdir-juper = 'XXX'.

modify rgdir from rgdir.

rp-exp-c2-cd.

endif.

Read only

0 Likes
810

you will have to include some definitions:

RPC2RDD0 (this is for Germany, find out your country definition)

RPC2CD00

RPUPC200

rp-init-buffer.

cd-key = YOUR-pernr.

*--- read directory

perform import_directory_national using errcode.

if errcode ne 0.

perform write_error using 'CD1'.

continue.

endif.

*

sort rgdir by fpper descending.

*

loop at rgdir where fpbeg >= YOUR-begda

and fpbeg <= YOUR-endda.

rx-key-pernr = YOUR-pernr.

rx-key-seqno = rgdir-seqnr.

*--- Import of the PCL2-record

perform import_cluster_national using errcode.

if errcode ne 0.

perform write_error using 'RD1'.

continue.

endif.

*--- Transformation of the data

z_rd = z_rd + 1.

loop at wpbp.

break-point.

endloop.

*--- Export of the transformed data

if p_test = no.

rd-version = ord-version.

  • rd-version-uname = sy-uname.

  • rd-version-pgmid = sy-repid.

  • rd-version-datum = sy-datum.

  • rd-version-uzeit = sy-uzeit.

perform export_cluster_national using errcode.

if errcode ne 0.

perform write_error using 'RD3'.

else.

perform prepare_update using 'V'.

if rx-key-pernr ne rxpernr_alt.

commit work and wait.

endif.

endif.

rxpernr_alt = rx-key-pernr.

endif.

endloop.

pernr_alt = keytab-pernr.

----


  • FORM IMPORT_DIRECTORY_NATIONAL *

----


form import_directory_national using $errcode.

rp-imp-c2-cd.

$errcode = rp-imp-cd-subrc.

endform.

----


  • FORM IMPORT_CLUSTER_NATIONAL *

----


form import_cluster_national using $errcode.

rp-imp-c2-rd.

if rp-imp-rd-subrc ne 0.

perform write_error using 'RD1'.

add 1 to nreject.

else.

if ord-version-number ne rd-version-number.

perform write_error using 'RD2'.

add 1 to nreject.

rp-imp-rd-subrc = 4.

endif.

endif.

$errcode = rp-imp-rd-subrc.

endform.

----


  • FORM EXPORT_CLUSTER_NATIONAL *

----


form export_cluster_national using $errcode.

rp-exp-c2-rd.

$errcode = rp-imp-rd-subrc.

endform.

Read only

former_member194416
Contributor
0 Likes
810

Hi,

You need to copy payroll macro(and includes) to a new include and you can make your changes in this new macro & include.

Regards,