FORM get_payresult .
DATA: lv_fpper TYPE faper.
CLEAR : it_rgdir, payroll.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = pernr-pernr
* BUFFER =
* NO_AUTHORITY_CHECK = ' '
IMPORTING
molga = molga
TABLES
in_rgdir = it_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
* IF sy-subrc <> 0.
*
** write:/ 'result does not exist for pernr' .
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* ENDIF.
CONCATENATE pnpdispj pnpdispp INTO lv_fpper.
**--insertion of code for rejecting inactive pernr
READ TABLE it_rgdir WITH KEY fpper = lv_fpper TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
REJECT.
ENDIF.
**--end of code for rejecting inactive pernr.
LOOP AT it_rgdir INTO wa_rgdir WHERE "SRTZA EQ 'A' AND " GETTING THE ACTIVE RESULT FOR THE SPECIFIED DATE
fpper EQ lv_fpper AND "FPBEG GE PN-BEGDA AND "
inper EQ lv_fpper AND "FPEND LE PN-ENDDA AND "
abkrs EQ p0001-abkrs AND
void IS INITIAL AND
reversal IS INITIAL .
MOVE wa_rgdir-seqnr TO seqnr .
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'IN'
employeenumber = pernr-pernr
sequencenumber = 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 = payroll "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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP .
ENDFORM. " GET_PAYRESULT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |