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.

Similar Messages

  • BOM explosion using CS_BOM_EXLP_MAT_V2.

    Hi All,
       i am using FM :- CS_BOM_EXLP_MAT_V2 for the BOM explosion, but the problem is when the material is exploid i get the component of that material according to the plant but the some component which i get have no more list component in the same plant,but that component have the list component in the other like with other component, so i am not able to list out how much deep i have to go in the hierarchy .
    Thanks in advance.
    Regards,
    Ritesh Jha

    Hi All,
       i am using FM :- CS_BOM_EXLP_MAT_V2 for the BOM explosion, but the problem is when the material is exploid i get the component of that material according to the plant but the some component which i get have no more list component in the same plant,but that component have the list component in the other like with other component, so i am not able to list out how much deep i have to go in the hierarchy .
    Thanks in advance.
    Regards,
    Ritesh Jha

  • 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

  • BOM  explosion using variant configuration

    Hi
    I have a material (LAPTOP) and it has two BOM(RAM and HARD DISK).
    LAPTOP is my main material.
    Through VA01, when I try creating a Sales Order, I give the Material as LAPTOP and when I click "Configuration" menu, I will be showing the Variant Configuration Characteristic values for this material (LAPTOP) namely RAM and HARD DISK.
    When I select them and come back to VA01 scree, I could see both the sub materials (RAM and HARD DISK).
    But my question, I want to see only the one which I select. If I select RAM, then only RAM shoudl be displayed in my sales order not HARD DISK.
    I have created the Characteristics as "Multiple Value" assignmetn
    Please help.
    Thanks in Advance,
    Priya

    Hi Priya,
    Use Dependency concept ,to achieve your requirement.
    Regards,
    Subash.

  • Multi level BOM explosion

    Hi,
    For multilevel BOM explode I have to use the "Functional Module" CS_BOM_EXPL_MAT_V2. I checked it in system but I didnt understand which input parameters I need to give (Which are mandatory) as ther are lot of input fields available.
    Please suggest whether this Functional Module is fine OR there is any other way? also suggest about the input field data.

    Dear
    Function module CS_BOM_EXPL_MAT_V2 is used for BOM explosion for a given material. It belongs to function group CSS4 u2013 BOM explosions. This function module can explose multi-level BOM with a given validation date.
    You need to specify necessary input parameters to call this function module, such as CAPID u2013 App ID, DATUV u2013 Validation date, MEHRS u2013 Multi-level, MTNRV u2013 Material number, STLAL u2013 alternate, STLAN u2013 BOM usage.
    Some useful tables you can provide to your ABAPer and discuss the same .
    TABLES: MARA,                               "Master Data
            MAKT,                               "Matl Desc.
            MARC,                               "Plant Data for Matl.
            MAST,                               "Bom to material link
            STKO,                               "Bom Header
            STPO.                               "Bom Item
    Refer : Multi-level BOM explosion using CS_BOM_EXPL_MAT_V2
    Regards
    JH
    Edited by: Jiaul Haque on Jan 3, 2011 10:24 PM

  • Find BOM number by BOM explosion number

    Dear all,
    How can i find the BOM number used in a planned order ? by BOM explosion number ? Which tables shall i use ?
    Cheers,
    Olivier

    Hi,
    you can use following Function Module for BOM Explosion.
    CSAP_MAT_BOM_READ
    CS_BOM_EXPL_MAT_V2
    CS_BOM_EXPLOSION
    CS_BOM_EXPLOSION_MAT" or "CS_BOM_EXPL_MAT_V2
    Tables related To BOM
    STPO          BOM Item Details
    STPU          BOM Sub Items (designators)
    STKO         BOM Header Details
    MAST         BOM Group to Material
    STZU          BOM History Records
    STAS         BOM Item Selection
    STPF          BOM Explosion Structure
    PLMZ         Allocation of bill of material items to operations
    Regards,
    Sankaran

  • How about this implementation of BOM Explosion(simulate stack)

    REPORT  YZWX00301_06 LINE-SIZE  142
                         LINE-COUNT 65
                         MESSAGE-ID YM1
                         NO STANDARD PAGE HEADING .
    INCLUDE
    INCLUDE: YXXI00050.
    *TABLES use table define
    TABLES: MARA,        " Material General Table
            MARC,        " Plant Data for Material
            MDMA,        " MRP Area table
            EORD,        " Vendor table
            A018,        " Vendor material mapping table
            KONP,        " Vendor condition table
            MAST,        " Material BOM table
            STPO,        " Material BOM Component table
            STAS.        " Material BOM Component table detail
    *CONSTANTS define
    CONSTANTS:
      C_DAT_X        TYPE C VALUE 'X',
      C_MODE         LIKE dxfields-fileoper VALUE 'R',
      C_MASK         LIKE dxfields-filemask VALUE '.',
      C_FLG_LOCATION TYPE C VALUE 'A',
      C_DFPATH(15)   TYPE C VALUE '\bmwx\'.
    Work Area Define
    ---- build stack structure -
    DATA: BEGIN OF WK_STACK,
            LEVEL(1)      TYPE C,            "Save Level
            QUANT         TYPE I,            "Save Quantity
          END OF WK_STACK.
    ---- BOM work area -
    DATA: BEGIN OF WK_BOM,
             LEVEL(1)     TYPE C,            "BOM LEVEL
             MATNR        LIKE MARC-MATNR,   "MATERIAL      18
             POSTP        LIKE STPO-POSTP,   "ITEM CATEGORY  1
             MENGE        LIKE STPO-MENGE,   "BOM COMPONENT 13
             DATUV        LIKE STPO-DATUV,   "VALID FROM    10
             DATUB        LIKE STPO-DATUV,   "VALID TO      10
    END OF WK_BOM.
    ---- DATA work area -
    DATA: BEGIN OF DATAITEM,
             LEVEL(1)     TYPE C,            "BOM LEVEL
             MATNR        LIKE MARC-MATNR,   "MATERIAL
             POSTP        LIKE STPO-POSTP,   "ITEM CATEGORY
             MENGE        LIKE STPO-MENGE,   "BOM COMPONENT
             DATUV        LIKE STPO-DATUV,   "VALID FROM!!!
             DATUB        LIKE STPO-DATUV,   "VALID TO
             EKGRP        LIKE MARC-EKGRP,   "PURCHASE ORG
             LIFNR        LIKE EORD-LIFNR,    "Vendor code     10
             MARK(1)      TYPE C,             "Mark
             KBETR        LIKE KONP-KBETR,    "Rate price      11
             KONWA        LIKE KONP-KONWA,    "Currency        5
             KPEIN        LIKE KONP-KPEIN,    "Unit Qty        5
             KMEIN        LIKE KONP-KMEIN,    "Condition Unit  3
             DATAB        LIKE A018-DATAB,    "Condition from  10
             DATBI        LIKE A018-DATBI,    "Condition to    10
           END OF DATAITEM.
    ---- File Line work area -
    DATA: BEGIN OF LINE,
             WERKS(4)     TYPE C,                               "Plaint   4
             MATNR(18)    TYPE C,             "Material Number 18
             EKGRP(3)     TYPE C,             "Purchase Group  3
             LIFNR(10)    TYPE C,             "Vendor code     10
             VDATU        LIKE EORD-VDATU,    "Vendor valid from 10
             BDATU        LIKE EORD-BDATU,    "Vendor valid to   10
             MARK(1)      TYPE C,             "Mark
             KSCHL(4)     TYPE C,             "Condition type  4
             KBETR(18)    TYPE C,             "Rate price      11
             KPEIN(5)     TYPE C,             "Rate unit       5
             KONWA(5)     TYPE C,             "Currency        5
             KMEIN(3)     TYPE C,             "Condition Unit  3
             DATAB        LIKE A018-DATAB,    "Condition from  10
             DATBI        LIKE A018-DATBI,    "Condition to    10
           END OF LINE.
    *Local Data Object Define
    DATA:  WK_CNT TYPE I,                   "Count variable
           WK_LVL TYPE I,                   "BOM level
           WK_QTY TYPE I.                   "BOM component qty
    DATA: WK_LIFNR LIKE EORD-LIFNR,
          WK_MATNR LIKE MARC-MATNR.
    *Internal Table define
    DATA TAB_STACK LIKE STANDARD TABLE OF WK_STACK.   "STACK TABLE
    DATA TAB_BOM   LIKE STANDARD TABLE OF WK_BOM.     "FOR BOM
    DATA TAB_DATA  LIKE STANDARD TABLE OF DATAITEM.   "FOR ALL
    Parameter in Block1
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.         "TITLE TEXT-001.
    PARAMETERS:
      P_WERKS LIKE MARC-WERKS DEFAULT 'WX01',              "Plant
      P_STLTY LIKE STPO-STLTY DEFAULT 'M',                 "BOM Category
      P_MATNR LIKE MARC-MATNR OBLIGATORY,                  "Material
      P_STDAT LIKE EORD-VDATU OBLIGATORY DEFAULT SY-DATUM. "Standard Date
    SELECTION-SCREEN END OF BLOCK B1.
    Parameter in Block2
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: P_SCREEN RADIOBUTTON GROUP R1.     "Screen output
    SELECTION-SCREEN COMMENT 03(21) TEXT-001.
    SELECTION-SCREEN POSITION 32.
    PARAMETERS: P_FILE RADIOBUTTON GROUP R1.       "NTFILE output
    SELECTION-SCREEN COMMENT 34(17) TEXT-002.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    Parameter in Block3
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME.
    PARAMETERS:
    P_NTFILE(45)  TYPE C    LOWER CASE OBLIGATORY.
      P_PCFILE      LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN END   OF BLOCK B3.
    INITIALIZATION
    INITIALIZATION .
      CLEAR :  WK_CNT,
               WK_LVL,
               WK_QTY,
               WK_MATNR,
               WK_STACK,
               WK_BOM,
               DATAITEM.
      WK_LVL = 0.
      WK_QTY = 1.
      REFRESH: TAB_STACK,
               TAB_DATA,
               TAB_BOM.
    *&      AT SELECTION-SCREE ON VALUE-REQUEST
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_NTFILE.
    PERFORM F_SHOW_FILE_POPUP CHANGING P_NTFILE.       "Popup display
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PCFILE.
      PERFORM F_FILENAME_GET USING P_PCFILE
                          CHANGING P_PCFILE.
    *&      Form  F_FILENAME_GET
      --> ST_DAT_PATH     : Preset path
      <-- ST_DAT_FILENAME : Selected file name
    FORM F_FILENAME_GET USING st_dat_path
                     CHANGING st_dat_filename.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_filename     = SPACE
          def_path         = st_dat_path
          mask             = ',.,.,'
          mode             = '0'
          title            = 'TXT-file select'
        IMPORTING
          filename         = st_dat_filename
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
        MESSAGE s002(yf1) WITH 'F_FILENAME_GET' sy-subrc.
      ENDIF.
    ENDFORM.                    "F_FILENAME_GET
    MAIN PROCESS
    START-OF-SELECTION.
    ---- Check material -
      PERFORM CHECK_PROD.
    ---- get vendor data -
      PERFORM GET_VENDOR_DATA.
    ---- output screen/file -
      IF P_SCREEN = 'X'.
        PERFORM SET_OUTPUT.            "Output to screen directly
      ELSEIF P_FILE = 'X'.
        IF P_PCFILE <> ''.
          PERFORM DOWNLOAD_DATA.       "Write data into ntfile
        ELSE.
          MESSAGE E007(00) WITH 'P_PCFILE'.
        ENDIF.
      ENDIF.
    END-OF-SELECTION.
      ULINE (142).
      WRITE: /002 'Component Material Count:', WK_CNT.
    TOP-OF-PAGE
    TOP-OF-PAGE.
      WRITE: /002 'Product:', 013 P_MATNR,
              030 '****** BOM Price List ******',
              070 SY-DATUM,
              095 'PAGE:',
              100 SY-PAGNO.
      ULINE (142).
      WRITE: /001   '|Level',
              007   '|Material',
              026   '|Cat',
              030   '|Quantity',
              044   '|From',
              055   '|To',
              066   '|PurG',
              071   '|Vendor',
              082   '|MK',
              085   '|Price',
              101   '|Crncy',
              107   '|UnitQty',
              115   '|Unit',
              120   '|From',
              131   '|To',
              142   '|'.
      ULINE (142).
    *&FORM CHECK_PROD
    text
    -->p1      text
    <--p2      text
    FORM CHECK_PROD.
      SELECT SINGLE * FROM MARC
                     WHERE WERKS = P_WERKS           " Plant
                     AND   MATNR = P_MATNR           " Material
                     AND   DISPR IN ('F100','F200'). " Product
      IF SY-SUBRC = 0.
        PERFORM CHECK_BOM1 USING MARC-MATNR MARC-WERKS. " CHECK_BOM1
      ELSE.
        MESSAGE E022.
      ENDIF.
    ENDFORM.                                         " CHECK_PROD
    *&FORM CHECK_BOM1
    text
    -->p1      text
    <--p2      text
    FORM CHECK_BOM1 USING VALUE(FP_MATNR) VALUE(FP_WERKS).
      SELECT SINGLE * FROM  MAST
                      WHERE MATNR = FP_MATNR     AND      "Material
                            WERKS = FP_WERKS.             "Plant
      IF SY-SUBRC = 0.
        PERFORM PUSH_STACK USING WK_LVL WK_QTY.   "Save parent attribute
        PERFORM CHECK_BOM2 USING MAST-STLNR.                    "Check BOM2
      ENDIF.
    ENDFORM.                                                    "CHECK_BOM1
    *&FORM CHECK_BOM2
    text
    -->p1      text
    <--p2      text
    FORM CHECK_BOM2 USING VALUE(FP_STLNR).
      SELECT * FROM  STPO
               WHERE STLTY = P_STLTY        AND        "BOM category
                     STLNR = FP_STLNR.                 "BOM number
        PERFORM POPOUT_WK.                  "Pop out to work area
        WK_BOM-LEVEL = WK_LVL.              "Current BOM level
        WK_BOM-MATNR = STPO-IDNRK.          "Material number
        WK_BOM-POSTP = STPO-POSTP.          "ITEM Category
        WK_QTY       = STPO-MENGE * WK_QTY. "For Stack
        WK_BOM-MENGE = WK_QTY.              "BOM Component qty
        PERFORM CHECK_BOM3 USING STPO-STLTY STPO-STLNR STPO-STLKN.
        PERFORM CHECK_BOM1 USING STPO-IDNRK P_WERKS.
      ENDSELECT.
      PERFORM POPOUT_STACK.
    ENDFORM.                                                    "CHECK_BOM2
    *&FORM CHECK_BOM3
    text
    -->p1      text
    <--p2      text
    FORM CHECK_BOM3 USING VALUE(FP_STLTY) VALUE(FP_STLNR) VALUE(FP_STLKN).
      SELECT SINGLE * FROM  STAS
                      WHERE STLTY = FP_STLTY        "BOM category
                      AND   STLNR = FP_STLNR        "BOM number
                      AND   STLKN = FP_STLKN        "BOM item
                      AND   DATUV <= P_STDAT        "Valid from
                      AND   LKENZ = ' ' .           "Valid
      IF SY-SUBRC = 0.
        WK_BOM-DATUV = STAS-DATUV.                  "Valid from
      ENDIF.
      SELECT SINGLE * FROM  STAS
                      WHERE STLTY = FP_STLTY        "BOM category
                      AND   STLNR = FP_STLNR        "BOM number
                      AND   STLKN = FP_STLKN        "BOM item
                    AND   DATUV > P_STDAT         "Valid from
                      AND   LKENZ = 'X' .           "Invalid
      IF SY-SUBRC = 0.
        SELECT SINGLE * FROM  STAS
                       WHERE STLTY = FP_STLTY        "BOM category
                       AND   STLNR = FP_STLNR        "BOM number
                       AND   STLKN = FP_STLKN        "BOM item
                       AND   DATUV > P_STDAT         "Valid from
                       AND   LKENZ = 'X' .           "Invalid
        IF SY-SUBRC = 0.
          WK_BOM-DATUB = STAS-DATUV.          "Valid to
          APPEND WK_BOM TO TAB_BOM.
        ENDIF.
      ELSE.
        WK_BOM-DATUB = '99991231'.          "Manul input
        APPEND WK_BOM TO TAB_BOM.
      ENDIF.
    ENDFORM.                                                    "CHECK_BOM3
    *&FORM PUSH_STACK
    text
    -->p1      text
    <--p2      text
    FORM PUSH_STACK USING VALUE(FP_LVL) VALUE(FP_QTY).
      WK_STACK-LEVEL = FP_LVL + 1.
      WK_STACK-QUANT = FP_QTY.
      APPEND WK_STACK TO TAB_STACK.    "Push stack
      SORT TAB_STACK BY LEVEL.         "Sort table by level
    ENDFORM.                           "PUSH_STACK
    *&FORM PUSH_STACK
    text
    -->p1      text
    <--p2      text
    FORM POPOUT_STACK.
      DESCRIBE TABLE TAB_STACK LINES WK_CNT.
      IF WK_CNT > 0.
        DELETE TAB_STACK INDEX WK_CNT.     "Popout stack
        SORT TAB_STACK BY LEVEL.           "Sort table by level
      ENDIF.
    ENDFORM.                               "POPOUT_STACK
    *&FORM POPOUT_WK
    text
    -->p1      text
    <--p2      text
    FORM POPOUT_WK.
      DESCRIBE TABLE TAB_STACK LINES WK_CNT.
      IF WK_CNT > 0.
        READ TABLE TAB_STACK INTO WK_STACK INDEX WK_CNT.   "Popout stack
        IF SY-SUBRC = 0.
          WK_LVL = WK_STACK-LEVEL.                         "Current Level
          WK_QTY = WK_STACK-QUANT.                         "Parent Qty
        ENDIF.
      ENDIF.
    ENDFORM.                    "POPOUT_WK
    *&FORM DOWNLOAD_DATA
    text
    -->p1      text
    <--p2      text
    FORM DOWNLOAD_DATA.
      DATA: L_RETURN     TYPE   SY-SUBRC.
      PERFORM GUI_DOWNLOAD
                  TABLES
                     TAB_DATA
                  USING
                     P_PCFILE
                     'X'
                  CHANGING
                     L_RETURN.
      IF L_RETURN <> 0.
        MESSAGE S020.
      ELSE.
        MESSAGE S021.
      ENDIF.
    ENDFORM.                    " DOWNLOAD_DATA
    *&FORM GET_VENDOR_DATA
    text
    -->p1      text
    <--p2      text
    FORM GET_VENDOR_DATA.
      LOOP AT TAB_BOM  INTO WK_BOM.
        CLEAR DATAITEM.
        SELECT * FROM MARC
                WHERE WERKS = P_WERKS             "Plant
                  AND MATNR = WK_BOM-MATNR.       "Material
          DATAITEM-EKGRP = MARC-EKGRP.
          SELECT SINGLE * FROM  MARA
                          WHERE MATNR = MARC-MATNR    AND   "Material number
                                MTART IN ('1211','1221').
          IF SY-SUBRC = 0.
            SELECT COUNT(*) FROM  EORD
                           INTO  (WK_CNT)
                     WHERE WERKS  = P_WERKS        AND  "Plaint
                           MATNR  = WK_BOM-MATNR   AND  "Material
                           VDATU <= P_STDAT        AND  "Valid-From
                           BDATU >  P_STDAT.            "Valid-To
            IF WK_CNT > 1.
              DATAITEM-MARK = '*'.
            ELSEIF WK_CNT = 0.
              MOVE-CORRESPONDING WK_BOM TO DATAITEM.
              APPEND DATAITEM TO TAB_DATA.
            ENDIF.
            SELECT * FROM  EORD
                     WHERE WERKS  = P_WERKS        AND  "Plaint
                           MATNR  = WK_BOM-MATNR   AND  "Material
                           VDATU <= P_STDAT        AND  "Valid-From
                           BDATU >  P_STDAT.            "Valid-To
              MOVE-CORRESPONDING WK_BOM TO DATAITEM.
              DATAITEM-LIFNR  = EORD-LIFNR.             "Vendor code
              SELECT  * FROM  A018
                        WHERE LIFNR  =  EORD-LIFNR  AND  "Vendor code
                              MATNR  =  EORD-MATNR  AND  "Material
                              EKORG  =  EORD-EKORG  AND  "Purchase org
                              DATAB <=  P_STDAT     AND  "Valid-from
                              DATBI >   P_STDAT.         "Valid-to
                DATAITEM-DATAB = A018-DATAB.    "Condition From
                DATAITEM-DATBI = A018-DATBI.    "Condition To
                IF SY-SUBRC = 0.
                  SELECT * FROM  KONP
                           WHERE KNUMH = A018-KNUMH   AND   "Cnd Number
                                 KSCHL = A018-KSCHL   AND   "Cnd Type
                                 KAPPL = A018-KAPPL.        "Cnd Cat
                    DATAITEM-KBETR = KONP-KBETR.            "Price
                    DATAITEM-KONWA = KONP-KONWA.            "Currency
                    DATAITEM-KPEIN = KONP-KPEIN.            "Price Unit
                   DATAITEM-KMEIN = KONP-KMEIN.            "Unit of Material
                    APPEND DATAITEM TO TAB_DATA.            "Append TAB_DATA
                  ENDSELECT.
                ENDIF.
              ENDSELECT.
            ENDSELECT.
          ELSE.
            MOVE-CORRESPONDING WK_BOM TO DATAITEM.
            APPEND DATAITEM TO TAB_DATA.
          ENDIF.
        ENDSELECT.
        IF SY-SUBRC <> 0.
          MOVE-CORRESPONDING WK_BOM TO DATAITEM.
          APPEND DATAITEM TO TAB_DATA.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "GET_DATA
    *&      Form  SET_OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM SET_OUTPUT .
      CLEAR WK_CNT.
      LOOP AT TAB_DATA INTO DATAITEM.
        WRITE: /001   '|', 002 DATAITEM-LEVEL,   "Material Number
                007   '|', 008 DATAITEM-MATNR,   "Purchase Grp
                026   '|', 027 DATAITEM-POSTP,   "Item category
                030   '|', 031 DATAITEM-MENGE,   "BOM Component qty
                044   '|', 045 DATAITEM-DATUV,   "BOM valid from
                055   '|', 056 DATAITEM-DATUB,   "BOM valid to
                066   '|', 067 DATAITEM-EKGRP,   "Purchase Org
                071   '|', 072 DATAITEM-LIFNR,   "Vendor
                082   '|', 083 DATAITEM-MARK,    "Mark flag
                085   '|', 086 DATAITEM-KBETR,   "Price
                101   '|', 102 DATAITEM-KONWA,   "Currency
                107   '|', 108 DATAITEM-KPEIN,   "Unit Qty
                115   '|', 116 DATAITEM-KMEIN,   "Unit OM
                120   '|', 121 DATAITEM-DATAB,   "Cnd From
                131   '|', 132 DATAITEM-DATBI,   "Cnd To
                142   '|'.
        WK_CNT = WK_CNT + 1.
      ENDLOOP.
    ENDFORM.                    " SET_OUTPUT

    Prabhu Peram,
    Thanks very much.
    I want to show an idea of BOM explosion by constructing a stack.
    BOM explosion uses first-root-searching and pushes the "root" material into stack.If the "root" has no left-child,pops out the "root" material and searchs the right-child....and completes the entire BOM explosion.
    Message was edited by:
            Mic chen
    Message was edited by:
            Mic chen

  • CS11- BOM explosion with status inactive

    When a BOM is marked as inactive( at the header level), the BOM explosion using CS11 is not possible.  The systems says there is no effective BOM. However I can pull up the same using CS03 and drill down level by level.
    Is this standard SAP behaviour? Are there any settings in Customizing that will make the explosion for inactive BOM's  using CS11 possible?

    Alternative to select inactive BOM
    BOM status = inactive in BOM header
    In OS31
    Create a selection ID = 09, selection priority = 1, BOM usage = 1
    OS 30
    Create a BOm application copy from PP01 let us say ZP01
    In which enter the selection ID = 09, what you created before
    Remove all the ticks of check BOM
    Save
    That is all.
    In cs11, select the application as ZP01 and you will get the BOM explosion.

  • 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

  • How to use the select option to get the multiple bom explosion

    hi friends,
              i have completed the bom exp using parameters to get one material
    input,but i need to adopt select option to give from and to materials
    i ll gives from and to materials with description and bom deails
    i here gave the coding also, pl give me a suggestion how to adpot the select
    optoins instead of parameters ,very urgent
    REPORT PP_BOM_EXPLOSION.
    tables :mara,marc,stpo.
    TYPE-POOLS : SLIS.
    *parameters: p_werks like t001w-werks obligatory.
    SELECT-OPTIONS : p_matnr FOR mara-matnr obligatory.
    **select-options : p_matnr for mara-matnr obligatory.
    PARAMETERS : P_WERKS LIKE T001W-WERKS OBLIGATORY,
            P_MATNR LIKE MARA-MATNR OBLIGATORY.
    *parameters: p_werks like marc-werks obligatory,
    *p_matnr like marc-matnr obligatory.
    constants c_x value 'X'.
    data: begin of it_comp occurs 0,
    matnr like mara-matnr,
    maktl like makt-maktx,
    idnrk like stpox-idnrk,
    ojtxp like stpox-ojtxp,
    menge like stpox-menge,
    meins like stpox-meins,
    matkl like stpox-matmk,
    end of it_comp.
    data : topmat like cstmat.
    data: w_topmat like cstmat.
    DATA : IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.
    DATA : IT_EVENTCAT  TYPE SLIS_T_EVENT.
    DATA : WA_EVENTCAT_LN  LIKE LINE OF IT_EVENTCAT.
    DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: S_COL_POS TYPE I.
    start-of-selection.
    perform explode_assembly.
    PERFORM BUILD_FIELDCATALOG.
    PERFORM DATA_DISPLAY.
    *end-of-selection.
    *perform write_report.
    *top-of-page.
    *perform print_header.
    *form print_header.
    *write: /(18) 'Component'(h00),
    *(40) 'Description'(h01),
    *'Mat.Group'(h02),
    *(18) 'Quantity'(h03).
    *uline.
    *endform.
    *form write_report.
    *write: / w_topmat-matnr under text-h00 color col_heading,
    *w_topmat-maktx under text-h01 color col_heading.
    *loop at it_comp.
    *write: /
    *it_comp-idnrk under text-h00,
    *it_comp-ojtxp under text-h01,
    *it_comp-matkl under text-h02,
    *it_comp-menge unit it_comp-meins under text-h03,
    *it_comp-meins.
    *endloop.
    *uline.
    *endform.
    form explode_assembly.
    data: it_stb like stpox occurs 0 with header line,
    it_stb2 like stpox occurs 0 with header line,
    it_stb3 like stpox occurs 0 with header line,
    w_msg(255) type c.
    SELECT MATNR FROM MARA INTO CORRESPONDING FIELDS OF TABLE IT_MARA
                               WHERE MATNR IN P_MATNR.
    Explode highest level:
    *LOOP AT IT_MARA.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    auskz = c_x
    capid = 'PP01'
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    BGIXO = c_x
    MKMAT = c_x
    MMAPS = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = P_MATNR
    werks = p_werks
    importing
    topmat = w_topmat
    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 sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    *write: / w_msg.
    exit.
    endif.
    Don't process documents
    delete it_stb where idnrk is initial.
    Don't process valid from furure:
    delete it_stb where datuv >= sy-datum.
    Explode phantom assemblies up to last level
    *do.
    it_stb2[] = it_stb[].
    *delete it_stb2 where dumps is initial.
    *if it_stb2[] is initial.
    *exit.
    *endif.
    *delete it_stb where not dumps is initial.
    delete it_stb where VPRSV <> 'S' OR MMSTA = '61'.
    loop at it_stb2.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    capid = 'PP01'
    auskz = c_x
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = it_stb2-idnrk
    werks = p_werks
    tables
    stb = it_stb3
    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
    into w_msg.
    *write: / w_msg.
    else.
    delete it_stb3 where idnrk is initial.
    delete it_Stb3 where sobsl = 50.
    loop at it_stb3 .
    multiply it_stb3-menge by it_stb2-menge.
    modify it_stb3 transporting menge.
    endloop.
    append lines of it_stb3 to it_stb.
    endif.
    *ENDLOOP.
    endloop.
    *enddo.
    Build table of components collecting the same components from
    all levels
    loop at it_stb.
    it_comp-matkl = it_stb-matmk.
    it_comp-idnrk = it_stb-idnrk.
    it_comp-ojtxp = it_stb-ojtxp.
    it_comp-menge = it_stb-menge.
      CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT'
        EXPORTING
        INPUT                = IT_STB-MEINS
        LANGUAGE             = SY-LANGU
        IMPORTING
      LONG_TEXT            =
       OUTPUT               = IT_STB-MEINS
      SHORT_TEXT           =
    EXCEPTIONS
       UNIT_NOT_FOUND       = 1
       OTHERS               = 2
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    it_comp-meins = it_stb-meins.
    collect it_comp.
    clear it_comp.
    endloop.
    *READ TABLE IT_COMP INDEX 1.
    *IF SY-SUBRC = 0.
    IT_COMP-MATNR = w_topmat-matnr.
    IT_COMP-MAKTL = w_topmat-maktx.
    INSERT IT_COMP index 1.
    *ENDIF.
    ENDFORM.
    FORM TO APPEND DATA INTO ALV FORM
    FORM BUILD_FIELDCATALOG.
    PERFORM BUILD_FIELDCAT USING 'MATKL' 'Component'.
    PERFORM BUILD_FIELDCAT USING 'MATKL' 'Component'.
    *loop at it_comp.
       PERFORM BUILD_FIELDCAT USING 'MATNR' 'Material'.
      PERFORM BUILD_FIELDCAT USING 'MAKTL' 'Material Description'.
      PERFORM BUILD_FIELDCAT USING 'IDNRK' 'Component'.
      PERFORM BUILD_FIELDCAT USING 'OJTXP' 'Description'.
      PERFORM BUILD_FIELDCAT USING 'MATKL' 'Material Group'.
      PERFORM BUILD_FIELDCAT USING 'MENGE'  'Quantity'.
      PERFORM BUILD_FIELDCAT USING 'MEINS' 'Unit Of MEASUREMENT'.
    *endloop.
    ENDFORM.
    FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
    FORM BUILD_FIELDCAT USING L_FIELDNAME LIKE DD03L-FIELDNAME S_TEXT LIKE DD03P-SCRTEXT_M.
      CLEAR WA_FIELDCAT_LN.
      ADD 1 TO S_COL_POS.
      WA_FIELDCAT_LN-REF_TABNAME  = 'IT_COMP'.
      WA_FIELDCAT_LN-FIELDNAME    = L_FIELDNAME.
      WA_FIELDCAT_LN-SELTEXT_M    = S_TEXT.
      WA_FIELDCAT_LN-COL_POS      = S_COL_POS.
      WA_FIELDCAT_LN-QFIELDNAME   = SPACE.
      WA_FIELDCAT_LN-HOTSPOT      = SPACE.
      WA_FIELDCAT_LN-JUST         = 'R'.
      APPEND WA_FIELDCAT_LN TO IT_FIELDCAT.
    ENDFORM.
    FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
    FORM DATA_DISPLAY.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = TEXT-001
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = IT_FIELDCAT
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_COMP
       EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.
    Thanks in advance
                                                                                    Regards
    senthilkumar D

    tables :mara,marc,stpo.
    parameters: p_werks like t001w-werks obligatory.
    *p_matnr like mara-matnr obligatory.
    *select-options : p_matnr for mara-matnr obligatory.
    select-options : P_matnr for mara-matnr.
    *parameters: p_werks like marc-werks obligatory,
    *p_matnr like marc-matnr obligatory.
    constants c_x value 'X'.
    data: begin of it_comp occurs 0,
    idnrk like stpox-idnrk,
    ojtxp like stpox-ojtxp,
    menge like stpox-menge,
    meins like stpox-meins,
    matkl like stpox-matmk,
    end of it_comp.
    data: w_topmat like cstmat.
    data : begin of itab occurs 0,
            matnr like mara-matnr,
            end of itab.
    *data : itab type table of mara with header line.
    start-of-selection.
    perform explode_assembly.
    end-of-selection.
    perform write_report.
    top-of-page.
    perform print_header.
    form print_header.
    write: /(18) 'Component'(h00),
    (40) 'Description'(h01),
    'Mat.Group'(h02),
    (18) 'Quantity'(h03).
    uline.
    endform.
    form write_report.
    write: / w_topmat-matnr under text-h00 color col_heading,
    w_topmat-maktx under text-h01 color col_heading.
    loop at it_comp.
    write: /
    it_comp-idnrk under text-h00,
    it_comp-ojtxp under text-h01,
    it_comp-matkl under text-h02,
    it_comp-menge unit it_comp-meins under text-h03,
    it_comp-meins.
    endloop.
    uline.
    endform.
    form explode_assembly.
    data: it_stb like stpox occurs 0 with header line,
    it_stb2 like stpox occurs 0 with header line,
    it_stb3 like stpox occurs 0 with header line,
    w_msg(255) type c.
    select matnr from mara into table itab where matnr  between p_matnr-low and p_matnr-high.
    loop at p_matnr.
      itab-matnr = p_matnr-low.
       append itab.
       itab-matnr = p_matnr-high.
       append itab.
       clear itab.
       endloop.
    Explode highest level:
    loop at itab.
    call function 'CS_BOM_EXPL_MAT_V2'
    exporting
    auskz = c_x
    capid = 'PP01'
    cuols = c_x
    datuv = sy-datum
    knfba = c_x
    ksbvo = c_x
    mbwls = c_x
    mdmps = c_x
    BGIXO = c_x
    MKMAT = c_x
    MMAPS = c_x
    FBSTP = c_x
    FTREL = c_x
    mtnrv = itab-matnr
    werks = p_werks
    importing
    topmat = w_topmat
    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 sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    into w_msg.
    write: / w_msg.
    exit.
    *else.
    endif.
    loop at it_stb.
    it_comp-matkl = it_stb-matmk.
    it_comp-idnrk = it_stb-idnrk.
    it_comp-ojtxp = it_stb-ojtxp.
    it_comp-menge = it_stb-menge.
    it_comp-meins = it_stb-meins.
    collect it_comp.
    clear it_comp.
    endloop.
    endloop.
    endform.
    i got the low and high from selectoption and then move it into itab.
    then i pass itab-matnr into fm. using loop.
    but i got only one output
    but ineet to got from and to output.
    give me a solution
    Regards
    ds

  • What is the functionality of Bom explosion individual/collective  in MRP 4 View

    Hi Experts.Please give idea about what is the use of functionality of BOM explosion Individual/collective in MRP view 4.How this function will work in strategy 10 and 20.
    thanks in advance.

    Hi,
    This is a very generic question...If you explore in forum or net you will get lot of information...
    This is normally used in make to order strategies like 20, 50 etc...
    The individual/collective indicator in the material master record determines
    whether a component is procured for a special customer requirement in the
    individual segment.
    The indicator "1" for individual requirements means that the material is being
    specially manufactured or procured for a sales order. A special individual segment
    is created for each requirement. An individual requirement is only created if the
    higher-level material does not create a collective requirement.
    The indicator "2" for collective requirements means that the material is produced
    or procured for various requirements. You can find these requirements in the net
    requirements segment.
    The indicator "blank" means that the component is to be planned in the same way
    as the higher-level assembly.
    In the above example, two individual segments are created for the shaft for sales
    orders A and B.
    Thanks
    Kumar

  • Adding new items in ME21N using USEREXIT/BADI with BOM explosion

    I have following business scenario. There is purchase requisition consisting just one material. In ME21N we are creating new purchase order. This purchase order needs to consist that item (we drag&drop this item from purchase requisition).
    The problem is, that this item is in fact BOM, so we would like to explode it and select just some entries from them basing on some Z* configuration and we can't use standard BOM explosion from ME21N.
    The idea to solve that issue is following:
    1. Explode there BOM for material;
    2. Filter out not needed items from that explosion using Z-config table;
    3. Copy filtered items using USER-EXIT / BADI , ENHANCEMENT-SPOT into purchase order items.
    The best, if this USER-EXIT / BADI, ENHANCEMENT-SPOT will be used only when drag&drop purchase requisition item into new purchase order.
    The point is that I'm not able to find out such USER-EXIT, BADI or ENHANCEMENT-SPOT.
    P.S. There is for instance exit "MM06E007 Change document for requisitions upon conversion into PO", but interface of that exit completely doesn't fit my needs.
    Any ideas?

    Hello Tomasz Suchanek ,
                                                  There is no BADI/ Enhancement Spots / User Exits that you can use for this requirement.
    You are trying to change the SAP standard Functionality.
    You need to contact SAP for consulting .
    Thanks,
    Greetson

  • 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.

  • Comp. Backflush using Comp. Scrap(No BOM explosion(manual comp. entry))

    Hi Friends,
    *Component Backflush + MFBF Functionality:*
    Go to MFBF --> Select the radio button COMPONENT BACKFLUSH --> and click on
    COMPONENT SCRAP (application toolbar).
    Now select the radio button NO BOM EXPLOSION(manual comp. entry).
    Enter the Material Number and Production Version.
    Now click on PROCESS COMPONENT LIST (application toolbar).
    Enter Material, Quantity, UOM, Storage Location, Reason Code and press ENTER.
    By default the movement type will be '551'.
    Now when you click on SAVE button on the top. It will give you a material
    document number.
    I have created a new FM according to the standard component backflush functionality and called the BAPI BAPI_REPMANCONF1_CREATE_MTS in my Z FM. But the functionality of the standard BAPI is not giving expected results.
    I would appreciate if someone who had gone thru the same situaton could help me. I have done my research in different ways. But ended up finding none. Is there any other BAPI or procedure to achieve the above scenario.
    Thanks.

    Hi Keshav,
    Thanks for getting back to me.
    Below is how I populated the data.
    "I am not populating Backflush quantity and UOM because according to my
    "standard MFBF functionality I have choose NO BOM EXPLOSION(manual comp. entry)
    FLAGS-BCKFLTYPE       = '12'.
    FLAGS-COMPONENTS_TYPE = '1'.
    GENDATA-POSTDATE    = SY-DATUM.
    GENDATA-DOCDATE      = SY-DATUM.
    GENDATA-MATERIALNR = MATERIAL.
    GENDATA-PRODPLANT   = PLANT.
    GENDATA-PRODVERSION   = VERSION.
    "Z_IMPORT_TABLES is the custom structure which I have declared at TABLES in FM
    "I_GOODS is of type BAPI2017_GM_ITEM_CREATE
    LOOP AT Z_IMPORT_TABLES.
      WA_GOODS-MATERIAL    = Z_IMPORT_TABLES-MATERIAL.
      WA_GOODS-PLANT          = Z_IMPORT_TABLES-PLANT.
      WA_GOODS-STGE_LOC   = Z_IMPORT_TABLES-STGE_LOC.
      WA_GOODS-MOVE_TYPE = Z_IMPORT_TABLES-MOVE_TYPE.
      WA_GOODS-ENTRY_QNT = Z_IMPORT_TABLES-ENTRY_QNT.
      WA_GOODS-ENTRY_UOM = Z_IMPORT_TABLES-ENTRY_UOM.
      WA_GOODS-MOVE_REAS = Z_IMPORT_TABLES-MOVE_REAS.
    APPEND WA_GOODS TO I_GOODS.
    ENDLOOP.
    CALL FUNCTION 'BAPI_REPMANCONF1_CREATE_MTS' 
        EXPORTING
          BFLUSHFLAGS       = FLAGS
          BFLUSHDATAGEN  = GENDATA
        IMPORTING
          CONFIRMATION   = CONFIRMATION
          RETURN               = RETURN             ---------> error in this parameter
        TABLES
          GOODSMOVEMENTS = I_GOODS.
    When I execute this in debug mode, it is giving me an error in my RETURN parameter asking me to enter the backflush quantity and UOM which doesn't suits my scenario.
    Appreciate if you could let me know where I am doing wrong in my code and guide me in a better way to achieve this.
    Thanks.

  • Update Equipment BOM using Function module (very urgent)

    Hi All,
    I am an ABAPER and trying to update equipemnt BOM.
    I want to update equipment BOM using a function module. I am currently using 'CSAI_BOM_MAINTAIN' function module. But i am not able to update the Equipment BOM. After function call the sy-subrc value is 0, even though the BOM is not updated.
    Please help its very urgent.
    Kind Regards,
    Sharat.

    Hi Sharat,
    I am facing the same problem. Could you please let me know what might be the reason.
    Plz mail me at [email protected]
    Plz update this section once u have mailed the answer.
    Thanks a lot in advance.
    Regards,
    Himanshu

Maybe you are looking for

  • Make Non-editable Column in Table Control of ME21N and ME22N

    Hi Experts, I was trying to look for a solution to make the columns for field MEPO1320-SLFDT(Stat Deliv. Date), MEPO1320-EEIND (Deliv. Date) and MEPO1211-NETPR (Net Price) from transaction ME21N and ME22N to be non-editable ONLY when Qty Received (ME

  • Multiple Online Numbers - Only want one forwarded

    Hey there, am hoping someone can help with my query re multiple online numbers. I have one Skype account, and multiple online numbers. One number is for a 'home' number, the other is for a 'business' number. I was hoping to set up call forwarding suc

  • GDM update: directory permissions differ on /var/log/gdm/

    Hello, Running Arch 64Bits kernel 3.9.9-1 with systemd and i got the following warning during a gdm update today: (1/6) upgrading libgdm [######################] 100% (2/6) upgrading gdm [######################] 100% warning: directory permissions di

  • Product update/upgrade policy by Adobe

    Adobe is selling software with less validity than a yogurth: I bought the upgrade of Elements suite to version 8 in August this year and One and a half month later this product has expired because Adobe released version 9. Any decent company would pr

  • Clusterwide exception: Failed to start dependent interface ''caf/eu/gp/api'

    Hello ! We are working with SAP Netweaver 2004s SP11 with a local repository. We are trying to deploy a web dynpro project using the guided procedures api. But we have a problem at deploy time : Finished with warnings: development component ... :Caug