11-06-2016 7:47 AM
Hi friends,
I am developing my first ABAP HR PA and Payroll report respectively.
1. Develop Employee Education Details Report for HR Module
In the first case, please check the coding. is it correct ? Secondly, i am unable to debug it . What data should i enter in the output screen ?
2. In the payroll report, on pressing F8, the output screen is not coming. I have taken LDB as PNPCE in payroll .
1. TABLES: pernr.
INFOTYPES : 0001, 0022.
START-OF-SELECTION.
GET pernr.
RP_PROVIDE_FROM_LAST P0022 SPACE PN-BEGDA PN-ENDDA.
WRITE : / P0022-slart.
REPORT ZHR2.TABLES : p0000.DATA : molga TYPE t500l-molga.DATA : it_payresult TYPE
payin_result.*Creating payroll structuresDATA : BEGIN OF it_rgdir OCCURS 0. INCLUDE STRUCTURE pc261.DATA : END OF it_rgdir.* Reading the cluster for an
employeeCALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR =
p0000-pernr* BUFFER =* NO_AUTHORITY_CHECK = ' ' IMPORTING
MOLGA = molga
TABLES
IN_RGDIR =
it_rgdir* EXCEPTIONS* NO_RECORD_FOUND = 1* OTHERS = 2 .IF SY-SUBRC <> 0.* Implement suitable error
handling hereENDIF.LOOP AT it_rgdir WHERE paydt
BETWEEN it_rgdir-fpbeg AND it_rgdir-fpend.CALL FUNCTION
'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID
= 'IN'
EMPLOYEENUMBER
= p0000-pernr
SEQUENCENUMBER
= it_rgdir-seqnr* READ_ONLY_BUFFER = ' '* READ_ONLY_INTERNATIONAL = ' '* ARC_GROUP = ' '* CHECK_READ_AUTHORITY = 'X'* FILTER_CUMULATIONS = 'X'* CLIENT =* IMPORTING* VERSION_NUMBER_PAYVN =* VERSION_NUMBER_PCL2 =
CHANGING
PAYROLL_RESULT
= it_payresult* 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 <> 0.* Implement suitable error
handling hereENDIF.ENDLOOP.
Regards,
Saurav Lahiry
11-06-2016 8:06 AM
(code badly displayed on my IE11 : it seems like the code contains line feeds (LF) instead of Carriage Rerturns + LF)
11-07-2016 7:22 PM
Same in Chrome, code is unreadable.
But based on the question I'd suggest to ask a more senior developer locally to help with this. Not sure it's fair to expect full code review from SCN. I'm also confused why you are unable to debug. If it's a missing authorization then you need to get access.
11-08-2016 10:47 AM
if you are using PNPCE you have declare a node, for example:
NODES PERAS.
....
GET PERAS. instead of GET PERNR.