Skip to Content
author's profile photo
Former Member

how to get BOM level info from cs_where_used_mat

hi guys,

I'm doing a report using cs_where_used_mat to retrieve upper level component.

please advise how to get multiple level (like what we can do in cs15) from cs_where_used_mat?

thanks & regards,

BK.

Add comment
10|10000 characters needed characters exceeded

5 Answers

  • author's profile photo
    Former Member
    Posted on Jul 31, 2007 at 10:12 AM

    hi,

    try the function module "CSAP_MAT_BOM_OPEN".

    regards,

    Navneeth K.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Jul 31, 2007 at 10:22 AM

    Hi ,

    Use this FM , and give the parameters .

    This will give least level( how many level it have ) of component of perticular material.

    CALL FUNCTION 'CK_F_CSTG_STRUCTURE_EXPLOSION'

    EXPORTING

    klvar = keko-klvar

    kalnr = keko-kalnr

    kadky = keko-kadky

    tvers = keko-tvers

    werk = p_bwkey

    sicht = '01'

    s_losgr = 'X'

    s_bezugsmenge = keko-losgr

    s_aufloesungstiefe = '0'

    s_read_only_db = 'X'

    s_only_mat_pos = 'X'

    s_skip_totals = 'X'

    TABLES

    strukturtabelle = sa_tabin

    EXCEPTIONS

    invalid_bzobj = 1

    keko_not_found = 2

    meta_model_error = 3

    ckhs_not_found = 4

    OTHERS = 5 .

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 31, 2007 at 04:46 PM

    Use CS_BOM_EXPL_MAT_V2, search the forum for sample code using that function module name.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Jul 31, 2007 at 11:49 PM

    Try this. This is what I am using to get multi-level BOM explosion. export parameter says that this is a multi level BOM when set. Please comment stpst in the export parameter.

    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

    EXPORTING

    capid = 'PP01'

    datuv = sy-datum

    mtnrv = wa_mast-matnr

    mehrs = 'X'

    stlan = wa_mast-stlan

    stlal = wa_mast-stlal

    werks = wa_mast-werks

    ehndl = '1'

    mmory = '1'

    • stpst = 1

    TABLES

    stb = it_stb

    EXCEPTIONS

    alt_not_found = 1

    call_invalid = 2

    material_not_found = 3

    missing_authorization = 4

    no_bom_found = 5

    no_plant_data = 6

    no_suitable_bom_found = 7

    conversion_error = 8

    OTHERS = 9.

    if you want to use the same function module for a purticular level of BOM say just for the first level then remove MEHRS and add STPST = 1.

    Thanks.

    MGS.

    Message was edited by:

    mg s

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 01, 2007 at 09:42 AM

    thank you guys, i'll try the options given here and update to you.

    Add comment
    10|10000 characters needed characters exceeded