‎2007 Jan 23 5:54 PM
Hi all,
i had fetched data into an internal table from VBRK, with this vbeln how can i link with the tables LIKP and VBAK and get the corresponding delivery and sales document number???
Points will be rewarded!!!
Regards,
Priya.
‎2007 Jan 23 5:59 PM
Hi
U should find the link in VBRP table:
- VBRP-VGBEL = Delivery number
- VBRP-VGPOS = Delivery Item number
- VBRP-AUBEL = Sales order number
- VBRP-AUPOS = Sales order item
U can use VBFA table but I believe to read VBRP (VBRP-VBELN = VBRK-VBELN) is faster than to read VBFA.
Max
‎2007 Jan 23 5:57 PM
Hi Priya,
Query on VBFA(Document flow) table to get the Sales document and Delivery number for the Invoice.
Give the Invoice no(VBRK_VBELN) to VBFA-VBELN then it will give the Sales order and Delivery no to VBFA-VBELV field.
To get the Sales Order Specify VBFA-VBTYP_V = 'C'
To get the Delivery no Specify VBFA-VBTYP_V = 'J'
Thanks,
Vinay
‎2007 Jan 23 6:01 PM
hi vinay,
i knew the same 2...but my doubt is.. in VBFA for a billing document number u will get atleast 2 vbelv's so on what condition do i decide that one is Delivery no. and the other sales order i.e programmatically
‎2007 Jan 23 6:04 PM
Hi Priya,
Give the Invoice no(VBRK_VBELN) to VBFA-VBELN then it will give the Sales order and Delivery no to VBFA-VBELV field.
To get the Sales Order Specify VBFA-VBTYP_V = 'C'
To get the Delivery no Specify VBFA-VBTYP_V = 'J'
Thanks,
Vinay
‎2007 Jan 23 5:59 PM
Hi
U should find the link in VBRP table:
- VBRP-VGBEL = Delivery number
- VBRP-VGPOS = Delivery Item number
- VBRP-AUBEL = Sales order number
- VBRP-AUPOS = Sales order item
U can use VBFA table but I believe to read VBRP (VBRP-VBELN = VBRK-VBELN) is faster than to read VBFA.
Max
‎2007 Jan 23 6:01 PM
Hi,
1) SALES ORDER
VBRP-AUBEL = VBAK-VBELN
VBRP-AUPOS = VBAP-POSNR
2) DELIVERY NUMBER
VBRP-VGBEL = LIKP-VBELN
VBRP-VGPOS = LIPS-POSNR.
Thanks,
Naren
‎2007 Jan 23 6:01 PM
Hi Priya,
You can also use this FM to get subsequence document flow.
RV_FLOW
RV_ORDER_FLOW_INFORMATION
Regards,
Ferry Lianto
‎2007 Jan 23 6:08 PM
Hi,
Billing document can be linked to Sales Document through VBRP - Billing Item table.
<b>Step1</b> Get the Billing Item details from VBRP for all the billing documents from VBRK.
<b>Step2</b> Get the Sales document details from VBAP/VBAK by linking
<b>AUBEL - Sales Document
AUPOS</b> - Sales item
from VBRP to VBAP. Thus you can get Sales Document.
<b>Step3</b> Delivery details can be obtained from LIKP by relating LIPS-VGBEL to VBAP-VBELN and LIPS-VGPOS to VBAP_POSNR.
<b>Step4</b> Once you get the Delivery details, delivery document can be read either from LIKP or LIPS.
I hope this solves your problem.
Regards,
Vara