2010 Jan 15 3:10 PM
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
2010 Jan 15 3:36 PM
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.
2010 Jan 15 6:37 PM
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.
2010 Jan 18 7:32 AM
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.
2010 Jan 18 7:47 AM
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,
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |