‎2011 Feb 15 10:31 PM
Hi experts I need your help, I have a problem and I can't resolve.
In my job I need to move the payroll from a country (BR) to another country (MX), Each country is in different client.
To download the data from BR, I used the fm HCRM_PAYROLL_RESULTS_GET and return me all the sequences
and all tables asociates to employee (RT, CRT, etc). I work with Logical Database PNP.
for update the payroll in MX (with data of BR) I used some fm, for example I used the fm CU_READ_RGDIR to validate if exist
the sequences of the employee. (The employee exist in all tables of PA in MX) But the fm CU_READ_RGDIR always return me the table RGDIR empty.
The question is, If exist some function or some way to upload the data to RGDIR from a client to another client?
‎2011 Feb 16 9:17 AM
Don't know it sounds strange to upload payroll of one country to other, as generally payroll is country dependant. And there are many country dependant cluster. But may be you can try the FM CU_WRITE_RGDIR_NEW. Also you can user macros available, which can be checked from table TRMAC. They generally follow the naming convention, RP-EXP-, next two will identify the country and specific cluster you are trying to upload.
Regards
Ranganath
‎2011 Feb 16 4:29 PM
Thanks for your answer Ranganath, but I used the FM CU_WRITE_RGDIR_NEW and return me nothing. For example, this is my code:
I read the table RGDIR to see if there are sequences used
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = p_pernr
TABLES
in_rgdir = rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
IF sy-subrc NE 0. "The employee not have sequences.
CALL FUNCTION 'CU_WRITE_RGDIR_NEW'
EXPORTING
persnr = p_pernr
molga = p_molga
TABLES
rgdir = rgdir
EXCEPTIONS
NO_UPDATE_AUTHORITY = 1
OTHERS = 2.
IF sy-subrc <> 0. "Always is TRUE, becouse RGDIR is empty.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
ENDIF.
Where:
p_pernr is the of the employee ( in this case employee exist in the tables PA's, but not have sequences).
p_molga is the molga of the country to import.
What's wrong?