Skip to Content
author's profile photo Former Member
Former Member

Accessing Payroll Data

SAP have developed a new class for access payroll results as detailed in not 699276 and give an example of how to use it that is very similar to the code below. The example works just as documented and returns the results in the variable <b>go_pernr_pr</b>. In debugger I can drill down and see all the results sitting there but I can't identify how reference the results in my program e.g. How do I refrence the RT table?

report zrubbish6.

data go_prr type ref to CL_HRPAY99_PRR_4_PNP_REPS.

data gt_pernr_pr type H99_HR_PAY_RESULT_TAB.

data <b>go_pernr_pr</b> type ref to CL_HR_PAY_RESULT_GB.

tables pernr.

field-symbols <pernr_pr> type ref to CL_HR_PAY_RESULT.

START-OF-SELECTION.

CALL METHOD cl_hrpay99_prr_4_pnp_reps=>get_instance

EXPORTING

IM_PN_BEGDA = pn-begda

IM_PN_ENDDA = pn-endda

IM_MOLGA = '08'

IM_ADD_RETROES_TO_RGDIR = 'X'

IMPORTING

EX_PRR = go_prr

EXCEPTIONS

INVALID_ENTRIES = 1

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

GET PERNR.

call method go_prr->GET_PERNR_PAYR_RESULTS_ALLIN1

exporting im_pernr = pernr-pernr

importing EX_PERNR_PAYROLL_RESULTS = gt_pernr_pr.

loop at gt_pernr_pr assigning <pernr_pr>.

<b>go_pernr_pr</b> ?= <pernr_pr>.

  • Here do what you have to do with each result

endloop.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 08, 2005 at 10:20 PM

    Solved

    report zrubbish6.

    data go_prr type ref to CL_HRPAY99_PRR_4_PNP_REPS.

    data gt_pernr_pr type H99_HR_PAY_RESULT_TAB.

    data go_pernr_pr type ref to CL_HR_PAY_RESULT_GB.

    tables: pernr.

    field-symbols <pernr_pr> type ref to CL_HR_PAY_RESULT.

    field-symbols <wa_rt> type PC207.

    START-OF-SELECTION.

    CALL METHOD cl_hrpay99_prr_4_pnp_reps=>get_instance

    EXPORTING

    IM_PN_BEGDA = pn-begda

    IM_PN_ENDDA = pn-endda

    IM_MOLGA = '08'

    IM_ADD_RETROES_TO_RGDIR = 'X'

    IMPORTING

    EX_PRR = go_prr

    EXCEPTIONS

    INVALID_ENTRIES = 1

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    GET PERNR.

    call method go_prr->GET_PERNR_PAYR_RESULTS_ALLIN1

    exporting im_pernr = pernr-pernr

    importing EX_PERNR_PAYROLL_RESULTS = gt_pernr_pr.

    loop at gt_pernr_pr assigning <pernr_pr>.

    go_pernr_pr ?= <pernr_pr>.

    loop at go_pernr_pr->INTER-RT assigning <wa_rt>.

    write : / go_pernr_pr->PERIOD-FPPER, go_pernr_pr->PERIOD-INPER, go_pernr_pr->PERIOD-SRTZA, <wa_rt>-lgart, <wa_rt>-betrg..

    endloop.

    endloop.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.