BAPI-- To create BOM

Hi all,
can u plz suggest a BAPI to create a BOM in sap.i need to upload a file containing BOM data & then i need to pass those datas to bapi to crteate a BOM.
what r the datas to be mandatory to create a BOM.
can u plz give some coding regarding the creation of BOM for reference?
it is urgent.
any idea will be highly appreaciated.
Thanks & reagrds
pabitra

Hi Eswar,
Thanks u all for ur help. i want to create a multi level BOM. which field of this bapi is responsible for level.
i want to input the LEVEL to this bapi.but i am not getting proper field in this BAPI for level.
plz suggest , how i can create a multi level BOM?
Regards
pabitra

Similar Messages

  • FM/BAPI to create BOM where alternative can be passed as input

    Hi
    My requirement is to create BOM  of a material where I need to input 'Alternative BOM' also like ijn CS01 t-code.
    I got one FM CSAP_MAT_BOM_CREATE which is creating BOM , but it does not take 'Alternative BOM' as input parameter, rather it creates default alternative BOM. But I need a FM which will take alternative BOM as input.
    Please help.

    Dear Avishek,
    In my understanding the system creates the first alternative BOM 01 for a BOM usage,whenever you
    create through CS01 or by a functional module,no need of any input for this field.
    come back with your queries,if you are facing some problem on this.
    Regards
    Mangalraj.S

  • BAPI to Create a BOM .

    Hi All,
    my requirement is i wll be getting the BOM data through a file interface and we need to create BOM using the data in the file.
    we are planning to use BAPI to create BOM.
    Can some one plz tell me is there any BAPI available to create BOM by coping from existing BOM.
    can we use BDC if there is no BAPI available.
    thanks
    Chindam.

    thanks for your response but unfortunately did not solve my issue.
    Yes the above 2 FM can be used to create a BOM but i want to know what are the various fields used to create BOM by copying from the existing BOM (Copy as).
    thanks

  • BAPI'S or Function Modules for creating BOM

    Hi all,
    Can any one please suggest me what is the exact function module or BAPI for creating BOM..
    If any created the same through bapi's or FM your sample codes are also welcome..
    Thanks and Regards,
    Keny

    BAPI_DOCUMENT_CREATE2 and BAPI_MATERIAL_BOM_GROUP_CREATE
    chk them

  • Bapi for Equipment BOM

    Is there any standard BAPI to create Equipment BOM? Tcode - IB01

    Hello,
    I use that bapi for create BOM but not equipement BOM.
    I find on forum, response wiche can help you :
    Equipment BOM Upload BAPI
    RFC / BAPI for Equipment BOM - IB01
    http://wiki.sdn.sap.com/wiki/display/ABAP/ECCstandardBatchInputprograms
    Thierry

  • Error while creating BOM using BAPI 'BAPI_BOM_UPLOAD_SAVE'

    Hi All,
    We are getting an error as 'Data is incomplete' while trying to create BoM using the bapi 'BAPI_BOM_UPLOAD_SAVE', if the item contains Item category as 'T'. But for other item category like 'L' or 'N', the bapi is sucessfull.
    The values that we pass to fill the item category 'T' are operation, item_cat, bom_itm_no, COMPON_QTY, FIXED_QTY as 'X', UNMEAS as 'ST', ITEM_TEXT1 and ITEM_TEXT2.
    Anyone who has faced same problem or has a solution to the problem, kindly provide a solution.
    Regards,
    Vijay

    The error you receive is because of different config for different Item Categories. Find out from the functional team what fields have they kept mandatory for the item category 'T'. You may not be passing one of those fields in the BAPI.
    Try creating a BOM manually for item category 'T' and you may figure our which field you are missing.

  • BAPIs to create and change the BOM

    Hi experts,
    Is there any BAPI to Create or to Change the BOM
    Thanks,
    kruthik.

    Hi ,
    For Routing Create 'BAPI_ROUTING_CREATE'.
    For char change BAPI_CHARACT_CHANGE.
    Edited by: Selva M on Feb 24, 2010 11:38 AM

  • How to create BOM(Bill Of Material) item data from flat file?

    I have two flat files one is BOM(Bill Of Material) header data and BOM item data. BOM header is already created, now I want to create BOM item data with reference to the header data. Is there any standard direct batch input method in LSMW or Is there any standard BAPI or Is there any standard BDC report program to do the task? CS01 is the TCode to create BOM.

    Hi,
    The DI program works for create step CS01 and not for CS02.
    Perhaps this ( adding items in header by Tx: CS02 ) could be achieved by a Recording step in LSMW.
    Best Regards, Murugesh

  • BAPI for creating recipe

    We are trying to develop an interface with a third party software and we need to upload recipe from there.
    So i am need a BAPI to create recipe and maintain aswell.
    also I am trying to use BAPI BAPI_MATERIAL_SAVEDATA to create material and BAPI
    BAPI_BOM_UPLOAD_SAVE to create BOM .
    I manually entered data into fields but not able to create material and BOm.
    Please give me the procedure on how to use them and BAPI for creating Recipe.
    Help is appriciated.

    Hi Mirza
    You can use BAPI_MATERIAL_BOM_GROUP_CREATE to create a BOM,
    Regards
    UK

  • BAPI  for Order BOM

    Hi All,
    Is there any BAPI for Order BOM
    PLS can you help me
    thanks
    mars

    Hi,
    Check ds BAPI..
    BAPI_MATERIAL_BOM_GROUP_CREATE Creation of a material BOM group
    BAPI_MAT_BOM_EXISTENCE_CHECK   Check whether BOM for material exists
    CSUL                           CRM Upload of BOM Data
    BAPI_BOM_UPLOAD_SAVE           Main Module for BOM Update (Upload from CRM)
    Code_
    DATA: BEGIN OF i_bom OCCURS 0,
          matnr(18),
          werks(4),
          stlan(1),
          stlal(2),
          stktx(40),
          bmeng(16),
          menge(16),
          posnr(4),
          postp(1),
          meins(3),
          datuv(10),
          fmeng(1),
          idnrk(18),
          potx1(40),
          ausch(7),
          END OF i_bom.
    Extracting Document and Doc type for POSTP = D.
    DATA : BEGIN OF i_stpo OCCURS 1,
           doknr(25),
           dokar(3),
           posnr(4),
           stlnr LIKE mast-stlnr,
           END   OF i_stpo.
    Local work area
    DATA:  g_my_rec_in   LIKE i_bom.
    Declare internal table for Call Transaction and BDC Session
    DATA: i_bdc_table LIKE bdcdata OCCURS 0 WITH HEADER LINE.
                         Global Variables                                *
    DATA: g_counter(2) TYPE n,
          g_field_name(18) TYPE c,
          zc_yes  TYPE syftype VALUE 'X'.
                         Selection Screen                                *
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    PARAMETERS: p_fname1 TYPE localfile .
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
    PARAMETERS: p_rloc1 AS CHECKBOX  DEFAULT 'X'.
    SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-005.
    PARAMETERS p_group(12) OBLIGATORY DEFAULT 'ZBOM'.
    SELECTION-SCREEN END OF BLOCK c.
    SELECTION-SCREEN END OF BLOCK b.
    SELECTION-SCREEN END OF BLOCK a.
    **WRITE the report header
    TOP-OF-PAGE.
      INCLUDE zheading.
                         Start of selection                              *
    START-OF-SELECTION.
    Load Input file
      PERFORM f_load_input_file.
    Create BDC records.
      PERFORM create_bdc_records .
    *&      Form  Create_BDC_records
          text:* perform the BDC for the records in the internal table
    -->  p1        text
    <--  p2        text
    FORM create_bdc_records .
      DATA: v_stlnr LIKE mast-stlnr.
      DATA: v_postp(1) VALUE 'D'.
      IF NOT i_bom[] IS INITIAL.
    Open BDC session
        PERFORM open_bdc_session.
        SORT i_bom BY matnr werks posnr.
        SELECT  SINGLE stlnr  INTO v_stlnr
        FROM mast
        WHERE    matnr = i_bom-matnr
         AND     werks = i_bom-werks.
        SELECT doknr dokar posnr stlnr
                    INTO TABLE i_stpo
                    FROM stpo
                    FOR ALL ENTRIES IN i_bom
                    WHERE postp = v_postp
                    AND   posnr = i_bom-posnr
                    AND   stlnr = v_stlnr.
        SORT i_stpo BY posnr stlnr.
        LOOP AT i_bom.
          g_my_rec_in = i_bom.
          READ TABLE i_stpo WITH KEY posnr = i_bom-posnr
                                     stlnr = v_stlnr
                                     BINARY SEARCH.
          AT NEW matnr.
            CLEAR i_bdc_table[].
            PERFORM insert_screen_header.
          ENDAT.
    Setting up counter for 20 line items
          IF g_counter = 20.
            g_counter = 1.
          ENDIF.
          PERFORM bdc_field  USING 'BDC_OKCODE'
                                        '/00'.
    *next screen
          PERFORM bdc_dynpro USING 'SAPLCSDI' '0140'.
          PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29P-FMENG(01)'.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
          CONCATENATE 'RC29P-POSNR('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-posnr.
          CONCATENATE 'RC29P-IDNRK('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-idnrk.
          CONCATENATE 'RC29P-MENGE('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-menge.
          CONCATENATE 'RC29P-MEINS('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-meins.
          CONCATENATE 'RC29P-POSTP('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-postp.
          CONCATENATE 'RC29P-FMENG('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-fmeng.
    *next screen
          PERFORM bdc_dynpro USING 'SAPLCSDI' '0130'.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
    Check the Item category to direct the screen flow accordingly.
          CASE i_bom-postp.
            WHEN 'B'.
              PERFORM item_text_insert.
            WHEN 'Z'.
              PERFORM item_text_insert.
            WHEN 'T'.
              PERFORM item_text_insert.
            WHEN 'N'.
              PERFORM bdc_field   USING 'BDC_CURSOR' 'RC29P-AUSCH'.
              PERFORM bdc_field   USING 'RC29P-AUSCH' i_bom-ausch.
    next screen
              PERFORM item_text_insert.
    *next screen
              PERFORM bdc_dynpro  USING 'SAPLCSDI' '0133'.
              PERFORM bdc_field   USING 'BDC_OKCODE' '/00'.
              PERFORM bdc_field   USING 'RC29P-EKORG' ' '.
            WHEN 'D'.
              PERFORM bdc_field   USING 'RC29P-DOKNR' i_stpo-doknr.
              PERFORM bdc_field   USING 'RC29P-DOKAR' i_stpo-dokar.
    next screen
              PERFORM item_text_insert.
    When POSTP = X, L.
            WHEN OTHERS.
              PERFORM bdc_field   USING 'BDC_CURSOR' 'RC29P-AUSCH'.
              PERFORM bdc_field   USING 'RC29P-AUSCH' i_bom-ausch.
    next screen
              PERFORM item_text_insert.
          ENDCASE.
          g_counter = g_counter + 1.
    next screen
          PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
          PERFORM bdc_field       USING 'BDC_CURSOR' 'RC29P-POSNR(01)'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '=FCBU'.
          AT END OF matnr.
            PERFORM insert_bdc_new.
          ENDAT.
        ENDLOOP.
        CLEAR i_bom[].
        PERFORM close_bdc_session.
    Release the BDC sessions created
        PERFORM release_bdc.
      ENDIF.
    ENDFORM.                    " open_group
    *&      Form  bdc_dynpro_start
          Initialize the screen
         -->P_G_PROGRAM_1
         -->P_G_SCREEN
    FORM bdc_dynpro USING    p_g_program_1
                                    p_g_screen.
      CLEAR i_bdc_table.
      i_bdc_table-program  = p_g_program_1.
      i_bdc_table-dynpro   = p_g_screen.
      i_bdc_table-dynbegin = 'X'.
      APPEND i_bdc_table.
    ENDFORM.                    " bdc_dynpro_start
    *&      Form  bdc_field
           Insert field                                                  *
    FORM bdc_field USING f_name f_value.
      CLEAR i_bdc_table.
      i_bdc_table-fnam = f_name.
      i_bdc_table-fval = f_value.
      APPEND i_bdc_table.
    ENDFORM.                    "bdc_insert_field
    *&      Form  open_bdc_session
         Open the BDC session
    FORM open_bdc_session .
    Open BDC session and creat and update condition records
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client                    = sy-mandt
          DEST                      = FILLER8
          group                     = p_group
          HOLDDATE                  = FILLER8
          keep                      = 'X'
          user                      = sy-uname
          RECORD                    = FILLER1
          PROG                      = SY-CPROG
        IMPORTING
          QID                       =
    EXCEPTIONS
       client_invalid            = 1
       destination_invalid       = 2
       group_invalid             = 3
       group_is_locked           = 4
       holddate_invalid          = 5
       internal_error            = 6
       queue_error               = 7
       running                   = 8
       system_lock_error         = 9
       user_invalid              = 10
       OTHERS                    = 11
      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.                    " create_bdc_session
    *&      Form  insert_screen_header
          Insert the Header data into the screens
    FORM insert_screen_header .
      g_counter = 1.
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0100'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29N-STLAL'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'RC29N-MATNR' g_my_rec_in-matnr.
      PERFORM bdc_field  USING 'RC29N-WERKS' g_my_rec_in-werks.
      PERFORM bdc_field  USING 'RC29N-STLAN' g_my_rec_in-stlan.
      PERFORM bdc_field  USING 'RC29N-STLAL' g_my_rec_in-stlal.
      PERFORM bdc_field  USING 'RC29N-DATUV' g_my_rec_in-datuv.
    next screen
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0110'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29K-BMENG'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'RC29K-STKTX' g_my_rec_in-stktx.
      PERFORM bdc_field  USING 'RC29K-BMENG' g_my_rec_in-bmeng.
    *next screen
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0111'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29K-LABOR'.
    ENDFORM.                    " insert_screen_header
    *&      Form  insert_bdc
         Insert the BDC session
    FORM insert_bdc_new .
      CALL FUNCTION 'BDC_INSERT'
         EXPORTING
           tcode                  = 'CS01'
          POST_LOCAL             = NOVBLOCAL
          PRINTING               = NOPRINT
          SIMUBATCH              = ' '
          CTUPARAMS              = ' '
         TABLES
           dynprotab              = i_bdc_table
      EXCEPTIONS
        internal_error         = 1
        not_open               = 2
        queue_error            = 3
        tcode_invalid          = 4
        printing_invalid       = 5
        posting_invalid        = 6
        OTHERS                 = 7
      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 i_bdc_table[].
    ENDFORM.                    " insert_bdc
    *&      Form  close_bdc_session
          Close the BDC session
    FORM close_bdc_session .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                not_open    = 1
                queue_error = 2
                OTHERS      = 3.
      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.                    " close_bdc_session
    *&      Form  f_load_input_file
         Load the file into the Internal table
    FORM f_load_input_file.
      IF p_rloc1 = zc_yes.
        CALL FUNCTION 'WS_UPLOAD'
             EXPORTING
                  filename                = p_fname1
                  filetype                = 'DAT'
             TABLES
                  data_tab                = i_bom
             EXCEPTIONS
                  conversion_error        = 1
                  file_open_error         = 2
                  file_read_error         = 3
                  invalid_type            = 4
                  no_batch                = 5
                  unknown_error           = 6
                  invalid_table_width     = 7
                  gui_refuse_filetransfer = 8
                  customer_error          = 9
                  OTHERS                  = 10.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_load_input_file
    *&      Form  release_bdc
         Release BDC session
    FORM release_bdc.
      SUBMIT rsbdcsub WITH mappe EQ p_group
                      WITH von EQ sy-datum
                      WITH bis EQ sy-datum
                      WITH fehler EQ '.'
                      EXPORTING LIST TO MEMORY
                      AND RETURN.
    ENDFORM.                    " release_bdc
    *&      Form  item_text_insert
          Repetitive code in the screen flow
    FORM item_text_insert.
      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-POTX1' i_bom-potx1.
    ENDFORM.                    " item_text_insert
    Reward If Helpfull
    regards,
    Mehul

  • BAPI to create demands on MD04

    Hello,
    Can anyone direct me to a BAPI that will create the demands for a Goods Issue of a material to a subcontractor?  I need the demands to show up in MD04 and ME2O.
    I plan to use the FM CS_BOM_EXPL_MAT_V2  to explode a subcontracting BOM and then use a BAPI to create the demands for a GI to the subcontractor.
    Any ideas?
    Thanks,
    Matt

    Thanks for the response.
    In this case, I am trying to get a kanban that uses a scheduling agreement with subcontracting to work.
    Standard SAP does not allow scheduling agreements and subcontracting to work together.  The other option is a PO with a reference to a contract and that creates too many POs.
    So I am working on a mod that will allow scheduling agreements to work with subcontracting for our kanbans.
    Does that make sense?
    Thanks,
    Matt

  • BAPI for create IR and GR

    Hi All,
    I would like to use the BAPI to create the IR and GR.
    But i don't know which BAPI is use for create the IR and GR . Could you mind give any information about this?
    Regards,
    Luke

    Hi Luke,
    The function module "BAPI_GOODSMVT_CREATE " would perform the task.  Please refer to the following link.
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    Regards.

  • BAPI to create Excise Invoice and Commercial Invoice

    Hi All,
    Can u tell me the BAPI for creating Excise and Commercial Invoice.
    Moderator message: please do some research before asking.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Mar 2, 2011 5:56 PM

    Hi,
    You can make the appropriate setting in Customizing for Excise Duty, by choosing Basic Settings -> Maintain Excise Groups, and selecting Create EI (Create Excise Invoice Automatically)
    Also maintain the default excise and series group in the configuration.
    Logistics general>Tax on Goods Movement>India>Basic Settings>Maintain Excise groups. For your Excise group maintain the check Excise invoice during Billing.
    After maintaining the same also maintain the default values in Logistics general>Tax on Goods Movement>India>Business transactions>Outgoing Excise invoices-->Maintain Default Excise groups and Series groups.
    Regards,

  • Can not create BOM

    Hi All,
    While creating BOM through CS01 i am getting the following error in the first screen only -
    ' BOM can only be extended via master recipe'.
    Thnx in advance.

    hi,
    BOM is created through Master receipe . So error message is displayed "BOM can only be extended
    via master recipe". You can change this error message to warning message.
    In process industry (PP-PI),BOM is maintained in Master receipe along with resource . New BOM no.
    is maintained along with new production version with receipe group and counter.
    In the change mode option of master reecipe ( T-code :c202), u will find that current status of
    BOM and accordingly u will assign alternate BOM no. the material.
    In this new BOM will be created for the material.
    I think it will resolve your problem. If any further query pl revert.
    Regards
    Vinod

  • BAPI to create Scheduling Agreement of VA31

    Dear gurus,
    I need to find the BAPI or Function Module to create Scheduling Agreement of VA31 from the uploaded data. I know that I can use BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order of VA01. Can I use the same bapi to create the scheduling agreement of VA31? Both of the screens seems to look quite the same but their order types are different. Any suggestion on this?
    Thank you for your help. Have a nice day.
    Best Regards,
    Hedy

    Hi,
    FM
    BAPI_CUSTSCHEDULAGREE_CONFDELV
    Functionality
    You can use this method to make a delivery confirmation in the SD scheduling agreement
    Example
    1. Generating delivery for a scheduling agreement item.
    2. Changing a delivery item.
    3. Posting of goods issue for delivery.
    4. Deleting a delivery item or a delivery.
    Regards,
    Venkatesh

Maybe you are looking for

  • Using Itunes 12.0.1.26 on iMac with Yosemite 10.10.1.  I 'select all' to highlight, dragg

    I have Itunes 12.0.1.26 on my home iMac (mid-2011) with OS X Yosemite 10.10.1. I have been using 'select all' to highlight a playlist of 42 songs which I've purchased on iTunes and dragging and copying them to a Lexar USB flash drive. They appear to

  • IPod Nano Won't Update Or Restore To 1.1.3

    I tried to update an iPod nano to 1.1.3 using iTunes 7.2 and the update froze after being prompted for an admin user id and password. After 10 minutes I killed iTunes and then tried to update the nano again after iTunes discovered it was in recovery

  • Crystal reports 2013 , SAP MDX Driver not able to connect with BW BEX Query

    Hi All, We just installed Crystal 2013, and want to create crystal report on SAP BW CUBE/BEX Query through SAP MDX Driver. 1.When start connecting through SAP MDX Query option from new connection , SAP Systems which are in SAPLOGON are not appearing

  • Firewire Video Out

    This is so maddening. Its happened before. I sit down to FCE and its been open on the computer. I click on a sequence, and want to see it on external video monitor that was operating fine earlier in the day. It always works fine. Suddenly, no output.

  • The Dreamweaver Help doesn't work

    Hi, The Help documentation doesn't show. When I access it - eg "Help > Dreamweaver Help" - the help window opens but it's completely blank. And when I search I just get the spinning wheel. Does anyone know why this could be happening? My install is: