Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

LIKP - KUNNR and getting KUNNR from VBPA

Former Member
0 Kudos

whats the difference between getting KUNNR and KUNAG from likp ( and getting adrnr from kna1) instead of getting KUNNR ( AG,WE) and ADRNR from VBPA ? . I found that both entries are same.

7 REPLIES 7

former_member193284
Active Participant
0 Kudos

Hello Sujitha,

Whenever you need to fetch Address details for any partners. It is advisable to fetch ADRNR from VBPA. and then go to KNA1 to get the Address details.

Please refer below example which will indicate why you need to fetch data from Customer Master(KNA1).

If i have created a sales order or delivery for a particular customer.

And change the address details for that customer in partners tab for VA02(sales order) or delivery(VL02). that will not be reflected in the customer master tables.

So you should always get the entries for customer address from master tables to avoid data inconsistencies..

Also in some case you might notice the for particular partners you dont have adrnr maintained in VBPA. So the approach should be as follows.

For a partner take the kunnr and go to KNA1 to get the Address number adrnr. And then fetch address details from ADRC.

Hope this answers your query.

Thanks

0 Kudos

Hi ,

Thanks for the reply. I understood why we need to retrieve address from ADRC instead of KNA1 directly. Can u also tell me if

1) retrieving kunnr from likp , using that retrieving adrnr from kna1 , then to address

and

2) retrieving kunnr from vbpa using vbeln , using that retrieving adrnr from kna1 , then to address

and

3) retrieving adrnr from vbpa using vbeln (we), using that retrieving address directly are same.

If they are same, where lies the use of vbpa in this case?

0 Kudos

Hello Sujitha,

VBPA will contain many partners for one document.

Example....you can have order created for one partner...but delivery will be done for some other partner and billing would be generated for another partner..

In thise case your VBPA will have 3 enteries for your sales document.. Now you business will tell you which customer Number/partner you need to read...

SP - sold to party

SH - Ship to pary or

Bill to party... so based on this select record from VBPA for the partner your business has suggested and take Kunnr for that partner and go to ADRC and get the data...

remember you customers are nothing but partners...so for one document you can have many partners..in VBPA check field PARVW that will tell you the type of partners you have...

Hope this helps..

0 Kudos

Thank you all.. I have understood it..

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

Think that a customer (payer of invoice, usually a company) have an address (one record in ADRC), but this customer can have a lot of plants (shops, factories, warehouses), ie:destinations. If you do a delivery, you must decide where you send the goods. These is the reason. This information flows from sales order, to delivery and to invoice in SD.

I hope this helps you

Regards,

Eduardo

0 Kudos

HI Sujitha,

KNA1 is the customer master table. When ever a customer is created in the system the data is stored in this table.

especially general data.

VBPA is a table for storing transaction data. that is sales order partner data. This table also defines the role of the customer

in the transaction.

For example, a customer can be a sold to party ot ship to party , or Bill to party or Payer or all at a time.

The partner function data is availaible in VBPA and not availaible in KNA1.

Thanks,

Rohan

raymond_giuseppi
Active Contributor
0 Kudos

Also read this OSS [Note 185530 - Performance: Customer developments in SD|https://service.sap.com/sap/support/notes/185530] which can be useful for you.

Regards,

Raymond