cancel
Showing results for 
Search instead for 
Did you mean: 

Relationship

Former Member
0 Kudos

Hello,

I have sales Document number of VBAk how to Find the realtionship with VBFA(DOcument Table). i,e wheer to put this sales document number of vbak into whichh field of vbfa and corresponding what should be values for VBTYP_N and VBTYP_V Fields .

cheers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

VBFA is for document flow of sales documents.

If you want to find deliveries for a particular sales order -

VBTYP_N = 'J'.

VBELV = <SALES_ORD_NUM>.

POSNV = <SALES_OED_ITEM>.

After the select you will get delivery number in VBFA-VBELN, and delivery item no in VBFA-POSNN.

For other documents like invoice do an F4 on VBTYP_N

Please specify what your requirement is.

Cheers.

Sanjay

Answers (3)

Answers (3)

Former Member
0 Kudos

If you want to find the delivery put the sales order is preceind document.

SELECT VBELV

POSNV

VBELN

POSNN

WHERE VBELV = SALES ORDER NUMBER

POSNV = ITEM AND

VBTYP N = 'J'.

If you want to find the quotation put the sales order in subsquent document.

SELECT VBELV

POSNV

VBELN

POSNN

WHERE VBELN = SALES ORDER NUMBER

POSNN = ITEM AND

VBTYP N = 'C'.

Former Member
0 Kudos

VBFA stores the document flow. So if you are looking for preceding documents for the given sales order, you should pass the sales order number to succeeding document number or VBELN. But if you want the succeeding document number of this sales order, then you need to pass the sales order number to VBELV.

Not only that, you need to identify, which succeeding or preceding document you want(succeeding delivery, invioce etc or preceding quotation, contract, another sales order etc). This can be specified by using VBTYP and VBTYP_N according to how you used your sales order number, whether as succeeding or preceding document.

Please close the post if answered.

Srinivas

Former Member
0 Kudos

hai,

VBAK-VBELn is the key field(sales-doc).

VBFA-VBELN is the key field.

so sales doc no VBAK-VBELN you can give this value in VBFA-VBELN.

Remainig 2 fields i am not able to get u.

Plz elaborate your doubt....

Thanks.

Message was edited by: Deepak333 k

Former Member
0 Kudos

VBAK-VBELN AND VBFA-VBELN

VBAK-VBTYP AND VBFA-VBTYP_N

thats it..