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: 

FM to fetch the BOMs

Former Member
0 Kudos

Hi ,

I have requirement to fetch the BOMs for a particular material, plant, BOM usage, date range(valid from and valid to date), change number combination. I am using the FM CSAP_MAT_BOM_READ where i am able to give the above conditions but it is not considering the date range.

Is there any other FM which i can use with these conditions???

Regards,

Shobana.K

1 ACCEPTED SOLUTION

Former Member
0 Kudos

check this CS_BOM_EXPL_EQU_V2 or

try this CS_WHERE_USED_MAT

7 REPLIES 7

Former Member
0 Kudos

check this CS_BOM_EXPL_EQU_V2 or

try this CS_WHERE_USED_MAT

Former Member
0 Kudos

Hi Shobhana,

CSAP_MAT_BOM_READ

You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.

For Example.

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,

Amit.

Former Member
0 Kudos

Use this Function module,it willl get the multilevel BOM as well.

CS_BOM_EXPL_MAT_V2

Former Member
0 Kudos

Hi,

Use the function module below.

FM. CS_BOM_EXPL_MAT_V2

The required fields for this function module are :

Material

Plant

Date

Application(CAPID)

Values for CAPID can be found in table TC04

For production BOM it is PP01 .

Hope this information will help you.

Murthy.

0 Kudos

I have tried this FM CS_BOM_EXPL_MAT_V2 but it does not have a data range that i need to specify. and the FM CSAP_MAT_BOM_READ is not taking the date range into consideration. Can anyonne suggest me someother way or any other FM available for this.

0 Kudos

<copy&paste_removed_by_moderator>

Edited by: Julius Bussche on Sep 18, 2008 6:44 PM

Former Member
0 Kudos

solved