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

How to Explode a Bill of Materials using a Function Module?

Former Member
0 Likes
825

Hallo,

I am trying to find a suitable FM to write the contents of a BOM into an internal table to then be displayed an a screen. There are literally hundreds of FM's but the ones I have looked at just don't seem to be what I'm after.

Does anyone have experience with exploding BOMs? (Sounds dangerous!)

Thanks in advance,

Have a nice day.

Mike

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
805

Hi Mike,

Use this FM <b>CS_BOM_EXPL_MAT_V2</b> to get BOM for a material.

Regards,

Balavardhan.K

Hi Mike,

Use this FM <b>CS_BOM_EXPL_MAT_V2</b> to get BOM for a material.

Regards,

Balavardhan.K

4 REPLIES 4
Read only

Former Member
0 Likes
806

Hi Mike,

Use this FM <b>CS_BOM_EXPL_MAT_V2</b> to get BOM for a material.

Regards,

Balavardhan.K

Read only

Former Member
0 Likes
805

Hi,

<b>CSAP_MAT_BOM_READ</b>, You can use this function module to display simple material BOMs

data: begin of tstk2 occurs 0.
          include structure stko_api02.
data: end of tstk2.
 
data: begin of tstp2 occurs 0.
          include structure stpo_api02.
data: end of tstp2.
 
 
data: begin of tdep_data occurs 0.
         include structure csdep_data.
data: end of tdep_data.
 
data: begin of tdep_descr occurs 0.
         include structure csdep_descr.
data: end of tdep_descr.
 
data: begin of tdep_source occurs 0.
         include structure csdep_source.
data: end of tdep_source.
 
data: begin of tdep_order occurs 0.
         include structure csdep_order.
data: end of tdep_order.
 
data: begin of tdep_doc occurs 0.
         include structure csdep_doc.
data: end of tdep_doc.
 
data: flg_warning like capiflag-flwarning.
 
   call function 'CSAP_MAT_BOM_READ'
        exporting
             material   = 'MAT100'
             plant      = '0001'
             bom_usage  = '1'
             valid_from = '20.12.1996'
*            valid_to
        importing
             fl_warning = flg_warning
        tables
             t_stko       = tstk2
             t_stpo       = tstp2
             t_dep_data   = tdep_data
             t_dep_descr  = tdep_descr
             t_dep_source = tdep_source
             t_dep_order  = tdep_order
             t_dep_doc    = tdep_doc
        exceptions
             error      = 1.

Regards

Sudheer

Read only

Former Member
0 Likes
805

Hi!

Have you checked the transaction CS11? This is a multi-level BOM report.

Unfortunately it is working only for one material, but you might steal some ideas from this program...

Regards

Tamá

Read only

Former Member
0 Likes
805

Hi everyone,

thanks for your answers - my points go to Balavardhan K because his FM really works and is perfect for my application.

Have a nice day.

Best wishes

Mike