BOM FM "CS_BOM_EXPL_MAT_V2"

Hi,
The FM in the sunject line returns 2 tables 'STB' and 'MATCAT'. Can anyone please let me know what kind of data is returned in these two tables if the import parameters are entered as follows:
CAPID = ' '
DATUV = today's date
STLAL = 1 (alternate BOM)
STLAN = 3 (bom usage)
MTNRV = material #
What output is to be expected if the BOM components for the above material were deleted. Will STB still be populated with the original BOM components. I tested the FM but got conflicting outputs for different materials.
Any help would be appreciated.
Thanks,
Urmila

Hi Urmila,
Shrinivas is correct.
Function module can be used as follows -
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
    EXPORTING
      auskz                 = ' '
      capid                 = 'PP01'
      datuv                 = sy-datum
      emeng                 = '1.000'
      stlan                 = '1'
      mtnrv                 = matnr
      mehrs                 = 'X'
      mmory                 = '1'
      stpst                 = '0'
      werks                 = werks
    IMPORTING
      topmat                = selpool
      dstst                 = dstst_flg
    TABLES
      stb                   = i_stb
      matcat                = i_matcat
    EXCEPTIONS
      material_not_found    = 4
      no_plant_data         = 8
      no_bom_found          = 12
      no_suitable_bom_found = 16.
Tables i_stb and i_matcat should be of STPOX
CSCMAT types respectively.
Hope this helps.
Warm Regards.
Pras Durafe

Similar Messages

  • BOM Explosion (CS_BOM_EXPL_MAT_V2) - inactive alternative BOM

    Hi,
    I need to display the alternative BOM entered in the selection screen even if the entered alternative is inactive. i.e. status is inactive. i have used FM - CS_BOM_EXPL_MAT_V2.
    Kindly advise.
    Regards.

    Using Function module  CS_BOM_EXPL_MAT_V2
    As already has been said, the RNDKZ field is used for rounding. If you fill with '1', it will never round.
    Example (the problem I had):
    Material A consist of et al. 0.008 piece Material AA.
    Material AA consist of 1.0 pice Material AAA,
                                  of 7.0 piece Material AAB,
                                  of 6.0 piece Material AAC,
                                  of 12.0 piece Material AAD.
    CASE 1: You fill RNDKZ field with '1':
    You get the correct result which is:
    You need for producing 1 piece of Material A
    0.008 piece Material AA,
    0.008 * 1 = 0.008 piece of Material AAA,
    0.008 * 7.0 = 0,056 piece of Material AAB,
    0.008 * 6.0 = 0,048 piece of Material AAC.
    0.008 * 12.0 = 0,096 piece of Material AAD.
    CASE 2: You let RNDKZ field blank.
    In your user profile for BOM  field "Round of" is set to blank (table field TCSPR-AMEKZ, TA S_ALR_87004496).
    You get following result (which is wrong)
    You need for producing 1 piece of Material A
    1 piece Material AA,
    1.0 *1.0 = 1.0 piece of Material AAA,
    1.0 * 7.0 = 7.0 piece of Material AAB,
    1.0 *  6.0 = 6.0 piece of Material AAC.
    1.0 * 12.0 = 12.0 piece of Material AAD.
    The number of decimals is seen depends as well from how many decimals is set for unit of measurement. In this case the number of decimals for "piece" was set to zero. (TA CUNI).
    If you let the field RNDKZ field blank, the user profile field "Round of" (table field TCSPR-AMEKZ) is used.

  • How to get inactive BOM by using FM?

    dear all,
    we are used to get BOM list by using FM 'CS_BOM_EXPL_MAT_V2 ';
    but when there is a inactive BOM,FM 'CS_BOM_EXPL_MAT_V2 '  can only be used to get the first level materials,
    pls tell me how can i resolve this problem,or there may be an another FM for this situation?
    tks!
    Edited by: snow zeng on Dec 22, 2009 10:29 AM

    haha,that's a solution:
    CS11- BOM explosion with status inactive

  • How to explode engineering BOM

    Hello,
    I have created one engineering BOM with BOM Usage "2"
    How to explode this engineering BOM. I am not able to explode same in CS11, CS12 OR CS13.
    Kindly suggest some other method

    Dear,
    In CS11 transaction, click on view button(button next to Execute)or F5. In Restrict view data area, check Engineering.
    click on back button. specify BOM application(you can try with PP01) and Execute.
    Please refer this link
    http://help.sap.com/saphelp_45b/helpdata/en/4c/227ad246e611d189470000e829fbbd/content.htm
    Try with CN33
    Or try with these FM
    CS_BOM_EXPLOSION "for BOM´s
    CS_BOM_EXPL_MAT_V2 "for materialBOM´s
    Regards,
    R.Brahmankar
    Edited by: R Brahmankar on Nov 19, 2008 1:23 PM

  • Class type in material BOM

    Hello,
    I nee to insert a new material into a sub-BOM of an exploded BOM. A material class is important to insert under the precise sub-BOM.
    I would use a class type to find where to insert the new material but when I get an exploaded BOM with CS_BOM_EXPL_MAT_V2, the fields CLASS and CLART for the sub-items are empty.
    How else could I get a BOM with class information?

    I don't think the CLASS and KLART fields of the structure STPOX refer to the material class. They refer to the BOM item classification. If you have classification for the materials but not at the BOM item level, then you will not see them here. You will have to code for it.
    Srinivas

  • To get the CS12 data

    Hi Experts,
    Is there any function module  available to get the CS12 data based on ( material, plant, Bom application (sd01-sales and Distribution).
    Please let us know. it would be helpful for me.
    Thnx,
    Sam.

    Try this :
    CS_BOM_EXPL_MAT_V2 
    Re: Material BOM Explosion
    what do you mean by exploding a BOM?and how to do it.?
    Re: BOM FM "CS_BOM_EXPL_MAT_V2"
    Regards
    Neha

  • Urgent: please reply

    Hi All,
    Can anyone please give me any BAPI to explode BOM in DMS (Dispute Management Syatem).
    Please help
    Thanks.

    hi,
    i dont know if thgis helps you but exploding BOM´s i use following 3 FM´s
    CS_BOM_EXPLOSION "for BOM´s
    CS_BOM_EXPL_MAT_V2 "for materialBOM´s
    CS_BOM_EXPL_KND_V1 "for customeroderBOM´s
    BAPI_MATERIAL_BOM_GROUP_CREATE " for create BOM
    DMU_DOC_BOM_EXPLODE &,
    DMU_MAT_BOM_EXPLODE &
    CIF_BOM_EXPLODE
    thanks
    reward points if helpful....
    Message was edited by:
            Velmurugan

  • How to use CS_BOM_EXPL_MAT_V2  to include bom under Phantom

    Hi every1,
    How can I get documentation for this function module CS_BOM_EXPL_MAT_V2 
    We want to explode BOM on single level ,including Material which is coming under Phantom assembly too.
    eg. I have one material 1xxxxx.
    after exploding single level bom suppose I'll get these material
    1xxxx1
    1xxxx2
    1xxxx3 and if 1xxxx3 is Phantaom assembly and under this item again I may have 1xxxx1 as bom item.
    that means for my parent material 1xxxxx, I want 1xxxx1 should come 2 times !
    Is there any simpliest way to get or for this item again I need to use this FM again ?
    Pl. do help me.
    Thanks in Advance.

    Hi,
    THE FM 'CS_BOM_EXPLOSION_MAT' mentioned above holds true if u dont hv any alternatives for the BOM.
    eg: If ur component in turn has BOM with 3 alternatives namely 01,02,03
    then ideally FM should pick all the items uder these 3 components but this FM picks by default the 1st
    alternative & ignores the rest.
    So there are changes dat the list which u hv gpt is not 100%.          
      Through Tcode CS12 u can see the level wise components for a BOM.
    U can gather the component details with this Tcode if u hv very few BOMs to explore.
    But if the count is higher u hv to select acoding way for it....
    Attaching a part of code to explore multilevel BOM.....hope dis ll help u......
    1 ST LEVEL
      SELECT MATNR  WERKS  STLNR  IDNRK  STLAL
            FROM ZMAT_PLANT
           INTO TABLE IT_BOM
           FOR ALL ENTRIES IN IT_INPUT    **maintain materials to be explored in IT_INPUT
           WHERE WERKS = IT_INPUT-WERKS AND
                 MATNR = IT_INPUT-MATNR.
      CONCATENATE DOWNLOAD
                  '1_FILE'
                  '.TXT'
                  INTO DOWNLOAD1.
      LOOP AT IT_BOM ASSIGNING <FS_BOM>.
        MOVE <FS_BOM>-MATNR TO IT_CHECK_MAT-MATNR.
        MOVE <FS_BOM>-WERKS TO IT_CHECK_MAT-WERKS.
        APPEND IT_CHECK_MAT.
        COUNT = COUNT + 1.
      ENDLOOP.
      SORT IT_CHECK_MAT BY MATNR WERKS.
      DELETE ADJACENT DUPLICATES FROM IT_CHECK_MAT COMPARING MATNR WERKS.
    2 ND LEVEL
      IF NOT IT_BOM[] IS INITIAL.
        SELECT *
             FROM ZCOMPONENTS
             INTO TABLE IT_STPO
                   FOR ALL ENTRIES IN IT_BOM
                   WHERE MATNR = IT_BOM-IDNRK AND
                         WERKS = IT_BOM-WERKS.
      ENDIF.
      SORT IT_STPO BY MATNR WERKS.
      CONCATENATE DOWNLOAD
                  '2_FILE'
                  '.TXT'
                  INTO DOWNLOAD1.
      LOOP AT IT_STPO ASSIGNING <FS_STPO>.
       MOVE <FS_STPO>-MATNR TO IT_CHECK_MAT-MATNR.
        MOVE <FS_STPO>-WERKS TO IT_CHECK_MAT-WERKS.
        APPEND IT_CHECK_MAT.
        COUNT = COUNT + 1.
      ENDLOOP.
      UNASSIGN <FS_STPO>.
      SORT IT_CHECK_MAT BY MATNR WERKS.
      DELETE ADJACENT DUPLICATES FROM IT_CHECK_MAT COMPARING MATNR WERKS.
      SORT IT_STPO BY IDNRK WERKS.
      LOOP AT IT_STPO.
        READ TABLE IT_CHECK_MAT WITH KEY MATNR = IT_STPO-IDNRK
                                         WERKS = IT_STPO-WERKS
                                              BINARY SEARCH.
        IF SY-SUBRC <> 0.
          MOVE IT_STPO-IDNRK TO IT_STPO1-MATNR.
          MOVE IT_STPO-WERKS TO IT_STPO1-WERKS.
          APPEND IT_STPO1.
        ENDIF.
        COUNT = COUNT + 1.
      ENDLOOP.
    REGARDS ,
    AJIT.
    Edited by: AJIT THAKUR on Apr 16, 2009 10:51 AM
    Edited by: AJIT THAKUR on Apr 16, 2009 10:54 AM

  • Use of CS_BOM_EXPL_MAT_V2 fro BOM explosion on plant basis

    hello ,
       I dont have any documentation for this FM and need to use it for BOM explosion on plant basis plz let me knw how to use it?

    Try something like this :
    *     Tables  "call CS_BOM_EXPL_MAT_V2 "
    DATA: BEGIN OF t_stb OCCURS 0.
            INCLUDE STRUCTURE stpox.
    DATA: END OF t_stb.
    DATA: BEGIN OF matcat OCCURS 50.
            INCLUDE STRUCTURE cscmat.
    DATA: END OF matcat.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          auskz                 = ' '
          capid                 = 'PP01'
          datuv                 = sy-datum
          emeng                 = '1.000'
          stlan                 = '1'
          stlal                 = mast-stlal
          mtnrv                 = matnr
          mehrs                 = 'X'
          mmory                 = '1'
          stpst                 = '0'
          werks                 = werks
        IMPORTING
          topmat                = selpool
          dstst                 = dstst_flg
        TABLES
          stb                   = stb
          matcat                = matcat
        EXCEPTIONS
          material_not_found    = 4
          no_plant_data         = 8
          no_bom_found          = 12
          no_suitable_bom_found = 16.
    Hope this helps,
    Erwan

  • Multi-level BOM explosion using CS_BOM_EXPL_MAT_V2

    Hi All,
    I would like to know, if anyone has used the function module 'CS_BOM_EXPL_MAT_V2' to prepare a report to read multi-level BOM just like CS12. If anyone has, can you please let me know how we can read the individual materials in the BOM from this FM.
    Hope my question is clear, await inputs.
    Vivek

    Hi vivek,
    We use this code to restrict the BOM line item for particular movements. C if that can help u out.
    CALL FUNCTION 'CS_BOM_EXPL_KND_V1'
        EXPORTING
          capid                       = ''
          datuv                       = sy-datum
          emeng                       = 1
         mehrs                       = 'X'
          mtnrv                       = i_mseg-matnr
          stlal                       = '1'
          stlan                       = '1'
          stpst                       = 0
          svwvo                       = 'X'
          werks                       = i_mseg-werks
          vbeln                       = aufk-kdauf
          vbpos                       = aufk-kdpos
            VERID                       = ' '
          vrsvo                       = 'X'
          IMPORTING
            TOPMAT                      =
            DSTST                       =
         TABLES
           stb                         = ZStb
            MATCAT                      =
        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 sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT zstb BY mtart.
      LOOP AT zstb.
        IF zstb-mtart = 'Material type ' OR zstb-mtart = 'Material type ' .
        ELSE.
          DELETE zstb .
        ENDIF.
      ENDLOOP.
      CLEAR: v_menge, v_matnr, v_bwart, vv_menge, vvv_menge, zstb.
      LOOP AT zstb.
        SELECT menge matnr bwart
        INTO   (v_menge,v_matnr,v_bwart)
        FROM   aufm
        WHERE  aufnr = i_mseg-aufnr
        AND    werks = i_mseg-werks
        AND    matnr = zstb-idnrk
        AND    ( bwart = '261' OR bwart = '262' ).
              and    meins = 'FT2'.
         LOOP AT zstb.
          SELECT SINGLE matnr INTO vv_matnr FROM mara  WHERE  matnr = v_matnr
                                       AND mtart = zstb-mtart.
          IF sy-subrc = 0.
            CASE v_bwart.
              WHEN '261' .
                vv_menge = vv_menge + v_menge.
              WHEN '262' .
                vvv_menge = vvv_menge + v_menge.
            ENDCASE.
          ENDIF.
             ENDLOOP.
        ENDSELECT.
        CLEAR vf_menge.
        vf_menge = vv_menge - vvv_menge.
        CLEAR vv_menge.
        CLEAR vvv_menge.
    Regards,
    Vishal

  • BOMs not retrieved correctly from FM CS_BOM_EXPL_MAT_V2

    Hi All,
    I am using the FM CS_BOM_EXPL_MAT_V2 passing the following parameters.
    We are able to fetch most of the BOMs from this FM except for the records with valid to date <  sy-datum.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
       EXPORTING
         aumgb                       = 'X'
         capid                      = 'ZP01'
         datuv                      = p_date
         ehndl                       = '1'
         mbwls                       = 'X'
         mehrs                       = 'X'
         mmory                       = '1'
         mtnrv                        = p_matnr
         werks                        = p_werks
         vrsvo                      = 'X'
    IMPORTING
       topmat                      = ls_cstmat
      DSTST                       =
        TABLES
          stb                       = gt_stb
          matcat                    = gt_cscmat
    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
    Please guide me if I am going wrong anywhere or if there is anyother FM to achieve this.

    Hi,
    I guess the parameter datuv = p_date is sy-datum in ur program. It is actually valid from date so you will get all BOM greater than sy-datum.
    Try not giving the date paramter. If still it does not work u can also use the FM CSAP_MAT_BOM_READ but FM CS_BOM_EXPL_MAT_V2 is more commonly used.
    Regards,
    Vasanth

  • BOM: Problem using CS_BOM_EXPL_MAT_V2 -  URGENT!!!

    hai friends,
    i am using CS_BOM_EXPL_MAT_V2 fn module in my code. when i pass mtnrv = 'GK02PB.05SBIS' , i did' get any output from the above fn module. but other than the above value like mtnrv = 'OSA875CCWOF' ,i am getting output.
    thanks in advance,
    With regards,
    senthil kumar.r

    Hi senthil,
    1. I suppose u want to explode the BOM.
    2. CS_BOM_EXPLOSION
       use the above FM
       in the below mentioned fashion.
    3.
      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
    regards,
    amit m.

  • BOM Explosion using Function 'CS_BOM_EXPL_MAT_V2 '

    Hi Gurus,
    I am working on BOM and exploding the multilevel BOM using function CS_BOM_EXPL_MAT_V2.
    I want to know what does 'field-RNDKZ' do in that.
    Thanks!

    Using Function module  CS_BOM_EXPL_MAT_V2
    As already has been said, the RNDKZ field is used for rounding. If you fill with '1', it will never round.
    Example (the problem I had):
    Material A consist of et al. 0.008 piece Material AA.
    Material AA consist of 1.0 pice Material AAA,
                                  of 7.0 piece Material AAB,
                                  of 6.0 piece Material AAC,
                                  of 12.0 piece Material AAD.
    CASE 1: You fill RNDKZ field with '1':
    You get the correct result which is:
    You need for producing 1 piece of Material A
    0.008 piece Material AA,
    0.008 * 1 = 0.008 piece of Material AAA,
    0.008 * 7.0 = 0,056 piece of Material AAB,
    0.008 * 6.0 = 0,048 piece of Material AAC.
    0.008 * 12.0 = 0,096 piece of Material AAD.
    CASE 2: You let RNDKZ field blank.
    In your user profile for BOM  field "Round of" is set to blank (table field TCSPR-AMEKZ, TA S_ALR_87004496).
    You get following result (which is wrong)
    You need for producing 1 piece of Material A
    1 piece Material AA,
    1.0 *1.0 = 1.0 piece of Material AAA,
    1.0 * 7.0 = 7.0 piece of Material AAB,
    1.0 *  6.0 = 6.0 piece of Material AAC.
    1.0 * 12.0 = 12.0 piece of Material AAD.
    The number of decimals is seen depends as well from how many decimals is set for unit of measurement. In this case the number of decimals for "piece" was set to zero. (TA CUNI).
    If you let the field RNDKZ field blank, the user profile field "Round of" (table field TCSPR-AMEKZ) is used.

  • Using CS_BOM_EXPL_MAT_V2 how to find last children of material in the bom.

    Hi,
    I want to find last children of a material.I am using FM CS_BOM_EXPL_MAT_V2. Although STPOX internal table as STUFE for level but we can't get all the last child of material directly.
    For example material A as child A1 and A2 this sub divided into A1- A11, A12 and A2 - A21 , A22 and again A21 -A211,A212 and A22 - A221,A222
    so the last children are A11,A12,A211,A212,A221,A222. So if we use max of STUFE it will omit A11 and A12.Do i need to program a custom logic to get last child using Stufe and WEGXX or is there any other method available to get Last Children of the Material or is there any other Function module to get the Last child of the material.
    Thanks in Advance.

    You will have to write your own custom logic after calling the function module.  In my case, it is easy, because the lowest level materials will always be raw materials(material type ZROH) as opposed to a semi-finished material(material type HALB).  Your's may be different.
    REgards,
    Rich Heilman

  • In bom explosion afterthat i ll get routing ,workcenter.plnnr ,plnty = n

    Hi Experts
            my requirement is to explode the bom like cs12 tcode in pp
    after that we ll find which component is having routing ,then we pick the
    workcenter if the material procurement type is E OR X.
    HERE I AM USING MARC,MAPL,PLPO,CRHD.
    1.USING CS_BOM_EXPL_MAT_V2 TO EXPLODE THE BOM
    MARC      IF BESKZ = E OR
         ===>  BESKZ = X     ==> MAPL
    MATNR                        MATNR
    WERKS                        PLNTY
    BESKZ                        PLNNR
                                 PLPO
                    PLNTY
                     PLNNR
                    VORNR
                     ARBID--CRHD
                     LTXA1  OBJID
                    VGE01  ARPBL
                    VGW01
                   VGW02
                    WERKS
    HERE WE USED TO GET BESKZ = X OR E
    AFTER THAT COMAPARE MARC-MATNR = MATNR & ISTPO-IDNRK
    MAPL AND PLPO HERE WE USED TO RELATE BETWEEN PLNNR
                                           PLNTY = 'N'
    109013030 IS THE HEADER MATERIAL HAVE THE FOLLOWING BOM
    .1  610001440
    ..2 L021000260
    .1  912500076
    HERE .1 - LEVEL 1,..2 LEVEL 2.
    USING CA03 TO GIVE THE MATERIAL WE GOT THE OPERATIONS AND WORKCENTER
    IN TABLE MAPL , GIVE THE MATNR AND PLANT ,PLNNR
    AFTER THAT I RELATE THE PLNNR TO PLPO
    FETCH ALL THE RELEVANT FIELDS FIVE OPERATIONS CAME
    BUT IN CA03 THE SAMEMATEIALS GIVE ONLY 3 OPERATIONS ONLY CAME
    how can i sove this issue.
    very urgent
    thanks in advance
    Regards
    ds

    HI
         MARC ,MAPL only having the plnnr,plnty
    not having vornr,stues
    plpo is having all the fields
    how can i pass plnnr with vornr,stues,vornr to plpo
    Regards
    ds

Maybe you are looking for

  • Bridge cache files for different bridge versions

    Bridge with CS2 and now CS3 is a superb image browsing tool - particularly when the cache files are within the directory containing the images. It would be very very useful if new versions of bridge could read older version cache files. If a user cre

  • OGG for SQL Server - Extract stops capturing - Bug?

    Hi, all, I've found a problem with OGG for SQL Server where the Extract stops capturing data after the transaction log is backed up. I've looked for ways to reconfigure OGG to avoid the problem but couldn't find any reference to options to workaround

  • Flash media encoder is not responding

    I stream video games and i occasionaly get this message which goes away afte few seconds. Please help. Windows 7 x64 FME version 2.5 withvhscrcap Also my speedtest http://www.speedtest.net/result/1257248545.png <?xml version="1.0" encoding="UTF-16"?>

  • Unable to connect to home network on my iPad 2.

    It's been working fine, until this morning. I reset the router (linksys), turned off MAC filtering. Wi-fi settings show "home", but Safari says not connected.

  • Loop slows down when certain parts of screen are active

    Hi, I've noticed that one of my loops, which is set to run at 50ms, slows down significantly when certain other parts of the screen are active. We have a dual screen setup where on the left side we have a bunch of controls and I'm also displaying the