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

Deep structure /1PYXXFO/SAP_PAYSLIP_KSA, How to fetch PERNR Field.

Hi Friends,

The Deep Structure /1PYXXFO/SAP_PAYSLIP_KSA is found in the debug mode and I need to fetch the value of Personal number (PERNR).

The path is as follows for that Deep structure.

STAR_PAY_PERS_STRUCT-EMPLOYEE_KEY-PERSONNEL_NUMBER

Please share your expertise.

The above screen shot is taken from the debug mode. In which the structure Contains structure and contains a table then structure. and i want to capture the last field "personal number".

thanks.


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 31, 2013 at 10:19 AM

    Thanks friends for the above help, which was indeed helpful.

    The solution looks like this. This code is working fine.

    data : it_STAR_PAY_PERS_STRUCT type table of /1PYXXFO/ZPAYSLIP_KSA____U0011.
    data : it1_STAR_PAY_PERS_STRUCT type TABLE OF /1PYXXFO/ZPAYSLIP_KSA____M0011.
    data : wa2_STAR_PAY_PERS_STRUCT type /1PYXXFO/ZPAYSLIP_KSA____M0011.
    data : st_employee_key type /1PYXXFO/ZPAYSLIP_KSA____K0005.
    data : v_employee_key type /1PYXXFO/ZPAYSLIP_KSA____K0005.
    data : v_personal_num type char8.

    append hrdata-STAR_PAY_PERS_STRUCT[] to it_STAR_PAY_PERS_STRUCT.
    loop at it_STAR_PAY_PERS_STRUCT into it1_STAR_PAY_PERS_STRUCT[].
    loop at it1_STAR_PAY_PERS_STRUCT[] into wa2_STAR_PAY_PERS_STRUCT.
    st_employee_key = wa2_STAR_PAY_PERS_STRUCT-employee_key.
    v_personal_num = st_employee_key-PERSONNEL_NUMBER.
    exit.
    ENDLOOP.
    exit.
    ENDLOOP

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 16, 2013 at 07:18 AM

    Create LWA_STRUCT work area of type STAR_PAY_PERS_STRUCT
    Create LWA_EMPLY work are of type EMPLOYEE_KEY
    Loop at ST_HRDATA-STAR_PAY_PERS_STRUCT into LWA_STRUCT.
    LWA_EMPLYOEE = LWA_STRUCT-EMPLOYEE_KEY
    "Use LWA_EMPLOYEE

    Endloop.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2013 at 06:52 PM

    Hi Obaid,

    You can try this:

    DATA:ls_star_pay_pers_struct LIKE LINE OF st_hrdata-star_pay_pers_struct,

    ls_employee LIKE st_hrdata-star_pay_pers_struct-employee_key.

    LOOP AT st_hrdata-star_pay_pers_struct INTO ls_start_pay_pers_struct.

    WRITE ls_start_pay_pers_struct-employee_key-personnel_number.

    "or

    ls_employee = ls_start_pay_pers_struct-employee_key.

    WRITE ls_employee-personnel_number.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

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

    Hi,

    If you want to use in write statement then, code it as follows.

    Write : ST_HRDATA-STAR_PAY_PERS_STRUCT-EMPLOYEE_KEY-PERSONNEL_NUMBER.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 16, 2013 at 06:51 AM

    Hello Obaid,

    you can access like this,

    Read statement over ST_HRDATA-STAR_PAY_PERS_STRUCT-EMPLOYEE_KEY table into another work area say LWA_EKEY.

    PERNR = LWA_EKEY-PERSONNEL_NUMBER.

    Former Member there is internal table exist in the deep structure so we cant directly make a statement as you suggested.

    Please correct me if I am wrong anywhere.

    Thanks and Regards,

    Bhaskar

    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.