‎2006 Oct 09 11:24 AM
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
‎2006 Oct 09 11:31 AM
Hi,
Do you mean BOM component?
if yes then look at STPO-IDNRK field.
Rgds,
HR
‎2006 Oct 09 11:27 AM
‎2006 Oct 09 11:28 AM
‎2006 Oct 09 11:30 AM
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
‎2006 Oct 09 11:46 AM
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
‎2006 Oct 09 11:31 AM
Hi,
Do you mean BOM component?
if yes then look at STPO-IDNRK field.
Rgds,
HR