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: 

VBAP - VBEP - LIPS

Former Member
0 Kudos

Hi,

I have an order with one item ( VBAP)

2 schedule lines in VBEP for the same item.

3 deliveries in LIPS for that item.

i want to display order with items, item schedule lines, deliveries if any.

How do i ralate these 3 tables ? or is there other solution?

Thanks,

M B

1 ACCEPTED SOLUTION

Former Member

Simple, order and delivery are related at the item level, this is because order items from one sales order can goto multiple deliveries, so the delivery items refer the sales order items.

In particular, this is your answer

Method 1.

Join VBAP, VBEP via fields VBELN, POSNR

Join VBEP, LIPS via LIPS-VGBEL = VBEP-VBELN and LIPS-VGPOS = VBEP-POSNR.

Method 2.

You can use document history table VBFA

Join VBAP, VBEP via fields VBELN, POSNR

Join VBEP, VBFA via VBFA-VBELV = VBEP-VBELN and VBFA-POSNV = VBEP-POSNR

Join LIPS, VBFA via LIPS-VBELN = VBFA-VBELN and LIPS-POSNR = VBFA-POSNN

You can also specify VBFA-VBTYP_N = 'J', if they are normal outbound deliveries

9 REPLIES 9

Former Member
0 Kudos

v have vbeln as key for vbap - get the item data

use vbeln and posnr to get schedule lines from vbep

use the vbeln and posnr to get the deliveries....

store all these in an internal table and display....

hope this helps

> Hi,

>

> I have an order with one item ( VBAP)

> 2 schedule lines in VBEP for the same item.

> 3 deliveries in LIPS for that item.

> i want to display order with items, item schedule

> lines, deliveries if any.

> How do i ralate these 3 tables ? or is there other

> solution?

>

> Thanks,

> M B

hi

u can relate these tables with the key vbeln...and fetch the details

Former Member
0 Kudos

Hi M B,

Those 3 tables (VBAP, VBEP and LIPS) have 2 common key fields: VBELN and POSNR. These key fields may help you to relate the tables.

Hope it helps!

former_member189631
Active Contributor
0 Kudos

Hi M.B,

Please try this:

VBAP=Sales Document: Item Data

VBEP=Sales Document: Schedule Line Data

LIPS= SD document: Delivery: Item data

U can relate the tables like this,

VBAP-VBELN = VBEP-VBELN

VBAP-MATNR = LIPS-MATNR

Regards,

Ramganesan K

Former Member
0 Kudos

Hi ,

Use Function module

RV_ORDER_FLOW_INFORMATION enter order number and item number you will ger everything .

Please reward if useful.

Former Member
0 Kudos

hi,

refer to this

select vbeln posnr

from vbap

into corresponding fields of table i_vbap.

select vbeln posnr

from vbep

into corresponding fields of table i_vbep

for all entries in i_vbap

where vbeln eq i_vbap-vbeln

and posnr eq i_vbap-posnr.

select vbelnr posnr

from lips

into corresponding fields of table i_lips

for all entries in i_vbep

where vgbel eq i_vbep-vbeln

and vgpos eq i_vbep-posnr.

Former Member
0 Kudos

MB

-


SELECT VBAPPOSNR VBAPVBELN VBEPPOSNR VBEPVBELN LIPS~POSNR

LIPS~VBELN

INTO (VBAP-POSNR , VBAP-VBELN , VBEP-POSNR , VBEP-VBELN , LIPS-POSNR

, LIPS-VBELN )

FROM ( VBAP

INNER JOIN VBEP

ON VBEPPOSNR = VBAPPOSNR

AND VBEPVBELN = VBAPVBELN

INNER JOIN LIPS

ON LIPSPOSNR = VBEPPOSNR

AND LIPSVBELN = VBEPVBELN ).

ENDSELECT.

Pls. rewardx if useful

Former Member
0 Kudos

Hi

Just see the table of VBFA table and pass your Order number to VBELV and get the preseding document number VBELN for the order and also check the flag for delivery.

Hope It Helps you.

Regards,

Hiren Patel

Former Member

Simple, order and delivery are related at the item level, this is because order items from one sales order can goto multiple deliveries, so the delivery items refer the sales order items.

In particular, this is your answer

Method 1.

Join VBAP, VBEP via fields VBELN, POSNR

Join VBEP, LIPS via LIPS-VGBEL = VBEP-VBELN and LIPS-VGPOS = VBEP-POSNR.

Method 2.

You can use document history table VBFA

Join VBAP, VBEP via fields VBELN, POSNR

Join VBEP, VBFA via VBFA-VBELV = VBEP-VBELN and VBFA-POSNV = VBEP-POSNR

Join LIPS, VBFA via LIPS-VBELN = VBFA-VBELN and LIPS-POSNR = VBFA-POSNN

You can also specify VBFA-VBTYP_N = 'J', if they are normal outbound deliveries

Former Member
0 Kudos

Hi MB,

You can find all these details in <b>VBFA</b> table,

to find schedule lines u can use VBAP s entries as preceeding doc details, and can get succeeding doc.(VBEP) details.

then preceeding doc detials as VBEP entries and can get succeeding doc. details as LIPS.

in all the cases give the document category as an important entry.

Regards,

Sujatha.