Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Question from Andres on May 23 at 11:42 AM Hi, gurus. I have a problem with my ABAP code. My program take the payrolls and chage is for random quantities. DATA: ltd_rgdir TYPE STANDARD TABLE OF pc261, ltd_payroll TYPE pay99_result, ls_temp_wrbtr TYPE wrbtr_bi, ltd_rt TYPE STANDARD TABLE OF pc207, ls_molga TYPE molga, ltd_object_list TYPE STANDARD TABLE OF hrpystruc, ls_relid TYPE pcl2-relid."relid_pcl. FIELD-SYMBOLS: <fs_rgdir> TYPE pc261, <fs_rt> TYPE pc207. CALL FUNCTION 'CU_READ_RGDIR' EXPORTING persnr = pernr-pernr TABLES in_rgdir = ltd_rgdir EXCEPTIONS no_record_found = 1 OTHERS = 2. CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR' EXPORTING employee = pernr-pernr IMPORTING relid = ls_relid molga = ls_molga * EXCEPTIONS * ERROR_READING_INFOTYPE_0001 = 1 * ERROR_READING_MOLGA = 2 * ERROR_READING_RELID = 3 * OTHERS = 4 . LOOP AT ltd_rgdir ASSIGNING <fs_rgdir>. CLEAR:ltd_payroll,ltd_rt[]. CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT' EXPORTING clusterid = ls_relid "'IN' employeenumber = pernr-pernr sequencenumber = <fs_rgdir>-seqnr read_only_international = 'X' CHANGING payroll_result = ltd_payroll EXCEPTIONS illegal_isocode_or_clusterid = 1 error_generating_import = 2 import_mismatch_error = 3 subpool_dir_full = 4 no_read_authority = 5 no_record_found = 6 versions_do_not_match = 7 error_reading_archive = 8 error_reading_relid = 9 OTHERS = 10. ltd_rt[] = ltd_payroll-inter-rt[]. LOOP AT ltd_rt ASSIGNING <fs_rt>. CALL FUNCTION 'RANDOM_AMOUNT' EXPORTING rnd_min = '100' rnd_max = '3000' valcurr = 'PEN' IMPORTING rnd_amount = ls_temp_wrbtr. REPLACE ALL OCCURRENCES OF ',' IN ls_temp_wrbtr WITH ''. CONDENSE ls_temp_wrbtr. IF <fs_rt>-betrg > 0. <fs_rt>-betrg = ls_temp_wrbtr. ENDIF. ENDLOOP. ltd_payroll-inter-rt[] = ltd_rt[]. CALL FUNCTION 'PYXX_RESOLVE_PERSON_STRUCTURE' EXPORTING molga = ls_molga get_internat_struct = 'X' TABLES object_list = ltd_object_list * EXCEPTIONS * DDICTYPE_DOES_NOT_EXIST = 1 * OTHERS = 2 . CALL FUNCTION 'PYXX_WRITE_PAYROLL_RESULT' EXPORTING clusterid = ls_relid employeenumber = pernr-pernr sequencenumber = <fs_rgdir>-seqnr payroll_result = ltd_payroll * client = sy-mandt EXCEPTIONS illegal_isocode_or_clusterid = 1 error_generating_export = 2 export_error = 3 subpool_dir_full = 4 no_update_authority = 5 incomplete_result_imported = 6 OTHERS = 7. IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. CALL FUNCTION 'HR_FLUSH_BUFFER_UPDATE_PCLX' * EXPORTING * TEST = * CLIENT = EXCEPTIONS insert_error = 1 no_update_authority = 2 OTHERS = 3 . IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ENDLOOP. ******************************************* I know the table ltd_payroll does not contain all the information needed to update payroll but what information I need to update successfully | Reply to this email to post your response. __.____._ | _.____.__ |