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: 

Item number from purchase order number....

Former Member
0 Kudos

Hi,

How do I get the POSEX (line item number) field for a given Purchase order number LIKP-VBELN

1 ACCEPTED SOLUTION

Former Member
0 Kudos

LIKP-VBLEN stores the delivery number. I don't think so it it ever store the purchase order number. Please let know if i am wrong.

13 REPLIES 13

Former Member
0 Kudos

PO line items are stored in EKPO.

Select ebelp from EKPO where ebeln = PO number

-Kiran

0 Kudos

Check table <b>EKPO.</b> EBELN is nothing but PO

SO <b>SELECT EBELP FROM EKPO WHERE EBELN = PO-NUMBER.</b>

Regards,

Santosh

laxmanakumar_appana
Active Contributor
0 Kudos

Hi,

check the table EKPO

Laxman

Manohar2u
Active Contributor
0 Kudos

You can refer to.

EKPO-EBELN ( Purchasing Document Number )

EKPO-EBELP (Item Number of Purchasing Document)

Regds

Manohar

Former Member
0 Kudos

If the delivery is created with reference to the PO, then you will find the PO number and the PO line item number in the fields LIPS-VGBEL and LIPS-VGPOS.

Former Member
0 Kudos

LIKP-VBLEN stores the delivery number. I don't think so it it ever store the purchase order number. Please let know if i am wrong.

0 Kudos

Hi,

Let me be more clear.

I have to find item number of the underlying purchase order (POSEX).

So based on VBELN of LIKP table I have to find POSEX from VBAP table.

( I guess I need to find subsequent or preceding document stuff. I am not so sure about it. And then

based on that I go in VBAP and find POSEX )

<b>So what is the link between LIKP and VBAP table...</b>

0 Kudos

VBAK and VBAP are the <u>sales order</u> header and item tables. They are not PO tables. PO tables are EKKO and EKPO. If you need the preceding and subsequent documents in sales, you are talking about document flow. You can get that from VBFA or RV_FLOW function module.

0 Kudos

The same fields I gave you will have the sales order number(VBAK-VBELN) and the item(VBAP-POSNR) values.

0 Kudos

hi Tushar,

Download this LInk and check for the relation in SD column..

http://www.sap-img.com/sap-download/sap-tables.zip

Regards,

Santosh

0 Kudos

Hello Tushar,

You can use VBFA table to track back the preceding doucument. If you unable to track it back let me know. how to do it.

Regards,

Amit

0 Kudos

> VBAK and VBAP are the <u>sales order</u> header and

> item tables. They are not PO tables. PO tables are

> EKKO and EKPO. If you need the preceding and

> subsequent documents in sales, you are talking about

> document flow. You can get that from VBFA or RV_FLOW

> function module.

So you did not find it in VGBEL and VGPOS or VBELV and POSNV?

Former Member
0 Kudos

Please close if answered.

Thanks.