7 Replies Latest reply: Aug 17, 2010 1:03 PM by Shobana k RSS

FM to fetch the BOMs

Shobana k
Currently Being Moderated

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

  • Re: FM to fetch the BOMs
    Anup Kumar
    Currently Being Moderated

    check this CS_BOM_EXPL_EQU_V2 or

    try this CS_WHERE_USED_MAT

  • Re: FM to fetch the BOMs
    AMIT BISHT
    Currently Being Moderated

    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.

  • Re: FM to fetch the BOMs
    Sunil Reddy
    Currently Being Moderated

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

     

    CS_BOM_EXPL_MAT_V2

     

  • Re: FM to fetch the BOMs
    pr murthy
    Currently Being Moderated

    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.

  • Re: FM to fetch the BOMs
    Shobana k
    Currently Being Moderated

    solved

Actions