06-09-2011 12:16 PM
Dear All Experts,
I want to find Sales Order number for particular FI document. Means i want to link BSEG and VBAK tables. Kindly help to link these two tables. BSEG-VBELN VBEL2 both are blank....any other link.....
Regards,
Shaligram.
06-09-2011 1:11 PM
Hi
In VBRK, you will get the Sales Order No also. Further, pass sales invoice no along with fiscal year in field AWKEY of BKPF Table and get the BELNR as output. This is the FI Document No of Billing Invoice of a Sales Order
Regards
Sanil Bhandari
06-09-2011 1:11 PM
06-09-2011 1:53 PM
you can't link directly.
instead use link from vbak to bkpf.
and then bkpf to bseg.
eg.
first fetch belnr from bkpf where passing AWTYP = "VBAK"
then link bseg- vbak.
with associative property.
a=b, b=c.
then a=c.
06-09-2011 2:36 PM
- From BSEG read BKPF
- There look at field AWTYP and AWKEY
- If AWTYP is 'VBAK', AWKEY contains key of VBAK
- If AWTYP is 'VBRK', AWKEY contains key of VBRK, then from VBRK read VBAK
Look at table TTYP to find how AWKEY is mapped to key fields, there you may find a structure or a FM to execute the mapping.
Also use sdn search tool to find document like [Copy of Link Between SAP SD, MM & FI|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=45427] or [Link Between SAP SD, MM & FI|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=33768&decorator=printable]
Regards,
Raymond