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

Regarding FM 'cu_read_rgdir'

I have developed a customized payroll report. Output of the report is as below but a status message is coming along with the output.

Now, when I debug my program this fm ‘cu_read_rgdir’ brings all the pernrs whether they are in the payroll period or not. Though, its printing only the desired pernrs. Now, my problem is to deal with this message. I tried lots of tricks for this but unfortunately none of them seems to be working. Do you people have any idea to deal with this...

Regards

Ankit

image 2.png (67.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 24, 2013 at 09:11 AM

    HI Ankit ,


    in the function module cu_read_rgdir check the EXCEPTIONS are commented are not


    if not comment the EXCEPTIONS and check once .I think u r problem will solved


    Regards ,


    Pramodh.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 26, 2013 at 06:23 AM

    Thanks for everyone who answered on this post. Issue is resolved by the following thread.

    I added the exceptions in FM cu_read_rgdir and its working fine now..

    Regards

    Ankit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 24, 2013 at 08:39 AM

    Hi Ankit,

    Are you using dynamic method to read the payroll?

    If yes then the error may be because of that as using dynamic way i think you can fetch payroll from that molga only. It will be better if you can share the code or give the exact requirement of your program.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 24, 2013 at 09:19 AM

    Hi Ankit

    After the function call do you have any mesage stuff...if yes comment it.

    Nabheet

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 24, 2013 at 09:31 AM

    @ amaranatha - sorry, but i couldn't understand your method of dynamic method payroll reading..and the requirement is simple, i just need to fetch the records of all the pernrs for a specific payroll period from BT table. i am attaching excerpts from my code..kindly go through it and suggest me where i am doing wrong..

    @pramodh : are you talking about the exceptions in fm 'PYXX_READ_PAYROLL_RESULT', if yes, then i have already done that..but no use..

    @nabheet : no message stuff is there in the code...

    here is the code..

    g_sav_iperi = pn-begda.

    * Getting the relid and molga
    CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
    EXPORTING
    employee = pernr-pernr
    IMPORTING
    relid = g_sav_relid
    molga = g_sav_molga
    EXCEPTIONS
    error_reading_infotype_0001 = 1
    error_reading_molga = 2
    error_reading_relid = 3
    OTHERS = 4.
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

    * Function module to fetch RGDIR table for each pernr
    CALL FUNCTION 'CU_READ_RGDIR'
    EXPORTING
    persnr = pernr-pernr
    IMPORTING
    molga = g_sav_molga
    TABLES
    in_rgdir = g_tab_rgdir.
    IF sy-subrc = 0.
    SORT g_tab_rgdir DESCENDING BY seqnr.
    ENDIF.

    LOOP AT g_tab_rgdir INTO g_wrk_rgdir WHERE payty = space AND inper = g_sav_iperi.
    CLEAR g_wrk_result.

    * Function Module to fetch cluster data for each pernr
    CLEAR g_wrk_result.
    CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
    EXPORTING
    clusterid = g_sav_relid
    employeenumber = pernr-pernr
    sequencenumber = g_wrk_rgdir-seqnr
    CHANGING
    payroll_result = g_wrk_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 <> 0.
    * Implement suitable error handling here
    ENDIF.

    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.