Application Development and Automation 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: 
Read only

Regarding VBPA Fields

Former Member
0 Likes
2,953

I have a requirement in which they asked to retrive Agent Depot Number from VBPA table.

May i know what the field should be.

3 REPLIES 3
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,107

VBPA contains the information about the partners assigned to the document. Using the document number (VBPA-VBELN) and either initial line number (VBPA-POSNR = 000000) or an actual line number (depending on whether it's a header or line item partner) you can see what partners are there for the document.

The field VBPA-PARVW is a partner function code. The most common ones are, for example, SH (ship-to party) and SP (sold-to party). The partner number would be in one of the fields KUNNR, LIFNR or PERNR, depending on what kind of a partner it is. For example, for a ship-to it would be VBPA-PARVW = 'SH' and then the partner number would be in VBPA-KUNNR. There should also be a customer master (KNA1) record for the same KUNNR.

You need to know what Partner Function (i.e. VBPA-PARVW) is being used for that 'Agent Depot'. All available functions are stored in the table TPAR. I'm guessing that it's not a standard SAP function but a Z... one (although your client might just call an SAP function differently).

Read only

0 Likes
2,107

Hi PARVW = 'SB' so plz which field i have to retrieve

Read only

0 Likes
2,107

Select VBPA-KUNNR by the document number VBELN (see my note regarding POSNR above) and VBPA-PARVW = 'SB'. All the information related to this partner will be in the Customer Master tables (KNA1, KNB1, KNVV, etc.).

I've never used this type of partner so I don't know where this "depot" number might be stored. Also, like I've mentioned, it could be a custom field or some standard field, which was originally meant for something else. Just go to either dictionary (SE11) or customer master (XD03) and look around. Or just ask your functional person to point where the field is.