‎2008 Mar 19 3:58 PM
I have a requirement in which they asked to retrive Agent Depot Number from VBPA table.
May i know what the field should be.
‎2008 Mar 19 9:09 PM
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).
‎2008 Mar 20 5:22 AM
‎2008 Mar 20 1:09 PM
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.