How to create material bom through CS01 if bom created by using ppe

Hi experts,
I have created a material bom through PPE of material A. Now i want to create bom through CS01for same material A.
system shows error "A breakdown (PVS/VA) already exists in iPPE for material".
So how can create bom through CS01?
Suggest me.
Regards,
Nitin Nerkar

Hi,
Please check and implement the below note,
[1311089|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1311089]
Thanks
Hrishi

Similar Messages

  • How to connect to website through computer if i do not use internet through phon's sim

    how to connect to website through computer if i do not use internet through phon's sim

    Connect through wifi.
    Turn off Cellular data through settings __ General __ Network __ Cellular Data on/off

  • How to create material(mm01)  through function module or bapi

    Hi,
        this is kiran iam sap fresher.

    Hi,
    try this
    *& Report ZKAR_MATMAS_BAPI
    *& This program demonstrates how easy it is to create Material master
    *& data using BAPI_MATERIAL_SAVEDATA
    *& The program also generates a report post-execution displaying errors
    *& as well as successful uploads
    REPORT ZKAR_MATMAS_BAPI.
    * TABLES
    * FLAGS *
    DATA: F_STOP. " Flag used to stop processing
    * DATA DECLARATIONS *
    DATA : V_EMPTY TYPE I, " No. of empty records
    V_TOTAL TYPE I. " Total no. of records.
    * STRUCTURES & INTERNAL TABLES
    *BAPI structures
    DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control Information
    BAPI_MAKT LIKE BAPI_MAKT, " Material Description
    BAPI_MARA1 LIKE BAPI_MARA, " Client Data
    BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
    BAPI_MARC1 LIKE BAPI_MARC, " Plant View
    BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
    BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
    BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
    BAPI_RETURN LIKE BAPIRET2. " Return Parameter
    *--- Internal table to hold excel file data
    DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *--- Internal table to hold Matetrial descriptions
    DATA: BEGIN OF IT_MAKT OCCURS 100.
            INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF IT_MAKT.
    *--- Internal to hold the records in the text file
    DATA : BEGIN OF IT_DATA OCCURS 100,
                WERKS(4), " Plant
                MTART(4), " Material type
                MATNR(18), " Material number
                MATKL(9) , " Material group
                MBRSH(1), " Industry sector
                MEINS(3), " Base unit of measure
                GEWEI(3), " Weight Unit
                SPART(2), " Division
                EKGRP(3), " Purchasing group
                VPRSV(1), " Price control indicator
                STPRS(12), " Standard price
                PEINH(3), " Price unit
                SPRAS(2), " Language key
                MAKTX(40), " Material description
                END OF IT_DATA.
    * SELECTION SCREEN. *
    SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
    PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT " Input File
    'C:\Material_master.XLS'.
    PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
    PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
    P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
    P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
    P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK SCR1.
    * AT SELECTION-SCREEN *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *--- Validating file
      PERFORM VALIDATE_FILE USING P_FILE.
    * START-OF-SELECTION
    START-OF-SELECTION.
    *--- Perform to convert the Excel data into an internal table
      PERFORM CONVERT_XLS_ITAB.
      IF NOT IT_DATA[] IS INITIAL.
    *--- Perform to delete Header lines
        PERFORM DELETE_HEADER_EMPTY_RECS.
      ENDIF.
    * END OF SELECTION. *
    END-OF-SELECTION.
    *--- Perform to upload Material Master data
      PERFORM UPLOAD_MATMAS.
    * Form : validate_input_file
    * Description : To provide F4 help for file if read from PC
    FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          FILE_NAME     = F_FILE
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
      IF SY-SUBRC <> 0.
        MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
      ENDIF.
    ENDFORM. " validate_input_file
    *& Form CONVER_XLS_ITAB
    * text
    FORM CONVERT_XLS_ITAB.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME    = P_FILE
          I_BEGIN_COL = P_BEGCOL
          I_BEGIN_ROW = P_BEGROW
          I_END_COL   = P_ENDCOL
          I_END_ROW   = P_ENDROW
        TABLES
          INTERN      = IT_INTERN.
      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 to move the data into an internal data
      PERFORM MOVE_DATA.
    ENDFORM. " CONVERT_XLS_ITAB
    *& Form MOVE_DATA
    * text
    FORM MOVE_DATA.
      DATA : LV_INDEX TYPE I.
      FIELD-SYMBOLS <FS>.
    *--- Sorting the internal table
      SORT IT_INTERN BY ROW COL.
      CLEAR IT_INTERN.
      LOOP AT IT_INTERN.
        MOVE IT_INTERN-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
        ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS>.
    *--- Asigning the field value to a field symbol
        MOVE IT_INTERN-VALUE TO <FS>.
        AT END OF ROW.
          APPEND IT_DATA.
          CLEAR IT_DATA.
        ENDAT.
      ENDLOOP.
    ENDFORM. " MOVE_DATA
    *& Form DELETE_HEADER_EMPTY_RECS
    * To delete the Header and empty records
    FORM DELETE_HEADER_EMPTY_RECS.
      DATA: LV_TABIX LIKE SY-TABIX.
      IF NOT P_HEADER IS INITIAL.
        LOOP AT IT_DATA.
          IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
            DELETE IT_DATA FROM 1 TO P_HEADER.
    * P_HEADER = 0.
            EXIT.
          ENDIF.
        ENDLOOP.
      ENDIF.
      CLEAR IT_DATA.
    *--- To delete the empty lines from internal table
      LOOP AT IT_DATA.
        LV_TABIX = SY-TABIX.
        IF IT_DATA IS INITIAL.
          V_EMPTY = V_EMPTY + 1.
          DELETE IT_DATA INDEX LV_TABIX..
        ENDIF.
      ENDLOOP.
      CLEAR IT_DATA.
    *--- Total no of recs in file
      DESCRIBE TABLE IT_DATA LINES V_TOTAL.
      IF V_TOTAL = 0.
        MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
        F_STOP = 'X'.
        STOP.
      ENDIF.
    ENDFORM. " DELETE_HEADER_EMPTY_RECS
    *& Form UPLOAD_MATMAS
    * to upload Material Master data
    FORM UPLOAD_MATMAS .
      LOOP AT IT_DATA.
    * Header
        UNPACK IT_DATA-MATNR TO IT_DATA-MATNR.
        BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
        BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
        BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
        BAPI_HEAD-BASIC_VIEW = 'X'.
        BAPI_HEAD-PURCHASE_VIEW = 'X'.
        BAPI_HEAD-ACCOUNT_VIEW = 'X'.
    * Material Description
        REFRESH IT_MAKT.
        IT_MAKT-LANGU = IT_DATA-SPRAS.
        IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
        APPEND IT_MAKT.
    * Client Data - Basic
        BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
        BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
        BAPI_MARA1-UNIT_OF_WT = IT_DATA-GEWEI.
        BAPI_MARA1-DIVISION = IT_DATA-SPART.
        BAPI_MARAX-MATL_GROUP = 'X'.
        BAPI_MARAX-BASE_UOM = 'X'.
        BAPI_MARAX-UNIT_OF_WT = 'X'.
        BAPI_MARAX-DIVISION = 'X'.
    * Plant - Purchasing
        BAPI_MARC1-PLANT = IT_DATA-WERKS.
        BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
        BAPI_MARCX-PLANT = IT_DATA-WERKS.
        BAPI_MARCX-PUR_GROUP = 'X'.
    * Accounting
        BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
        BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
        BAPI_MBEW1-STD_PRICE = IT_DATA-STPRS.
        BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
        BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
        BAPI_MBEWX-PRICE_CTRL = 'X'.
        BAPI_MBEWX-STD_PRICE = 'X'.
        BAPI_MBEWX-PRICE_UNIT = 'X'.
    *--- BAPI to create material
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
        HEADDATA = BAPI_HEAD
        CLIENTDATA = BAPI_MARA1
        CLIENTDATAX = BAPI_MARAX
        PLANTDATA = BAPI_MARC1
        PLANTDATAX = BAPI_MARCX
    * FORECASTPARAMETERS =
    * FORECASTPARAMETERSX =
    * PLANNINGDATA =
    * PLANNINGDATAX =
    * STORAGELOCATIONDATA =
    * STORAGELOCATIONDATAX =
    * VALUATIONDATA = BAPI_MBEW1
    * VALUATIONDATAX = BAPI_MBEWX
    * WAREHOUSENUMBERDATA =
    * WAREHOUSENUMBERDATAX =
    * SALESDATA = BAPI_MVKE1
    * SALESDATAX = BAPI_MVKEX
    * STORAGETYPEDATA =
    * STORAGETYPEDATAX =
        IMPORTING
        RETURN = BAPI_RETURN
        TABLES
        MATERIALDESCRIPTION = IT_MAKT
    * UNITSOFMEASURE =
    * UNITSOFMEASUREX =
    * INTERNATIONALARTNOS =
    * MATERIALLONGTEXT =
    * TAXCLASSIFICATIONS =
    * RETURNMESSAGES =
    * PRTDATA =
    * PRTDATAX =
    * EXTENSIONIN =
    * EXTENSIONINX =
        IF BAPI_RETURN-TYPE = 'E'.
          WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,IT_DATA-MATNR.
        ELSEIF BAPI_RETURN-TYPE = 'S'.
          WRITE: 'Successfully created material' ,IT_DATA-MATNR.
        ENDIF.
      ENDLOOP.
    ENDFORM. " UPLOAD_MATMAS

  • Create materialized view is failing when refresh fast is used

    version 10.2.0.4 on solaris
    This statement is working fine
    CREATE MATERIALIZED VIEW MVIEW1
    TABLESPACE MIS_CURD01
    BUILD IMMEDIATE
    as
    SELECT ACTIVITY_ID "ACTIVITY_ID",
    ASSOC_ID "ASSOC_ID",
    PIT_ROLE_CODE "PIT_ROLE_CODE",
    PIT_BANK_CODE "PIT_BANK_CODE",
    PIT_COST_CENTER "PIT_COST_CENTER",
    RESP_ASSOC_IND "RESP_ASSOC_IND"
    FROM TABLE1@DBLINK;
    The statement with fast refresh is failing with this error message
    ERROR at line 18:
    ORA-12018: following error encountered during code generation for
    "TABLE1"
    ORA-00942: table or view does not exist
    Here is the statement
    CREATE MATERIALIZED VIEW MVIEW1
    TABLESPACE MIS_CURD01
    NOCACHE
    LOGGING
    NOCOMPRESS
    NOPARALLEL
    BUILD IMMEDIATE
    USING INDEX TABLESPACE MIS_CURI01
    REFRESH FAST ON DEMAND
    WITH PRIMARY KEY
    AS
    SELECT ACTIVITY_ID "ACTIVITY_ID",
    ASSOC_ID "ASSOC_ID",
    PIT_ROLE_CODE "PIT_ROLE_CODE",
    PIT_BANK_CODE "PIT_BANK_CODE",
    PIT_COST_CENTER "PIT_COST_CENTER",
    RESP_ASSOC_IND "RESP_ASSOC_IND"
    FROM TABLE1@DBLINK;
    Any idea what's going wrong here. Thanks for your help in advance.
    Edited by: user11319873 on Jun 30, 2010 4:17 PM

    Refresh FAST requires that
    a. An MV Log (Snapshot Log) be created on the source table
    b. The user doing the refresh (i.e. the account that the DBLink uses) has SELECT privilege on the MV Log.
    Hemant K Chitale

  • How to refresh materialized view by trigger

    hi,
    im having a problem in refreshing materialized view through a trigger.
    CREATE OR REPLACE TRIGGER L_TRG_MARC_TEST
    BEFORE DELETE OR INSERT OR UPDATE ON MARC_BOOK_B_ENG
    BEGIN
    DBMS_MVIEW.REFRESH('TITLE_ENG_MV','C','',TRUE,FALSE,0,0,0,TRUE);
    END;
    Trigger created.
    SQL> DELETE FROM MARC_BOOK_B_ENG;
    DELETE FROM MARC_BOOK_B_ENG
    ERROR at line 1:
    ORA-04092: cannot COMMIT in a trigger
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 849
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 832
    ORA-06512: at "LIBQAL1.L_TRG_MARC_TEST", line 2
    ORA-04088: error during execution of trigger 'LIBQAL1.L_TRG_MARC_TEST'
    plz tell me how to refresh materialized view thru trigger,,and what is wrong in above mentioned situation.
    Regards

    DBMS_MVIEW.REFRESH implicitly commits. COMMIT is not permitted in triggers, as you can see, unless you use AUTONOMOUS_TRANSACTION.
    Try
    CREATE OR REPLACE TRIGGER L_TRG_MARC_TEST
    BEFORE DELETE OR INSERT OR UPDATE ON MARC_BOOK_B_ENG
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    DBMS_MVIEW.REFRESH('TITLE_ENG_MV','C','',TRUE,FALSE,0,0,0,TRUE);
    END;

  • Save EAN11 field while creating POrder creation through Function module

    Hi All,
    I want to update EAN11 field in material master while creating Purchase Order through function module. I am using function module BAPI_PO_CREATE1 for creating purchase order. There are no structures in the PO creation FM in which EAN11 field is there. I have also tried using function module MEPO_DOC_ITEM_PROCESS for updating EAN11 field. It is not working. Please suggest some method to do that.
    Note: I am receiving EAN11 through an external system by proxy.
    Thanks,
    Chinmay

    Hi,
    Use BAPI_MATERIAL_SAVEDATA to updat ean numbers for materials.
    tables INTERNATIONALARTNOS is used to update EAN.
    Regards,
    Shanmugavel Chandrasekaran

  • Profit Center Disabled while Creating Material with Custom Trnx

    Hi all,
    I am trying to extend material to a another Plant with Custom trnx to create material.
    I am able to create / extend material for some plants. But, for few plants, I am getting error to input data for 'Profit' Center' field in 'Sales:General / Plant' view' as 'MARC-PRCTR' is not ready for input. The field is in disable (grayed out) mode. But, for other materials, I am able to extend the material successfully.
    The Profit center value is same which used for previous materials, extended successfully. Except the target Plant , all the details are same.
    Coudl some one can help on this.
    Regards
    SP

    this is most probably because of missing customizing of field selection in OMS9 transaction

  • How to create Material bom

    Hi,
    using CSAP_MAT_BOM_CREATE i am able to create first alternative.
    if i want to create another alternative for the same material/plant
    how can i create.
    tnx in advance.

    Hi,
    Please check and implement the below note,
    [1311089|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1311089]
    Thanks
    Hrishi

  • Creating material bom with reference to Sales order bom.

    How to create material bom by coping Sales order bom.?

    Mayur,
    Just go to T code: CS01 use BOm  usage 1 & then select the copy from icon in the menu bar.
    On the popup screen enter material no, plat , bom usage =5 (sales bom).
    System will then allow you to select items from Sales bom. Select the items you need copied to Material BOM. Then save.
    Hope this helps.
    Thanks,
    Ram

  • How to see any changes done in BOM through Engineering change management?

    Dear experts,
    My client need to verify the revision of some assemblies in BOM through ECM.
    I tried to verify it by taking some change numbers & executing it in CC03. I am getting the history date & name of person who done the changes. But can not able to see the actual changes.
    Could you please tell me how to see the changes done?
    Thanks in advance for cooperation & support.
    Regards,
    Mehul Veni

    Dear Mehul Veni,
    Assuming you have created a change number through CC01 and made changes in CS02 for a particular BOM by entering this
    change number in the input screen in CS02.
    Once after making BOM changes,save the data and check in CC03>enter the same change number>menu->environment-
    >reporting->Bill of material--->select the change number and click on expand sub-tree and you will get all the required details.
    Check and revert
    Regards
    Mangalraj.S

  • How we load Bom through bdc pgm

    Hi I want to load BOM through BDC pgm in wich i am unbale to record the screect flow b coz it asking abt materical not matiching so can u plz send me the navigation screen flow and exple of fields in with i can enter in BOM throus cs01 transaction ... this is very urgent.. Thanking U

    Hi
    See the Below sample Program ....
    Program Loads the Bill of Material
    *&   REPORT ZPP0120                                                    *
    *& Module : PP                                                         |
    *& Application : The program loads the Bill of Material                |
    *&                                                                     |
    *| Modification Log                                                    |
    *| ----------------                                                    |
    REPORT zpp0120 NO STANDARD PAGE HEADING
                                      MESSAGE-ID z0
                                      LINE-SIZE  132
                                      LINE-COUNT 65(2).
    *                      Internal Tables                                 *
    *Internal table for the BOM file.
    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

  • Create Material through MRP run

    Hey Sap Gurus,
    Could any one help me out how i can create material through running MRP to customer independent requirement and create purchase requisition.
    what r the steps to do this
    Thanks in advance
    Edie

    Hi,
    you cannot create material master using MRP. MRP is nothing but reqirement planning in this you will be able to create planned order and Pur req and also schedule lines if you have already SA.
    for this you need to configure MRP in SPRO and some master data like material master, source list, planned order are usually created when the material is defined as in house production in Material master and if the material is defined for external procurement the system will create pur  req or schedule lines depending on your cutomizing.
    Regards
    Vikrama

  • How to get the Newly Created Material

    Hi all,
    Iam creating Materials using BDC sessions method,My Problem is to update the Newly Created Material in a Ztable.
    so iam getting the Newly created Matnr by the following peice of code
        SELECT  matnr FROM mara INTO  TABLE v_matnr
                               WHERE ersda = sy-datum
                               ORDER BY matnr DESCENDING.
    But the thing is,we are getting Previously created material.i.e the new material will be  created only after the sessions are processed,but when i write the above code in the program we are getting previous material.
    so how to update the newly created material.
    I think we can't do  that through program because we can get new material only after processing the session..so what is the solution for this.should we use userexits for getting the newly created material.
    thanks in advance
    balaji

    Hello,
    Use the <b>BAPI_MATERIAL_SAVEDATA</b> to create the materials.
    The BAPI will return the Material number which is created at that instance by which u can update the ZTABLE.
    Vasanth

  • How to create material group in material master.

    hi guru's
    can anybody explain me how to create a new material group in material master.
    i wantto add a material group while creating material master MM01..
    thanks
    sap-mm

    Hi,
    In this step you create material groups.
    You also have the option of using the same transaction to carry out the following activities:
    Creating superior hierarchy levels
    Assigning the superior hierarchy levels to a material group hierarchy
    Assigning the base material group to the material group hierarchy
    Assigning characteristics profiles below material group level
    Requirements
    Your R/3 System is configured as an SAP Retail System.
    Activities
    1. Create superior hierarchy levels
       You create hierarchy levels using transaction WG01 (creating
       material groups) via menu options MG environment --> Hierarchy
       level --> Create
    2. Assign the superior hierarchy levels to a material group hierarchy
       You assign hierarchy levels to a hierarchy using transaction WG01
       (creating material groups) via menu options MG environment -->
       Hierarchy level --> Maint. MG hierarchy
    3. Create material groups (base material groups) and then maintain the
       pre-defined materials (reference material/material group material)
    4. Assign the base material group to the material group hierarchy
       You assign the material group to the hierarchy using transaction
       WG01 (creating material groups)
    5. Assign characteristics profiles below material group level
       You assign characteristics profiles using transaction WG01
       (creating material groups)
    Further notes
    When creating material groups and then maintaining the pre-defined materials (reference material/material group material) you should be aware of the following.
    As these materials can be created automatically using a minimum of data, you should follow this procedure with a check and possibly further maintenance, especially of plant-specific data. The material group reference material should be defined in as much detail as possible so as to keep the workload to a minimum when you have to create more materials for this material group.
    All hierarchy allocations involving a material group (base material group) and a higher or lower hierarchy level can be carried out on the initial screen (there is no need to switch to the detail screen). All further hierarchy allocations can be defined top-down when you maintain material group hierarchies.
    Only the material groups are transported automatically!
    Reward if useful.
    Chandru

  • How to Create material master workflow

    Hi All,
    Can anybody tell me how to create material master workflow?
    i need to customize the workitem  for creating data in different views in MM01 transaction with restriction to particular user.
    Regards,
    Priti

    Hi,
    This link is to  display a material.My requirement is to create a workflow which will allow a responsible person to enter data for specific department data e.g Purchase,Accounting etc.Initially anyone can create data using basic data1 and basic data2 views.After this my workflow will be triggered and it will go to next person who is responsible to enter Purchase data and then Accounting data.
    Plz help me to create different views with respect to person.
    Thanks in advance.

Maybe you are looking for

  • Security Updates/Patches Effecting Sharepoint 2007/2013 on prem

    Good Morning, I was hoping someone could help me out.  Our office is about to do some long overdue patching of our Windows Servers.  I have been tasked with doing research to determine if there are any known issues with SP 2007 or SP 2013 on prem as

  • Can't Access Supplementary Editing with Photoshop CS2

    I was a user of Elements3 for a long time mainly because I liked that the catalog's "edit with" feature worked with Photoshop CS2.  I recently got a new PC with Windows 7 so I could not install PSE 3. I downloaded PSE9 trial version to see if all wor

  • I pod touch is blocked for 21,911,788 minutes

    who can help me unblock it

  • Final Cut Server Petition

    I have started the above pet it ion at: www.pet it ion online.com (no spaces) Search for Final Cut Server or FCS. Please sign it, I would love to get this product back.

  • Variable screen button/link

    Hi I want to add a simple "hyperlink" in my WAD, calling up the variable screen again (instead of right clicking and going via enhanced menu to "variables entry". Sounds simple, but what it the html code for that ? Regards Torben