cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Mukund,

Thanks for your reply.

As per your suggestion, once i get the employee number, i have to look into the kna1 table. but as the employee is maintained directly in the partner of the quotation, there is no entry of employee in the kna1 table.

Regards,

Anand

Former Member
0 Kudos

Hi,

In case you are entering the sales reps name and address, I think you can get the ADRNR number from VBPA itself for the respective document number, partner function and account group. Once you find ADRNR number, you can put the same in ADRC table and get the other details like Name and communication number. (I dont remember the exact fields I think it is NAME1 and TELE1). This for sure will imporve the performance of the system.

Ask you ABAPer (if he is readly available) to try this logic once by putting in the parameters in the respective tables and fields to fetch values manually. Then, he will understand the system and should be able to help you.

Hope this helps...

Thanks

Mukund S

Former Member
0 Kudos

Hi,

When i enter the employee number directly in the partner function tab at header level, it is not giving me a ADRNR entry in VBFA.

Only if i change something in the employee number partner function an ADRNR entry is maintained.

So i have to use PERNR and try to get it entries of name and contact no from some HR table. Any suggestions to get this one?

If some change is done in the employee number partner fn in document then we can get all the details from ADRNR.

Regards,

Anand

Former Member
0 Kudos

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

Answers (1)

Answers (1)

eduardo_hinojosa
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Hinojosa,

Is there a table in HR where i can get Name and contact no both in same table.

Regards,

Anand

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

As I told you and also Mukund, check in tables PA0002 and PA0006.

Regards,

Eduardo