on 03-21-2014 5:44 PM
Hi,
This is an existing issue in the system but recently users found that Payment date is not populating for some employees in the report.
Custom data source which is built on Info type (HR Info type) is enhanced with new field "Payment date" and written the logic in CMOD to populate the data for new field by reading the Payroll cluster tables. If I run the Info package with update mode as full Payment date is not populating for some employees and if I load data for specific employee or small set of employees (1 to 4000) with selections, Payment date is populating. I have performed the below actions to trouble shoot this issue but not yet found the root cause of the issue.
1) Debugged the enhancement ABAP code myself and with ABAP expert. As per the logic it is working fine and payment date is populating during runtime.
2) Reduced the data package size gradually from 20000KB to 1000K.
3) Provided SAP_ALL authorizations to system users ALEREMOTE (ECC) and BWREMOTE (BW). We performed the trace on these users with the help of security team and didn't find any authrization issue.
Can someone please suggest any other way?
Thanks,
Prasad
Hi,
I have tested the extractor in RSA3 in ECC with different data package size and found that Payment date is populating when I changed the default data packet size.
1) When I execute the extractor with data packet size 100, and pernr selection from 29900 to 30000, Payment date is not populating for Pernr 29972.
2) When I execute the extractor with data packet size 1000 and pernr selction from 29900 to 30000, Payment date is populating for pernr 29972.
The customer exit behaves differently whether the transferred data is in the same package or not. I think there is an issue in customer exit.
Please let me know if anyone has an idea on this.
Thanks,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasad,
As per my understanding there might be two issues.
1) The data is not going to be updated(commited) properly after execution and thats why it is skipping some records.(And we cant use the COMMIT and WAIT in enhancements)
2)Or there will be memory issue...which can be solved by the basis person.
I am brifing my first point.
You can use your code in CALL FUNCTION....UPDATE TASK.
This is used for bunding database changes in single database LUW to use CALL FUNCTION ....IN UPDATE TASK.
The update work process passes this data to the database for updating and analyze the return message from the database.If the update was successful, the update work process triggers the database commit after the last database change and deletes the log entire from table VBLOG.
Thanks & Regards,
Harshal kulkarni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harshal,
1) I have changes the data packet size to 500 KB and it is fetching 880 records per data packet. So, data is not missing due to memory issue.
2) Can we test your point 1 in ECC system? If yes, where we can test this? We have tested the enhancement code. It is working fine.
Thanks,
Prasad
AL,
There is huge ABAP code has written for this enhancement and it is not optimized. Below is the logic used to populate data to enhanced field.
CMOD Enhancement Code:
FORM zjbw_reg_awd_tran TABLES c_t_data STRUCTURE zoxdj10029.
DATA: l_t_zoxdj10029 LIKE zoxdj10029 OCCURS 0 WITH HEADER LINE.
DATA: l_tabix LIKE sy-tabix.
DATA : zstell TYPE stell,
zistat TYPE istat_d,
molga TYPE molga,
relid TYPE relid,
ipend TYPE ipend,
rundt TYPE rundt,
paydt TYPE pay_date,
wa_rgdir TYPE pc261,
wa_pay_result TYPE pay99_result,
wa_rt TYPE pc207,
wa_evp TYPE PC261,
ws_year(4) TYPE n,
* it_rt TYPE STANDARD TABLE OF pc207,
rgdir TYPE STANDARD TABLE OF pc261,
pay_result TYPE pay99_result.
* Declarations for Payment Date
TYPES : BEGIN OF ty_pa0001,
pernr TYPE persno,
begda TYPE begda,
endda TYPE endda,
abkrs TYPE abkrs,
werks TYPE persa,
END OF ty_pa0001.
TYPES : BEGIN OF ty_pa0015,
pernr TYPE persno,
subty TYPE subty,
begda TYPE begda,
endda TYPE endda,
END OF ty_pa0015.
DATA : itab_pa0001 TYPE STANDARD TABLE OF ty_pa0001,
wa_pa0001 LIKE LINE OF itab_pa0001.
DATA : itab_lgart LIKE STANDARD TABLE OF zcm_rwds_lim,
wa_lgart LIKE LINE OF itab_lgart.
DATA : itab_pa0015 TYPE STANDARD TABLE OF ty_pa0015,
wa_pa0015 LIKE LINE OF itab_pa0015.
DATA : itab_t549a LIKE STANDARD TABLE OF t549a,
wa_t549a LIKE LINE OF itab_t549a,
itab_t549q LIKE STANDARD TABLE OF t549q,
wa_t549q LIKE LINE OF itab_t549q,
itab_t549s LIKE STANDARD TABLE OF t549s,
wa_t549s LIKE LINE OF itab_t549s.
DATA : ws_lgart TYPE lgart.
*Begin of Add: 701081979: Max Attn Recommendation
STATICS: lt_t549s_buffer TYPE TABLE OF t549s,
lt_t549q_buffer TYPE TABLE OF t549q.
*End of Add: 701081979: Max Attn Recommendation
* Declarations for Payment Date
l_t_zoxdj10029[] = c_t_data[].
* Select Payroll Area and personnel area from PA0001
SELECT pernr begda endda abkrs werks FROM pa0001
INTO CORRESPONDING FIELDS OF TABLE itab_pa0001
FOR ALL ENTRIES IN l_t_zoxdj10029
WHERE pernr = l_t_zoxdj10029-pernr.
IF sy-subrc = 0.
SORT itab_pa0001 BY pernr.
ENDIF.
* Select Wage Type details from table ZCM_RWDS_LIM
SELECT * FROM zcm_rwds_lim INTO TABLE itab_lgart.
* Select Additional payment details from PA0015.
SELECT pernr subty begda endda FROM pa0015
INTO CORRESPONDING FIELDS OF TABLE itab_pa0015
FOR ALL ENTRIES IN l_t_zoxdj10029
WHERE pernr = l_t_zoxdj10029-pernr
AND begda = l_t_zoxdj10029-paydt
AND endda = l_t_zoxdj10029-paydt.
IF sy-subrc = 0.
SORT itab_pa0015 BY pernr.
ENDIF.
*SELECT DATA FROM T549A , T549Q AND T549S
SELECT * FROM t549a INTO CORRESPONDING FIELDS OF TABLE itab_t549a.
*Begin of Add: 701081979: Max Attn Recommendation
IF lt_t549q_buffer[] IS INITIAL.
*End of Add: 701081979: Max Attn Recommendation
SELECT * FROM t549q INTO CORRESPONDING FIELDS OF TABLE itab_t549q.
*Begin of Add: 701081979: Max Attn Recommendation
IF sy-subrc = 0.
lt_t549q_buffer[] = itab_t549q[].
ENDIF.
ENDIF.
*End of Add: 701081979: Max Attn Recommendation
*Begin of Add: 701081979: Max Attn Recommendation
IF lt_t549s_buffer[] IS INITIAL.
*End of Add: 701081979: Max Attn Recommendation
SELECT * FROM t549s INTO CORRESPONDING FIELDS OF TABLE itab_t549s.
*Begin of Add: 701081979: Max Attn Recommendation
IF sy-subrc = 0.
lt_t549s_buffer[] = itab_t549s[].
ENDIF.
ENDIF.
*End of Add: 701081979: Max Attn Recommendation
LOOP AT l_t_zoxdj10029.
l_tabix = sy-tabix.
* Payment Date
* Start - Get the Payroll Area and personnel area
IF l_t_zoxdj10029-preas EQ '01' OR l_t_zoxdj10029-preas EQ '02' OR l_t_zoxdj10029-preas EQ '04'.
LOOP AT itab_pa0001 INTO wa_pa0001 WHERE pernr = l_t_zoxdj10029-pernr
AND begda <= l_t_zoxdj10029-begda
AND endda >= l_t_zoxdj10029-begda.
EXIT.
ENDLOOP.
* End - Get the Payroll Area and personnel area
* Start - Read the Wage type from table ZCM_RWDS_LIM
READ TABLE itab_lgart INTO wa_lgart WITH KEY molga = l_t_zoxdj10029-molga
mrcid = '****'
werks = wa_pa0001-werks
btrtl = '****'
awdtyp = l_t_zoxdj10029-awdtyp
endda = '99991231'.
IF sy-subrc = 0.
ws_lgart = wa_lgart-lgart.
ELSE.
READ TABLE itab_lgart INTO wa_lgart WITH KEY molga = l_t_zoxdj10029-molga
mrcid = '****'
werks = '****'
btrtl = '****'
awdtyp = l_t_zoxdj10029-awdtyp
endda = '99991231'.
IF sy-subrc = 0.
ws_lgart = wa_lgart-lgart.
ENDIF.
ENDIF.
* END - Read the Wage type from table ZCM_RWDS_LIM
* Check if PA0015 record exists for the PERNR and Wage type found above - if not do not read payroll results.
IF NOT l_t_zoxdj10029-paydt IS INITIAL.
READ TABLE itab_pa0015 INTO wa_pa0015 WITH KEY pernr = l_t_zoxdj10029-pernr
subty = ws_lgart
begda = l_t_zoxdj10029-paydt
endda = l_t_zoxdj10029-paydt.
IF sy-subrc = 0.
CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
EXPORTING
employee = l_t_zoxdj10029-pernr
IMPORTING
relid = relid
molga = molga
EXCEPTIONS
error_reading_infotype_0001 = 1
error_reading_molga = 2
error_reading_relid = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
* Read Payroll Results
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = l_t_zoxdj10029-pernr
IMPORTING
molga = molga
TABLES
in_rgdir = rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
IF sy-subrc EQ 0.
READ TABLE rgdir INTO wa_rgdir
WITH KEY srtza = 'O' fpend = l_t_zoxdj10029-paydt.
IF sy-subrc EQ 0.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = relid
employeenumber = l_t_zoxdj10029-pernr
sequencenumber = wa_rgdir-seqnr
read_only_international = 'X'
CHANGING
payroll_result = pay_result
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.
IF sy-subrc EQ 0.
READ TABLE PAY_RESULT-INTER-RT INTO wa_rt WITH KEY lgart = ws_lgart.
IF sy-subrc EQ 0.
ipend = wa_rgdir-ipend.
rundt = wa_rgdir-rundt.
paydt = wa_rgdir-paydt.
ENDIF.
ENDIF.
ENDIF.
IF PAYDT IS INITIAL.
READ TABLE rgdir INTO wa_rgdir
WITH KEY srtza = 'P' fpend = l_t_zoxdj10029-paydt.
IF sy-subrc = 0.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = relid
employeenumber = l_t_zoxdj10029-pernr
sequencenumber = wa_rgdir-seqnr
read_only_international = 'X'
CHANGING
payroll_result = pay_result
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.
IF sy-subrc EQ 0.
READ TABLE PAY_RESULT-INTER-RT INTO wa_rt WITH KEY lgart = ws_lgart.
IF sy-subrc EQ 0.
ipend = wa_rgdir-ipend.
rundt = wa_rgdir-rundt.
paydt = wa_rgdir-paydt.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
IF PAYDT IS INITIAL.
READ TABLE rgdir INTO wa_rgdir
WITH KEY srtza = 'A' fpend = l_t_zoxdj10029-paydt.
IF sy-subrc = 0.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = relid
employeenumber = l_t_zoxdj10029-pernr
sequencenumber = wa_rgdir-seqnr
read_only_international = 'X'
CHANGING
payroll_result = pay_result
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.
IF sy-subrc EQ 0.
READ TABLE PAY_RESULT-INTER-RT INTO wa_rt WITH KEY lgart = ws_lgart.
IF sy-subrc EQ 0.
ipend = wa_rgdir-ipend.
rundt = wa_rgdir-rundt.
paydt = wa_rgdir-paydt.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
IF NOT ipend IS INITIAL .
IF ipend EQ l_t_zoxdj10029-paydt.
l_t_zoxdj10029-ZZPAYDT = paydt.
MODIFY l_t_zoxdj10029 INDEX l_tabix.
ELSE.
ws_year = ipend(4).
READ TABLE itab_t549a INTO wa_t549a WITH KEY abkrs = wa_pa0001-abkrs.
IF sy-subrc = 0.
READ TABLE itab_t549q INTO wa_t549q WITH KEY permo = wa_t549a-permo
pabrj = ws_year
endda = ipend.
IF sy-subrc = 0.
READ TABLE itab_t549s INTO wa_t549s WITH KEY datmo = wa_t549a-datmo
permo = wa_t549a-permo
pabrj = ws_year
pabrp = wa_t549q-pabrp
datid = '01'.
l_t_zoxdj10029-ZZPAYDT = wa_t549s-pdate.
MODIFY l_t_zoxdj10029 INDEX l_tabix.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF. " End of Read RGDIR table
CLEAR: wa_rgdir,
wa_pay_result,
wa_rt,
rgdir[].
ELSE.
CONTINUE.
ENDIF.
ENDIF.
CLEAR : wa_pa0001 , wa_lgart , wa_pa0015 .
CLEAR : WA_T549A , WA_T549Q , WA_T549S.
CLEAR : WS_LGART , MOLGA , ipend , rundt , paydt.
ENDLOOP.
c_t_data[] = l_t_zoxdj10029[].
ENDFORM. " ZJBW_REG_AWD_TRAN
Thanks,
Prasad
can you check the employee ids which are not getting payment date.
check with HR team, how they are maintained those employee data.
As my guess missing payment date empoyee data may be maintained by different way than asusual.
Try to compare the emplyee data which is not getting payment with other employee which getting payment into bw loads.
by seeing whole record information you may find the difference.
if user maintained the employee in standard way then only only your logic will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram,
Payment date is populating if run the Info package with small range of selections (25000 to 30000) for Pernr 29080. If I run the Info package with selections 1 to 50000, Payment date is not populating for Pernr 29080. Like this I have checked few pernr's.
@ Anshu,
ABAP experts confirmed that enhancement code is working fine and we debugged the ABAP. Data is populating at runtime. Some how it is missing if we run the full load.
Thanks,
Prasad
Can you please share the piece of code written for that enhanced field.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.