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

BOM

Former Member
0 Likes
551

Hi all,

is there any function module to find which item(bom) the given material belongs to,how to find this.

thanks in advance

siva

4 REPLIES 4
Read only

Former Member
0 Likes
522

try this fm

CS_BOM_EXPL_MAT_V2

here

CAPID = application id

datuv = sy-datum

mehrs = 'X' ' for multi level bom

mtnrv = header material no

werks = plant.

and you can try also fm CS_WHERE_USED_MAT.

regards

shiba dutta

Read only

0 Likes
522

hi

thanx for ur reply, how can we find application id

Read only

0 Likes
522

go to cs12 tcode there the application area field is there just for exploding the bom there what value you are giving that is the application id. In my company it is PP01 for pp.

regards

shiba dutta

Read only

Former Member
0 Likes
522

Hi,

Try FM: CSAP_MAT_BOM_READ.

First hit against the MAST table with the material number. Then hit against STPO with the internal BOM number to get the components. There are also some function modules that will do this to.

data: xmast type mast.

data: istpo type table of stpo with header line.

Select Single * from mast

where matnr = p_matnr.

If sy-subrc = 0.

Write:/ 'This material has a BOM'.

else.

Write:/ 'No BOM found'.

Endif.

write:/ 'Components'.

select * into corresponding fields of table istpo

from stpo

where stlnr = xmast-stlnr.

loop at istpo.

write:/ istpo-idnrk.

endloop.

Regards