Skip to Content
author's profile photo Former Member
Former Member

usage of function module for BOM

Hi all you guys

i am new to this group

and i am in a real bad situation.

i have to use a function module for BOM

which should give me the BOM materials for all the levels.

i know that there are two three function modules for this i.e.

1) dmu_mat_bom_explode

2) DMU_DOC_BOM_EXPLODE

3) CO_MP_BOM_READ

but i am not able to use any one of them .

actually i am not getting how to use them .

please help me as early as possible i am in a real need.

i want to know that what we should give in the import,export and tables parameters.

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2006 at 08:48 AM

    Hi Ujjwal,

    Use CS_BOM_EXPLOSION FM.

    CALL FUNCTION 'CS_BOM_EXPLOSION'

    EXPORTING

    capid = 'PP01'

    datuv = SY-DATUM

    mtnrv = <Pass Material for which u want detail component>

    werks = <werks>

    mehrs = 'X' " For Multiple level

    TABLES

    stbd = stbd

    stbe = stbe

    stbk = stbk

    stbm = stbm

    stbp = stbp

    stbt = stbt

    EXCEPTIONS

    alt_not_found = 1

    call_invalid = 2

    missing_authorization = 3

    no_bom_found = 4

    no_plant_data = 5

    no_suitable_bom_found = 6

    object_not_found = 7

    conversion_error = 8

    OTHERS = 9.

    Afetr Passing capid,datuv,mtnrv,werks,mehrs values, FM will build STBP Table Which comntain all comnponents related to ur STLNR.

    Regards,

    Digesh Panchal

    Note : Please reward points, if it solve ur problem

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2006 at 07:56 AM

    Hi ujjwal,

    1. Welcome to SDN.

    2. use like this.

    DATA : stbd LIKE TABLE OF csxdoc ,

    stbe LIKE TABLE OF csxequi ,

    stbk LIKE TABLE OF csxkla ,

    stbm LIKE TABLE OF csxmat ,

    stbp LIKE TABLE OF csxgen ,

    stbt LIKE TABLE OF csxtpl .

    CALL FUNCTION 'CS_BOM_EXPLOSION'

    EXPORTING

    capid = 'PP01'

    emeng = bmeng

    datuv = sy-datum

    mtnrv = matnr

    stlan = '1'

    werks = werks

    mehrs = 'X'

    • IMPORTING

    • TOPEQUI =

    • TOPMAT =

    • TOPTPL =

    • DSTST =

    TABLES

    stbd = stbd

    stbe = stbe

    stbk = stbk

    stbm = stbm

    stbp = stbp

    stbt = stbt

    EXCEPTIONS

    alt_not_found = 1

    call_invalid = 2

    missing_authorization = 3

    no_bom_found = 4

    no_plant_data = 5

    no_suitable_bom_found = 6

    object_not_found = 7

    conversion_error = 8

    OTHERS = 9

    .

    3. the parameter above

    mehrs = 'X'

    will explode the bom at all levels.

    4. Then use data like this.

    DATA : stbp_wa LIKE LINE OF stbp.

    LOOP AT stbp INTO stbp_wa.

    .

    .

    .

    endloop.

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded