Skip to Content
avatar image
Former Member

help in writing logic to abaper for printing contact details from partnr fn

Hi friends,

I have to give the logic to the abaper to print the contact details of one partner which is manually entered in the quotation at header level.

i have a partner z1 with partner type PE which is manually entered in the partner fn field at the header level. this z1 partner fn is an employee. The name and contact details of this employee needs to be printed in the header of the output.

What is the logic i need to give to abaper for this.

Regards,

Anand

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 07, 2010 at 09:32 AM

    Hi,

    For printing the employee name and contact number you can follow the below logic.

    a. Go to VBPA table and fetch the partner Z1 for the Contract number. You will get the Employee Number.

    b. Put the Employee number (fetched from VBPA) into KNA1 table to get the name of the employee and also the contact number. If it is not available in KNA1 then, fetch the ADRNR number from KNA1 for the employee number (KUNNR)

    c. Now, put ADRNR number into ADRC table and fetch the required details.

    Once you have all the above details, ABAPer will know where to store and print all these details.

    Hope this helps

    Thanks

    Mukund S

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Anand,

      In case you do not find an ADRNR for the respective partner funtion in VBPA table, then, it means that the employee number derived from customer master is correct. Then, I think you can take KUNNR number for the employee partner function thro' VBPA and put the same in KNA1 table to get the right ADRNR. (As explained by me in the first post).

      My question now is, are you maintaining the employee in XD01 (customer) or in VPE1 (Sales Rep)?

      You can try with tables PA0002 Personal Data and PA0006 Addresses only if you maintain employees thro' VPE1 Tcode. PA0006 has PERNR field. But, what you have to make sure is that the table is getting updated. Else, you may not find the data here as well.

      Hope this helps...

      Thanks

      Mukund S

  • avatar image
    Former Member
    Oct 07, 2010 at 10:52 AM

    Hi,

    The data of employees are in infotypes. Search it in tables PA0006 and PA0002. The field that link is PERNR.

    I hope this helps you

    Regards,

    Eduardo

    PD: Infotypes are tables from HR or HCM with the rule PA++++ where + are numbers.

    Edited by: E_Hinojosa on Oct 7, 2010 12:52 PM

    Add comment
    10|10000 characters needed characters exceeded