Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sale Order line item and delivery document

Former Member
0 Kudos

Hi,

I am looking at a link where in get the sales order, line item (ETENR) and corresponding delivery document .

Like

Sale Ordr     Posnr     Etenr     Delivery

12345          10          1          XXXXXXXXXX

12345          10          3          XXXXXXXXXX

12345          10          7         XXXXXXXXXX

I get the sale Oder , Pos No and Line Item from VBEP but i am not able to link the Delivery doc with the correct Line item.

I tried LIKP & LIPS but of not much help.

Can any please let me know how to proceed.

with rgds

Ranjith

5 REPLIES 5

Former Member
0 Kudos

Use table VBFA-Sales document flow

0 Kudos

Hi Maju,

     Can u please give an example.

Former Member
0 Kudos

Hi Ranjith,

When you have the sales document no. and sales item no. then go to LIPS table and put the sales doc. no. on field VGBEL and the sales item no. on field VGPOS and search.

This will give you the corresponding delivery documents along with the item details from table LIPS.

Regards,

Arnab

0 Kudos

select VBELN  " (Subsequent document-in ur case->delivery no)

           POSNN " (Subsequent item->del item no)

          from vbfa

         into <wa>

  where VBELV eq <ur sales doc number> and

             POSNV eq <ur sales doc item> and

             VBTYP_N eq  'J' and "delivery

              VBTYP_V  eq 'C'.   "order

Former Member
0 Kudos

Hi Ranjith,

There is no direct link between Schedule lines and Delivery as the confirmed quantity is calculated at item level and the link is also at item level.

Well there is a solution to consider it date wise but it is not very accurate....

You can find the code here

Regards