Standard BOM with Alternative BOM

Dear Experts,
We are having a requirement of comparing Standard BOM with actual material consumption. We got Actual consumption. When we were trying to get the standard BOM component, standard Data source is not available. Then we searched in SDN and they are recommending to go with view option. We have created view with MAST,STKO and STPO tables. This view is not working when a plant is having alternative BOM. Further research on SDN reveals that we can use CSAP_MAT_BOM_READ functional module. When we executed this functional module, it is giving the standard BOM components and its Base Quantity. But we were not able to create Generic data source with this functional module.
The requirement is urgent. Please help me with your experience.
With Regards,
Balachander.S

when we were joining MAST, STKO and STPO, the alternative BOM was not taking care. Then we have linked STAS. It was sloved.
With Regards,
Balachander.S

Similar Messages

  • Reg: Creation of BOM along with Alternative BOM

    Hi Experts,
    I have written the below code for creating BOM along with Alternative BOM, I'm getting the following error.
    W BAPI1080             028
    Error/warning when checking the structure of the BOM group with ID=
    A BAPI1080             002
    Basic data for (BOM) group available twice
    A BAPI                 001
    No instance of object type BOMGroup has been created. External reference:
    W BAPI1080             028
    Error/warning when checking the structure of the BOM group with ID=
    A BAPI1080             002
    Basic data for (BOM) group available twice
    A BAPI                 001
    No instance of object type BOMGroup has been created. External reference:
    Please find the piece of code below.
      SORT it_bom01 BY matnr idnrk posnr ASCENDING.
      LOOP AT it_bom01 INTO wa_bom01.
        AT NEW matnr.
          CLEAR:
            it_bomgroup[],
            wa_bomgroup,
            it_variants[],
            wa_variants,
            it_items[],
            wa_items,
            it_matrel[],
            wa_matrel,
            it_itemas[],
            wa_itemas,
            it_return.
        ENDAT.
    * Material BoM Group Header Data
        wa_bomgroup-bom_group_identification = 'IDENTIFICATION'.
        wa_bomgroup-object_type = 'BGR'.
        wa_bomgroup-object_id = 'ID'.
        wa_bomgroup-bom_usage = wa_bom01-stlan.
        wa_bomgroup-ltxt_lang = sy-langu.
        wa_bomgroup-technical_type = ' '.
    *   wa_bomgroup-bom_text = .
        wa_bomgroup-created_in_plant = wa_bom01-werks.
        APPEND wa_bomgroup TO it_bomgroup.
    * Header Details of the different variants
        wa_variants-bom_group_identification = 'IDENTIFICATION'.
        wa_variants-object_type = 'BOM'.
        wa_variants-object_id = 'ID'.
        wa_variants-alternative_bom = wa_bom01-stlal.
        wa_variants-bom_status = wa_bom01-stlst.
        wa_variants-base_qty = wa_bom01-bmeng.
        wa_variants-valid_from_date = wa_bom01-datuv.
        wa_variants-alt_text = wa_bom01-alt_text.
        wa_variants-function = 'NEW'.
        APPEND wa_variants TO it_variants.
    * Details of the items of the variants
        wa_items-bom_group_identification = 'IDENTIFICATION'.
        wa_items-object_type = 'ITM'.
        wa_items-object_id = 'ID'.
        wa_items-item_no = wa_bom01-posnr.
        wa_items-item_cat = wa_bom01-postp.
        wa_items-component = wa_bom01-idnrk.
        wa_items-comp_qty = wa_bom01-menge.
        wa_items-valid_from_date = wa_bom01-datuv.
        APPEND wa_items TO it_items.
    * Details of the materials of the different variants
        CLEAR it_matrel.
        wa_matrel-bom_group_identification = 'IDENTIFICATION'.
        wa_matrel-material = wa_bom01-matnr.
        wa_matrel-plant    = wa_bom01-werks.
        wa_matrel-bom_usage = wa_bom01-stlan.
        wa_matrel-alternative_bom = wa_bom01-stlal.
        APPEND wa_matrel TO it_matrel.
    * Linking items to the corresponding variants
        CLEAR it_itemas.
        wa_itemas-bom_group_identification = 'IDENTIFICATION'.
        wa_itemas-sub_object_type = 'ITM'.
        wa_itemas-sub_object_id = 'ID'.
        wa_itemas-super_object_type = 'BOM'.
        wa_itemas-super_object_id = wa_bom01-matnr.
        wa_itemas-valid_from_date = wa_bom01-datuv.
        wa_itemas-function = 'NEW'.
        APPEND wa_itemas TO it_itemas.
        AT END OF matnr.
          CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
            EXPORTING
              all_error         = 'X'
            TABLES
              bomgroup          = it_bomgroup
              variants          = it_variants
              items             = it_items
              materialrelations = it_matrel
              itemassignments   = it_itemas
              return            = it_return.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
          LOOP AT it_return.
            WRITE:/ it_return-type, it_return-id, it_return-number,
            it_return-message.
          ENDLOOP.
        ENDAT.
      ENDLOOP.
    Thanks and Regards,
    Abdur Rafique

    Hi Sree,
    I used your code, I removed the levels because, i have only one level 'the lineitems'. Please find the modified code below. I'm not able to create the BOM, it throws an error as "BOM is recursive". I checked the header and item contents before passing to FM, it is correct.
    Please help me with the solution.
    REPORT  zbom_sdn.
    TYPE-POOLS: truxs.
    DATA: bom_header     LIKE cad_bicsk,
          bom_item       TYPE TABLE OF  cad_bom_item WITH HEADER LINE,
          bom_sub_item   TYPE TABLE OF cssubitem WITH HEADER LINE,
          dms_class_data TYPE TABLE OF cls_charac  WITH HEADER LINE,
          sap_field_data TYPE TABLE OF rfcdmsdata  WITH HEADER LINE,
          e_return       LIKE cad_return-value,
          e_message      LIKE message-msgtx,
          e_message_len  LIKE cad_return-message_len.
    DATA v_item  TYPE i.
    TYPES : BEGIN OF ty_data,
             matnr TYPE cad_bicsk-matnr," Material
             werks TYPE csap_mbom-werks," Plant
             stlan TYPE csap_mbom-stlan," BOM Usage
             datuv TYPE csap_mbom-datuv," Valid From
    *         posnr TYPE stpo_api03-item_no," Item Number
             idnrk TYPE stpo_api03-component," BOM Component
             postp TYPE stpo_api03-item_categ," Item category
             menge TYPE cad_bom_item-menge," Quantity
             bmeng TYPE stko_api01-base_quan," Base Qty
             stlst TYPE stko_api01-bom_status," BOM Status
             stlal TYPE csap_mbom-stlal," Alternative BOM
             alt_text TYPE stko_api01-alt_text," Alternative BOM text
            END OF ty_data.
    DATA : it_data TYPE TABLE OF ty_data ,
           wa_data TYPE ty_data.
    DATA:   wa_raw TYPE truxs_t_text_data.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          program_name  = syst-repid
          dynpro_number = syst-dynnr
        CHANGING
          file_name     = p_file.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
           EXPORTING
    *       I_FIELD_SEPERATOR          =
             i_line_header              = 'X'
             i_tab_raw_data             = wa_raw     " Work Table
             i_filename                 = p_file
           TABLES
             i_tab_converted_data       = it_data[]  " Actual Table
           EXCEPTIONS
            conversion_failed          = 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.
      CLEAR: bom_header, bom_item, bom_sub_item.
      REFRESH: bom_item, bom_sub_item.
      DATA : v_lineitem TYPE sposn VALUE '0000',
             v_slineitem TYPE sposn VALUE '0'.
      LOOP AT it_data INTO wa_data.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = wa_data-matnr
          IMPORTING
            output = wa_data-matnr.
    * fill BOM header
        CLEAR  bom_header.
        bom_header-matnr = wa_data-matnr. "'000000000200000016'.
        bom_header-stlal = wa_data-stlal. " Alternative Bom
        bom_header-werks = wa_data-werks.                       "'1000'.
        bom_header-stlan = wa_data-stlan.                       "'3'.
        bom_header-bmeng = wa_data-bmeng.
        bom_header-cadkz = 'X'.
        bom_header-stktx = wa_data-alt_text.
    *      bom_header-ztext = wa_data-text.
        bom_header-datuv = wa_data-datuv."'01.10.2010'.
    * fill item
        v_lineitem = v_lineitem + 10.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = v_lineitem
          IMPORTING
            output = v_lineitem.
    *    bom_item-upskz     = 'X'.     " If We hav the Sub items Enable it.
        bom_item-idnrk     = wa_data-matnr. "'000000000200000017'.
        bom_item-posnr     = v_lineitem.
        bom_item-postp     = wa_data-postp."'L'.
        bom_item-menge     = wa_data-menge.                     "'1'.
    *    bom_item-fmeng     = wa_data-fqty.
        APPEND bom_item.
        CLEAR: bom_item.
        AT END OF matnr.
          CALL FUNCTION 'CAD_CREATE_BOM_WITH_SUB_ITEMS'
               EXPORTING
                    i_bom_header   = bom_header
                    i_auto_posnr   = ''
               IMPORTING
                    e_return       = e_return
                    e_message      = e_message
                    e_message_len  = e_message_len
                    e_bom_header   = bom_header
               TABLES
                    bom_item       = bom_item
                    bom_sub_item   = bom_sub_item
                    dms_class_data = dms_class_data
                    sap_field_data = sap_field_data
               EXCEPTIONS
                     OTHERS         = 1.
          REFRESH bom_item.
          WRITE : e_message.
        ENDAT.
        CLEAR wa_data.
      ENDLOOP.
    Thanks and Regards,
    Abdur Rafique

  • Costing run for a material with alternative BOM

    Hi Friends,
    My requirement is to have product costing for a material with 3 different BOMs, in CK11N i can change the alternative BOM number to have costing run for 3 differesnt boms, but in ck24 how to proceed, My client requirement is such that the standard price should be the average price of the costing run from 3 different boms, and they are not interested in manual price change in MR21
    Regards,
    Arun Kumar R V

    Hi Arun,
    You can have a Standard cost estimate based on only one of the alternative BOM and Routing. This alternative is selected based on the business ie., whichever alternative is generally used in production frequently. This will be the std cost and whenever you do the production using the other alternatives, the difference in cost will be captured as Variance.
    There is no option of having average or cost estimate for each alternative at the same time.
    There is absolutely no use in maintaining price in MR21 for an in house produced material, since during Prod Order process the planned costs will be arrived at based on the quantity structure of BOM & Route only.
    Thanks & Regards,
    Vijaya Bhaskar A
    Edited by: Vijaya Bhaskar A on Jan 7, 2009 8:57 AM

  • Create Bom with alternative using CSAP_MAT_BOM_MAINTAIN

    Hi all,
    I am trying to create a new alternative BOM and thought I had to use the function CSAP_MAT_BOM_MAINTAIN. Creating new BOMs with CSAP_MAT_BOM_CREATE works as well as maintaining them with CSAP_MAT_BOM_MAINTAIN, but I fail in creating a new alternative BOM. In the function
    CS_DI_HEADER_OBJECT_CHECK (called within the maintain-function ) it says (close to the failure )
    "*Anlegen von Alternativen über CSAP nicht erlaubt"
    "creation of alternative using csap not allowed" ....
    Well, sounds like I am using the wrong function, but which should I use instead ???
    Thanx in advance,
    Karsten

    Hi,
    Use : CS_BI_BOM_CREATE_BATCH_INPUT1 To Create a new BOM or New Alt. BOM.
    Use : CS_BC_BOM_CHANGE_BATCH_INPUT to maintain the BOM.

  • Replace standard view with alternative view

    Hi Gurus,
    In CRM 5.0 we were able to replace a view with a different view (whether it was SAP standard or bespoke) by adding the appropriate substition controller details in the Runtime Framework Profile.
    We are now trying to do the same in CRM 2007 but we have not been successful.  I have gone into the SPRO entry "Maintain Runtime Framework Profile" and created "Z_RUNTIME" which is called in the Business Role.  It is set up with the following Work Area Definition:
    Application: BSPWD_BASICS
    View Set Name: WorkAreaHostViewSet
    View Area Name: WorkAreaView
    I have tried to replace the following controller as a test to change the standard view:
    BSP Application: ICCMP_BT_TIMERC
    Controller To Be Replaced: SrvTTimeRep
    BSP Application: IC_KNOWS_SEARCH
    Replacement Controller: MainWindow
    This hasnt worked, the view SrvTTimeRep still showed. 
    Just to reiterate, I'm not trying to enhance a view, I am trying to replace it with a totally different one.
    Any help offered is greatly appreciated, and will be reqarded with points!  Thanks in advance!
    Andrew G.

    Andrew,
    The difference is in CRM 2007 is that you don't modify the runtime framework profile globally.  Instead each application has concept of a component repository.xml that needs to be adjusted.  You actually need to enhance each component where you want to include the view into the viewset.  This will then create a Z-component repository of enhancements for the application, including a copy of the respository.xml file.  You then adjust the repository.xml using the tools provided to replace adjust the viewset defintion.  Now if your view lives in another component you will also have to define the proper component usages to use the view.
    I would recommend downloading or getting access to the CRM 2007 OKP materials or taking the CRM UI class which has an example of this method in further detail.
    Take care,
    Stephen

  • Displaying BOM With Sub Boms

    I want to display the bill of material within its component's sub boms as well in one page as a view of hiearchy..How to do so?
    Can anyone explain?

    Hi,
    Check whether T code CS11 helps you.
    Nikhil

  • How to create Alternative Bom by given inputs

    Hi to all,
    I need to create BOM with alternative number.
    my inputs are
    BOM Header
    Material, plant, BOM usage, Alternate BOM, BOM status, Base Qty, Valid From, valid to
    BOM Item
    Item number, item category, component, component description, UOM, valid from, valid to, item ID, QTY
    if i use CSAP_MAT_BOM_CREATE to create BOM , it will not create alternative number
    if i use BAPI_MATERIAL_BOM_GROUP_CREATE , does my input value are enough to create alternative bom.
    please can any one, put some light on it, i search SDN ,but i dont know how to create alternative bom with input provided.
    i shall be thankful to you for this.
    Regards
    Pavneet Rana

    Try the program-RCSBI010

  • Selection of BOM with Production version

    Hello friends,
    I have Finish product say A with two alt. BOM and Production Version 1 & 2
    i have semi-finish product say B  with two alt. BOM 1 and 2 in the BOM of the Product A
    Now when i create PIR in MD61 for product A with production version 2 selection,how the system will select the component B
    with alternative BOM 2
    please suggest

    Hi Mangesh,
    The production version is selected based on the setting you are maitaining in MRP-4 view for Dependent Requirement Selection Method. The selection will be based on the Validity dates, Quantity i.e. based on the Lot sizes, and based on the production versions.
    If both the versions are having same date,lot size etc, then the system will select the first version by default.
    IF you do not want any version not to be selected then you can lock that version in MRP-4 view or in C223.
    Thanks and regards
    Muru

  • Component Allocation LSMW not working for materials having alternative BOMs

    Hi Experts,
    I have a requirement in Component allocation LSMW.
    Component Allocation LSMW was created using a material which do not have an alternative BOM and the LSMW NOT working for materials having alternative BOMs. Currently iam using Batch Input Recording method in LSMW.Can any one suggest me is it possible by recording method in Lsmw. Because in transaction CA02 when we click the CompAlloc button in application tool bar we get a pop up screen with alternative BOM's, we have to choose any of them. If we choose any of the alternatie BOM in the pop up screen then it will be fixed always, but depending upon my flat file value of alternate BOM i need to pick the value. It is not static.
    Can any one suggest me is there any BAPI for this requirement.
    Your hel will be greatly appreciated.
    Thanks & Regards,
    Venkat.

    Use BDC instead of LSMW, that will solve your problem.

  • How sap trigger alternative bom ?

    Hi Experts,
      We need setup alternative BOM, like Part A is used up, then it could use another BOM with part B.
    But if we setup new BOM as alternative BOM, do we need use produciton version, then it could trigger out differnt BOM?How SAP could trigger the different BOM or production version ?   Could it by MRP?
    Thanks
    Alice

    Hi,
    For BOM Alternative Selection you need to maintain any of the following settings in Material Master --->
    MRP-4 View->BOM Explosion / Dependent Requirements->Selection Method :
    Method for Selecting Alternative Bills of Material
    Indicator determining the selection of the alternative BOM when requirements are exploded in material requirements planning.
    Use
    With Selection by order quantity, the system chooses the alternative BOM into whose lot size range the order quantity falls. The lot size range and area of validity of the BOM apply.
    With Selection by explosion date, the system chooses the alternative BOM into whose area of validity the date falls according to the setting BOM via dates.
    With Selection by production version, the system chooses the alternative BOM defined in the valid production version. The lot size range and area of validity of the production version apply.
    With Selection only by production version, the system chooses the alternative BOM defined in the valid production version. The lot size range and area of validity of the production version apply.
    If no production version is found, no production orders or process orders can be created.
    Hope this helps.
    Revert if any doubt.
    Regards,
    Tejas

  • To display flatfile rec's under 1 Alternative BOM using BDc recording.

    Hi,
    I m trying to display flat file entire(i.e.. 4 rec's i m using) records vertically under one (Alternative BOM) for CS01-BOM using BDC recording method.
    Now i m tried with the following code,i m getting as one (Alternative BOM) for one ff record,by replacing one by one.
    But i want as vertically under one (Alternative BOM).
    Can anyone help me to overcome this.
    report ZBOM
    no standard page heading line-size 255.
    *include bdcrecx1.
    DATA: BEGIN OF bdc OCCURS 0,
    matnr(18),
    werks(4),
    stlan(1),
    END OF BDC.
    DATA: BEGIN OF BDC1 OCCURS 0,
    idnrk(18),
    MENGE(18),
    MEINS(3),
    postp(1),
    posnr(4),
    END OF bdc1.
    DATA: BEGIN OF BDCDATA OCCURS 0,
    matnr(18),
    werks(4),
    stlan(1),
    idnrk(18),
    MENGE(18),
    MEINS(3),
    postp(1),
    posnr(4),
    END OF BDCDATA.
    data ibdcdata type standard table of bdcdata WITH header line.
    *start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = ','
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    TABLES
    DATA_TAB = BDCDATA
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_group.
    loop at bdcdata.
    perform bdc_dynpro using 'SAPLCSDI' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RC29N-STLAN'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RC29N-MATNR'
    'SOFTDRINKS'.
    perform bdc_field using 'RC29N-WERKS'
    'WIND'.
    perform bdc_field using 'RC29N-STLAN'
    '1'.
    perform bdc_field using 'RC29N-DATUV'
    '16.09.2008'.
    perform bdc_dynpro using 'SAPLCSDI' '0110'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RC29K-BMENG'
    '1'.
    perform bdc_field using 'RC29K-STLST'
    '1'.
    perform bdc_field using 'BDC_CURSOR'
    'RC29K-EXSTL'.
    perform bdc_dynpro using 'SAPLCSDI' '0111'.
    perform bdc_field using 'BDC_CURSOR'
    'RC29K-LABOR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPLCSDI' '0140'.
    perform bdc_field using 'BDC_CURSOR'
    'RC29P-POSTP(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=FCBU'.
    perform bdc_field using 'RC29P-IDNRK(001)'
    BDCDATA-IDNRK.
    perform bdc_field using 'RC29P-MENGE(001)'
    BDCDATA-MENGE.
    perform bdc_field using 'RC29P-MEINS(001)'
    BDCDATA-MEINS.
    perform bdc_field using 'RC29P-POSTP(001)'
    BDCDATA-POSTP.
    perform bdc_dynpro using 'SAPLCSDI' '0130'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'BDC_CURSOR'
    'RC29P-POSNR'.
    perform bdc_field using 'RC29P-POSNR'
    BDCDATA-POSNR. "'0010'.
    perform bdc_field using 'RC29P-IDNRK'
    BDCDATA-IDNRK. "'15'.
    perform bdc_field using 'RC29P-MENGE'
    BDCDATA-MENGE. "'1'.
    perform bdc_field using 'RC29P-MEINS'
    BDCDATA-MEINS. "'ml'.
    perform bdc_dynpro using 'SAPLCSDI' '0131'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'BDC_CURSOR'
    'RC29P-POTX1'.
    perform bdc_field using 'RC29P-SANKA'
    'X'.
    *perform bdc_transaction using 'CS01'.
    *perform close_group.
    CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
    REFRESH IBDCDATA.
    clear ibdcdata.
    endloop.
    Start new screen *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
    CLEAR iBDCDATA.
    iBDCDATA-PROGRAM = PROGRAM.
    iBDCDATA-DYNPRO = DYNPRO.
    iBDCDATA-DYNBEGIN = 'X'.
    APPEND ibDCDATA .
    ENDFORM.
    Insert field *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL NODATA.
    CLEAR iBDCDATA.
    iBDCDATA-FNAM = FNAM.
    iBDCDATA-FVAL = FVAL.
    APPEND iBDCDATA .
    ENDIF.
    ENDFORM.

    Hi Dilip,
    Please change your code.
    I request you to please go through BDC tutorials before even starting to write the program.
    There are many online tutorials which can help you with.
    Also, search in SDN.. there you will get more than thousand results.. with the search term BDC.
    Take this suggestion seriously before nayone reports the moderators that u have been posting this thread daily without taking into consideration the previous replies.
    Regards,
    Vishwa.

  • SFG alternative BOM in Different BOM

    Hi all ,
    I have one SFG which is having two alternative bom .
    This SFG is used in 2 finished material BOM .
    In FG material- 1  i want use SFG alternative -1 and
    in FG material -2  i want to use SFG alternative -2 ,
    when  I RUN mrp system should select the relevant boms.
    Is it possible , If yes how to do?
    Thanks ,
    Regards ,
    Ganesh

    Dear ,
    Are you running MRP at a time for FG1 and FG2  ?
    Basically , I am looking for an work around like this :
    1.FG1 BOM Alternative  : SFG1 as Component   -Keep BOM Status -1 Active ,    SFG1 BOM Alternative 1  :  X, Y  as component  -Keep BOM Status -1 -Active
    2.Keep FG2 and SFG2 BOM In -active -2 in CS02
    3.Create Routing of FG1 and SFG1 with the same manner .
    4.Run MRP-MD02-FG1-Check MD4C-Convert SFG1 planned Order to Production Ordre and also FG1 -Planned Oder to Production Order .
    5.Repeate the the Same for FG2 and SFG2 keeping FG1 and SFG2 as inactive BOM status -2 and susequently convert the same .
    This is may the work around .
    But standard procedure is that , you need to go for Aleter native BOM selection in two fold (FG and SFG for both ) based on the Following set up
    1.MRP4 -BOM Selction Method -Keep 2/3 SELECTION by PV
    2.Maintain  two different PV1/PV2  with a lot size and validity  in FG and SFG
    Now , when MRP will run in FG and explode the BOM at FG, SFG level , it will chek the MRP4 view indicator frist , if it 2  then it will go to PV 1 and PV2 check the Lot size and Validity and select the alternaitve BOM in two fold
    Lastly , Implement the BAdI MD_MODIFY_PRODVERS.
    Use the method MODIFY_PRODUCTION_VERSION to write your logic (for checking the stocks) and change the production version to
    Hope it clarifies your doubt
    Regards
    JH

  • How can I select alternative BOM when creating subcontract purchase order?

    In our business, a finish good material always has different production versions at the same time. Each of production versions has its own alternative BOM. When I create a planned order, I can select wanted BOM through specifying production version.
    But, when I creating subcontract purchase order, there is no field for me to specify the production version or which alternative BOM I prefer. In this case, I need to create a planned order at first. And then, convert the planned order to purchase. Only through this way, I can create a subcontract purchase order with my wanted BOM.
    So, I wonder if there is any way to select alternative BOM directly when creating subcontract purchase order.
    Thanks a lot!
    Regards
    Robbie

    Dear Mr. MM
    can you give me additional information about your solution?
    BUT I would not expect the sytem to offer you during the Purchasing cycle the different Production Versions as it is not meant to be. I remember having the same requirement some time ago and we solved it the way I described above, additionally we created a Pop up window with a user exit during the PO creation which offered the different production versions and if the one linked with the quota arrangement, the standard PV, is used in the PO.
    We also have the same problem, we activated businessfunction SCM_GEN_02 so that it is possible to have several production versions for one supplier, but unfortunatly it is not possible to change the production version in the purchase order. (business function does not seem to be very integrated)
    So i would be very interested in your solution because acually it seems that i have to modify the sap standard.
    Thank you and best regards
    Lisa

  • Change Alternative BOM

    Dear SAP expert,
    We made an alternative BOM according to Reformulation of the product.
    For now the new Formula (in alternative BOM) become the new standard for its Production procedure.
    So all productions process will refer to that new alternative BOM.
    Is there any way to set the new alternative BOM to be the default BOM??
    regards,
    Hachi

    Dear
    There are two ways you can achieve the same :
    1.Goto CS02-Select the Frist Alternative and Goto to BOM header -Quantity and log text -Keep the BOM status as 2-In active .So that wehn ever you plan throuh MRP-MD02 , system will take the Active BOM -which will be your latest Reformualtion BOM .
    2.One more way will create two production version PV1 and PV2.PV1 will be your Formualtion BOM with correct lot size and validity and PV2 will be with frist alternative  .If both of them have same validity , lot size , system will choose the fist PV  as FIFO even if you keep BOM Explosion methos as 2/3-Selection by production version .Or eles you can lock the second PV2 and test the same duing BOM explosion  through MRP-MD02.
    Try and come back
    Regards
    JH

  • How to change the header of Material BOM in a program for alternative BOM ?

    Requirement: An Inbound IDOC creates /change/delete Alternative Material BOM. The Alternative Material BOM can have alternative values from 1 to 99.
    ISSUE: I am good with CREATE and DELETE BOM. The issue is with CHANGE of header Material BOM. The fields which we need to change in the header is the base quantity, BOM status, Lot Size from and Lot Size to. Please note that I am able to change the item details of the BOM with FM CSAI_BOM_MAINTAIN. I find no FM /BAPI which would change the header of a material BOM.
    Please NOTE that I am using BAPI_MATERIAL_BOM_GROUP_CREATE to create alternative Material BOM. This has a parameter in TABLES called "VARIANTS" which has a field CS_FUNCTION which can have value from NEW/CHG/DEL .Also ,there is another parameter in TABLES called "ITEMASSIGNMENTS" which has a field CS_FUNCTION which can have value from NEW/CHG/DEL which implies this FM will allow us to change the BOM. But this does not work when I use it for CHANGE scenario with CHG value. I debugged this BAPI and observed it requires a STNLR(Bill of Material) value . This field is not there in any of the structure. I am not sure if I am passing the right parameters to it.
    Let me know if the parameters are passed correctly for CHANGE scenario.
    Also let me know if there is any other way(FM/BAPI)  to update the Header of the Material BOM ?
    Here is the code I am using:
    *& Report  ZTEST_S_E
    REPORT  ZTEST_S_E.
    * This code will create a material BoM for the material
    * MAINMATERIAL with the components COMPON1 and COMPON2.
    * Data Declaration
    DATA:
    it_bomgroup LIKE bapi1080_bgr_c OCCURS 0 WITH HEADER LINE,
    it_variants LIKE bapi1080_bom_c OCCURS 0 WITH HEADER LINE,
    it_items LIKE bapi1080_itm_c OCCURS 0 WITH HEADER LINE,
    it_matrel LIKE bapi1080_mbm_c OCCURS 0 WITH HEADER LINE,
    it_itemas LIKE bapi1080_rel_itm_bom_c OCCURS 0 WITH HEADER LINE,
    it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    * Fill the data
    * Material BoM Group Header Data
    CLEAR it_bomgroup.
    it_bomgroup-bom_group_identification = 'BAPI_SMP_COL1'.
    it_bomgroup-object_type = 'BOM'.
    it_bomgroup-object_id = 'SIMPLE1'.
    it_bomgroup-bom_usage = '1'. " YOU COULD CHANGE THE BOM USAGE TO YOUR
    *NEEDS
    it_bomgroup-ltxt_lang = sy-langu.
    it_bomgroup-technical_type = ' '.
    it_bomgroup-bom_text = 'Simple BoM - FM'.
    APPEND it_bomgroup.
    * Header Details of the different variants
    CLEAR it_variants.
    it_variants-CHANGE_NO  = '500000000349'.
    it_variants-bom_group_identification = 'BAPI_SMP_COL1'.
    it_variants-object_type = 'BOM'.
    it_variants-object_id = 'SIMPLE1'.
    it_variants-alternative_bom = '01'.
    it_variants-bom_status = '01'.
    it_variants-base_qty = '2.000'.
    it_variants-valid_from_date = sy-datum.
    it_variants-function = 'CHG'.
    APPEND it_variants.
    * Details of the items of the variants
    CLEAR it_items.
    it_items-bom_group_identification = 'BAPI_SMP_COL1'.
    it_items-object_type = 'ITM'.
    it_items-object_id = 'SIMPLE1'.
    it_items-item_no = '0010'.
    it_items-item_cat = 'L'.
    it_items-component = '030790490'.
    it_items-comp_qty = '2'.
    it_items-valid_from_date = sy-datum.
    APPEND it_items.
    CLEAR it_items.
    it_items-bom_group_identification = 'BAPI_SMP_COL1'.
    it_items-object_type = 'ITM'.
    it_items-object_id = 'SIMPLE1'.
    it_itemas-change_no = '500000000138'.
    it_items-item_no = '0020'.
    it_items-item_cat = 'L'.
    it_items-component = '030790490'.
    it_items-comp_qty = '3'.
    it_items-valid_from_date = sy-datum.
    APPEND it_items.
    * Details of the materials of the different variants
    CLEAR it_matrel.
    it_matrel-bom_group_identification = 'BAPI_SMP_COL1'.
    it_matrel-material = '030790490'.
    it_matrel-bom_usage = '1'.
    it_matrel-alternative_bom = '01'.
    APPEND it_matrel.
    * Linking items to the corresponding variants
    CLEAR it_itemas.
    it_itemas-bom_group_identification = 'BAPI_SMP_COL1'.
    it_itemas-sub_object_type = 'ITM'.
    it_itemas-sub_object_id = 'SIMPLE1'.
    it_itemas-super_object_type = 'BOM'.
    it_itemas-super_object_id = 'SIMPLE1'.
    it_itemas-valid_from_date = sy-datum.
    it_itemas-function = 'CHG'.
    APPEND it_itemas.
    * Create variants
    CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
    EXPORTING
    all_error = 'X'
    TABLES
    bomgroup = it_bomgroup
    variants = it_variants
    items = it_items
    materialrelations = it_matrel
    itemassignments = it_itemas
    return = it_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    LOOP AT it_return.
    WRITE:/ it_return-type, it_return-id, it_return-number,
    it_return-message.
    ENDLOOP.
    Let me know if the parameters are passed correctly for CHANGE scenario.
    Also let me know if there is any other way(FM/BAPI)  to update the Header of the Material BOM ?

    Try doing something like this:
    class MyJTextArea extends JTextArea {
        public boolean keyDown(Event evt,int key) {
            if(key == 13 || key == 10) { // or whatever ascii codes enter may have
                // move carret to next line
            } else {
                super.keyDown(evt, key);
    }which means you have got to catch the enter-key before the actutal JTextArea does this.
    p.s. look at my post, maybe you can help me, too.
    http://forum.java.sun.com/thread.jsp?forum=5&thread=465803&tstart=0&trange=100

Maybe you are looking for