‎2009 Feb 18 10:04 PM
Hi all,
Can someone please let me know how to read the values from VBFA table, say for example if I have Sales Order Number and I want to know how to get Delivery and Billing number or say if I have Billing number I need to get the Delivery and Sales Order Number.
Thanks
Reshma
‎2009 Feb 19 4:20 AM
Hi Reshma
In VBFA you've the fields VBELV (preceding doc number) POSNV (preceding item number) and VBELN (subsequent doc) and POSNN (subsequent item).
Now Delivery comes right after the Sales Order.
So
SELECT VBELN POSNN FROM vbfa
WHERE VBELV EQ <your sales doc>
AND VBTYP_N EQ 'J' " J is for delivery document type
INTO ....
Pushpraj
‎2009 Feb 19 4:20 AM
Hi Reshma
In VBFA you've the fields VBELV (preceding doc number) POSNV (preceding item number) and VBELN (subsequent doc) and POSNN (subsequent item).
Now Delivery comes right after the Sales Order.
So
SELECT VBELN POSNN FROM vbfa
WHERE VBELV EQ <your sales doc>
AND VBTYP_N EQ 'J' " J is for delivery document type
INTO ....
Pushpraj
‎2009 Feb 19 4:35 AM
Hi...
From VBAK got o VBAP.
To get delivery data using LIPS-VGBEL = VBAP-VBELN and LIPS-VGPOS = VBAP-POSNR
To get billing data LIPS-VBELN =VBRP-VGBEL and LIPS-POSNR= VBRP-VGPOS
From VBRP get data from VBRK.
and to get divivery and saled data using billing navigate bottom to top of above steps.
Regards,
KP.
‎2009 Feb 19 4:41 AM
hi,
for ur requirement ucan use 2 methods by joing vbap,likp and vbrp tables join conditions should be LIPS-VGBEL = VBAP-VBELN and LIPS-VGPOS = VBAP-POSNR & LIPS-VBELN =VBRP-VGBEL and LIPS-POSNR= VBRP-VGPOS
other wise u can use flow document table vbfa it store all document flows.
regds:
rajesh.k
‎2009 Feb 19 5:51 AM
>
> Hi all,
>
> 1.if I have Sales Order Number and I want to know how to get Delivery and Billing number.
>2. say if I have Billing number I need to get the Delivery and Sales Order Number.
> Thanks
> Reshma
For Point 1:Prefer VBFA ie U have preceeding number (say SO ,delivery) & u want subsequent number (delivery r bill no) .Press F4 on these fields on vbtyp_v (for preceeding doc type) & vbtyp_n (succeeding)
For Point 2:Prefer VBRP or LIPS If u have subsequent number & u want preceeding number
Cheers