Application Development and Automation 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: 
Read only

component number

Former Member
0 Likes
755

hi everybody

I have to retrive the component numbe of a purchase order and sales order

i tried to look in the tables ekpo and vbap,but couldnt find it

does anybody know from wich tables or fm i can get the component number

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
720

Hi,

Do you mean BOM component?

if yes then look at STPO-IDNRK field.

Rgds,

HR

5 REPLIES 5
Read only

Former Member
0 Likes
720

hi,

do u mean to say, item number..?

Read only

0 Likes
720

no no, component number of a material

Read only

Former Member
0 Likes
720

Am not sure with your requirement...

With my guess it can be two ways...

1. Item referred as Component, then field will be VBAP-MATNR.

2. Incase of BOM Component, in this case also it will be VBAP-MATNR where NOT UEPOS is INITIAL and Highlevel item is BOM i.e NOT VBAP-STLNR is INITIAL where VBAP-POSNR = UEPOS from first condition.

Hope the above info helps you.

Kind Regards

Eswar

Read only

0 Likes
720

Maybe this query can help you simplify things incase of retereiving all BOM Components in Sales Order:

select matnr into table it_comp
       from vbap
       where vbeln in s_vbeln
       and   stlnr ne space
       and   uepos ne '00000'.

Kind Regards

Eswar

Read only

Former Member
0 Likes
721

Hi,

Do you mean BOM component?

if yes then look at STPO-IDNRK field.

Rgds,

HR