BAPI - Locking the Material

Hi Guru's,
I'm using the BAPI_GOODSMVT_CREATE to do the Movement types 101.
The problem is updating perfectly, but if i process the number of records at the same time with the same material number, it is giving the error as
"The XXXX Data is locked by the user XXXX". I know this error is coming because the BAPI is still working on updating the material data for the previous movement, at the same time the program is trying to do the movement type.
My question is hoe to check whether the BAPI is updating the Table or not???
Thanks,
Adi.

write a select single to check if the bapi updated the table
or in the bapi_transaction_commit use wait = 'X'.
check [this discussion on SAP Fans|http://www.sapfans.com/forums/viewtopic.php?f=13&t=309992]
MM BAPI Commit - Lock Issues

Similar Messages

  • Problem with unlocking and locking the Materials in MARA using idocs.

    We are sending a inbound idoc from one cluster to the other to update the materials
    If the material is locked ( MARA-MATFI=x ) before it needs to be unlock it  ,update it and lock again .
    If its not locked ,we just need to update it and lock the material .
    When we are trying to implement this the materials are not getting locked at all times .
    the update inbound idoc is being sent to 5 clusters at a time .
    The same material is getting locked in some clusters and some it is not . (But the data is being updated in all the clusters )
    Can you please suggest me a solution or give me an idea where the problem would be lying.

    The client has a Keystone Server where alll the Master data is kept and there are 5 Production Servers .
    When ever there are any updates to the Materials they are first updated in the Keystone server .
    And with the help of a Batch Job they send inbound idocs to the 5 Production Servers.
    On the Production servers if the material in MARA  that needs to be updated is locked ,it needs to be unlocked updated and locked again .
    Hope i have  given u the clear idea of the scenario

  • How to lock a material

    Hi All,
    How do lock a material
    Please let me know
    Thanks in advance
    Kumar

    Dear Sunil,
    First thing why you want to lock the material?
    If it is non-moving material you can block for all activity.
    Goto MM02- Basic data 1 - X-plant Material status - make it "Z1".
    Hope it will solve you issue.
    Reg/ Shankar G.

  • Mass locking in material code

    Dear all,
    I want to know the transaction code of mass locking the material code.. i can do it individual thru mm02 but i want to do in mass and 2nd is mass locking of material for QC only....pl. suggetst...
    thanks
    sachin

    You can do it through MM17 trxn
    Check
    MASS DELETION OF MATERIAL

  • To create a Material using BAPI with out passing the material number

    Hello Experts,
    I am using BAPI_MATERIAL_SAVEDATA to create a material of some Ztype. I am successfully creating a material if I am passing Material Number as input. I want the material number to generated internally.
    When I am doing material creation with same input data with out material number using BDC, it is working fine. It is generating the material number.
    But, not with the BAPI.
    Do, I need to specify this some where in the BAPI to generate the Material number internally? Please let me know.
    Please help me in this regard.
    Thanks & Regards,
    Naresh.

    Hi,
    Read the BAPI documentation regarding Internal Number range for materials.
    When you create material master data, the following fields must always
    contain a value in the structure:
    o   MATERIAL
        Only external number assignment is supported for the material number
        (MATERIAL). If you want the material number to be assigned
        internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
        called. This method determines an internal number for the material
        to be created. You must enter this internal number in field
        HEADDATA-MATERIAL.
    Regards
    Vinod

  • BAPI FM to set the  "Material Number used by Vendor" and the "Order Unit"

    Hi,
    is there any bapi or fm to set these two fields in the purchase view of the material?
    to create the material i've used the "BAPI_MATERIAL_SAVEDATA" but i don't have a clue where those field's can be set.
    thkzs to all in advanced
    Regards
    Jaime

    Solved using Batch input

  • ALE/IDOC:The group data for the material CS94163AOOO is locked by ECPUSER

    Dear All,
    I have extended the idoc for MATMAS and getting -The group data for the material CS94163AOOO is locked by ECPUSER
    error on receving ( production ) server.I have written BDC in Z-function module to upload the data for extended segments after calling IDOC_INPUT_MATMAS01  function module.
    When the same scenario executed in development server the material is not getting locked and idoc is posted successfully.
    Please guide to resolve the error.
    Thanks,
    Sanjay Deshpande.
    Edited by: sanjay_123 on Nov 1, 2009 4:41 PM

    Hello,
    Can you pls try to use ENQUEUE_E_TABLE or FM specific to lock/unlock MARA table during Idoc creation.
    and put some WAIT statement before creation.
    CALL FUNCTION 'ENQUEUE_EMMARAS'
    EXPORTING
    MODE_MARA = 'S'
    MANDT = SY-MANDT
    MATNR = 'CS94163AOOO'
    X_MATNR = ' '
    _SCOPE = '2'
    *_WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 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.
    Then write code for creation of MARA
    Unlcok now like this
    CALL FUNCTION 'DEQUEUE_EMMARAS'
    EXPORTING
    MODE_MARA = 'S'
    MANDT = SY-MANDT
    MATNR = 'CS94163AOOO'
    X_MATNR = ' '
    _SCOPE = '3'
    _SYNCHRON = ' '
    _COLLECT = ' '
    ~Pramod
    Edited by: PKUPADHYAY on Nov 1, 2009 5:40 PM

  • Lock the production order creating without material for order type zp01

    Hi all,
    Good morning.My client wants to lock the production order creating without material for order type zp01.He does not want to create production order without material.Its very urgent.Please guide me the settings if any.
    Thanks and Regards
    Sukumar

    Hi Sukumar,
    You can do by applying user exit.
    Use PPCO0007 - Exit when saving production order.
    Function module - EXIT_SAPLCOZV_001.
    Include Program - ZXCO1U06
    Write your Code:
    *&  Include           ZXCO1U06
    Regards,
    Sankaran

  • BAPI to change the standard price of the material

    Hello Friends ,
    I am struggling to find a BAPI to change material standard price. I found 2 BAPIs mentioned below. But was not able to make use of them.
    1) BAPI_MATVAL_PRICE_CHANGE
    2) BAPI_MATERIAL_SAVEDATA
    Can any of you help me in finding right BAPI?

    BAPI_MATVAL_PRICE_CHANGE
    PRICES_CHANGE & PRICES_POST
    BAPI_M_REVAL_CREATEPRICECHANGE
    BAPI_MATERIAL_SAVEDATA
    These are the fm's to save or change material price.

  • Batch lock of the material by user

    Hi,
       The scenerio is-
             User1 is doing the following transaction-Create stock transport PO fora material (plant 1000 to plant 1100) - Create outbound delivery VL10B(Goods issue is also done- and he is in the screen MIGO(goods receipt in plant 1100 against outbound delivery for which goods issue is done.Automatic batch determination is activated and the batch is determined by FEFO method.
             User2 is creating a sale order for the same material from plant 2000.Subsequently, delivery is created and batch is determined and also the batch determined is the same as that of the previous one.
            Now both are in the same screen.When the user2 is trying to do PGI the system is giving error message the batch of the material is locked by the user but the interesting this if it is viceversa ie with the user2 in the delivery screen and the user1 is trying to take goods receipt in plant 1100,the system is allowing to take the goods receipt of the material.
           I also tried the following change in configuration-SPR0->Materials Management->General Settings for Materials Management->Set material block for goods movements.
          I changed from lock exclusively to late lock but the system is still not allowing in the above mentioned scenerio.
          Can any one tell why it is so and what is to be to rectify the same.
    regards,
    Nithin

    Hi Gabo,
    Check please if Late Lock is configurated.
    If you still having the problem, please check note
    0001422983  -  MIGO: Message M3682 during goods movement to same batch
    If you decide implement this note, please check your 'Z' programs that call many module functions or updates to tables in order to have the 'COMMIT & WAIT' necesary (this note could be cause of incorrect update of characteristics in batch if you already have perfomance issues in your server or poor time response of this 'Z'programs).
    Regards.
    Tania

  • Material Master Update through BAPI - Follow up material not updated

    Hi Experts,
    I am updating the material master through a custom transaction using the BAPI  'BAPI_MATERIAL_SAVEDATA'. Rest of the fields are updating correctly except for discontinuation ind., effective out date & follow-up material.
    When I try to update it through MM02 it is working fine. However, when I pass the same data through BAPI it is throwing an error message that 'the material XXXXXX does not exist or is not activated'.
    Please advice.
    Thanks & Regards,
    Ashu Arora

    Some more fields need to be updated along with the discont. indicator. Now working fine.

  • Error during BAPI while uploading Material data through MM01

    Hi all,
    i am facing one problem when uploading Material data thorough BAPI in MM01.i am attaching the code below and the error given.
    but in the debugger all the value is being stored.
    REPORT  ZFINISHED_MAT.
    Data: Begin of legacy_data occurs 0,
         MATNR LIKE MARA-MATNR,
         MBRSH LIKE MARA-MBRSH,            "Industry Sector
         MTART LIKE MARA-MTART,            "Matl Type
         WERKS LIKE MARD-WERKS,            "Plant
         LGORT LIKE MARD-LGORT,            "Storage location
         VKORG LIKE MVKE-VKORG,
         VTWEG LIKE MVKE-VTWEG,
         MAKTX LIKE MAKT-MAKTX,             "Matl Desc.
         MEINS LIKE MARA-MEINS,             "Base UOM
         MATKL LIKE MARA-MATKL,             "Matl.Grp
    *     BISMT LIKE MARA-BISMT,
         SPART LIKE MARA-SPART,             "Division
    *     BRGEW LIKE MARA-BRGEW,             "Gross weight
         GROES LIKE MARA-GROES,
         FERTH LIKE MARA-FERTH,
         ZEINR LIKE MARA-ZEINR,
         TAXKM1 LIKE MLAN-TAXM1,
         TAXKM2 LIKE MLAN-TAXM2,
         TAXKM3 LIKE MLAN-TAXM3,
         TAXKM4 LIKE MLAN-TAXM4,
         KTGRM LIKE MVKE-KTGRM,
    *     GEWEI LIKE MARA-GEWEI,             "Weight unit
    *     NTGEW LIKE MARA-NTGEW,             "Net weight
    *     KLART LIKE RMCLF-KLART,
         MTVFP LIKE MARC-MTVFP,             "Availibility Check
    *     XGCHP LIKE MARA-XGCHP,
         XCHPF LIKE MARA-XCHPF,             "Batch Management
         TRAGR LIKE MARA-TRAGR,
         LADGR TYPE MARC-LADGR,
         VPRSV LIKE MBEW-VPRSV,            "Price Control
         VERPR LIKE MBEW-VERPR,
    *     SPRAS LIKE MAKT-SPRAS,
      END OF LEGACY_DATA.
    DATA: BEGIN OF IT_MAKT OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF IT_MAKT.
    *--- 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_MARD1 LIKE BAPI_MARD,
    BAPI_MARDX1 LIKE BAPI_MARDX, " Checkbox Structure for BAPI_MARD
    BAPI_MARC1 LIKE BAPI_MARC, " Plant View
    BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
    BAPI_MVKE1 LIKE BAPI_MVKE,
    BAPI_MVKEX1 LIKE BAPI_MVKEX, " Checkbox Structure for BAPI_MVKE
    BAPI_MLAN1 LIKE BAPI_MLAN,
    BAPI_MLANX1 LIKE bapi_mlan1, " Checkbox Structure for BAPI_MLAN
    BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
    BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
    BAPI_RETURN LIKE BAPIRET2. " Return Parameter
    *              $PARAMETERS DECLARATION$
    SELECTION-SCREEN BEGIN OF BLOCK B11
                              WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_FILE LIKE RLGRAP-FILENAME. " DEFAULT 'C:\TEST1.XLS'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN END OF BLOCK B11 .
    *              $DATA DECLARATION$
    *DATA : BDC_DATA LIKE STANDARD TABLE OF BDCDATA WITH HEADER LINE.
    DATA : IT_EXCEL TYPE STANDARD TABLE OF  ALSMEX_TABLINE INITIAL SIZE 0 WITH HEADER LINE,
            IT_EXCEL_DUMMY TYPE ALSMEX_TABLINE.
    DATA : MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : L_MSTRING(480).
    DATA :L_SUBRC LIKE SY-SUBRC.
    DATA: V_FILE TYPE STRING.
    *              $AT-SELECTON SCREEN DECLARATION$
    AT SELECTION-SCREEN ON P_FILE.
      IF P_FILE IS INITIAL.
        MESSAGE E398(00) WITH 'FILE NAME NEEDS TO BE SPECIFIED'.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME        = SYST-CPROG
    *   DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME          = 'P_FILE'
       IMPORTING
         FILE_NAME           = P_FILE
    start-of-selection.
    perform data_fetch_to_xls.
    perform insertion.
    *&      Form  data_fetch_to_xls
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM data_fetch_to_xls .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME                = P_FILE
          I_BEGIN_COL             = 1
          I_BEGIN_ROW             = 2
          I_END_COL               = 25
          I_END_ROW               = 2
        TABLES
          INTERN                  = IT_EXCEL
        EXCEPTIONS
          INCONSISTENT_PARAMETERS = 1
          UPLOAD_OLE              = 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.
        WRITE: /'ERROR UPLOADING XLS FILE FROM PRESENTATION SERVER !' ,
               /'RETURN CODE : ', SY-SUBRC.
      ELSE.
    *************NOW FILL DATA FROM EXCEL INTO FINAL LEGACY DATA ITAB----LEGACY_DATA***************
        IF NOT IT_EXCEL[] IS INITIAL.
          CLEAR LEGACY_DATA.
          REFRESH LEGACY_DATA[].
          LOOP AT IT_EXCEL.
            IT_EXCEL_DUMMY = IT_EXCEL.
            AT NEW COL.
              CASE IT_EXCEL_DUMMY-COL.
                WHEN 1.
                  LEGACY_DATA-MATNR = IT_EXCEL_DUMMY-VALUE(18).
                WHEN 2.
                  LEGACY_DATA-MBRSH = IT_EXCEL_DUMMY-VALUE(1).
                WHEN 3.
                  LEGACY_DATA-MTART = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 4.
                  LEGACY_DATA-WERKS = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 5.
                  LEGACY_DATA-LGORT = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 6.
                  LEGACY_DATA-VKORG = IT_EXCEL_DUMMY-VALUE(4).
                 WHEN 7.
                  LEGACY_DATA-VTWEG = IT_EXCEL_DUMMY-VALUE(2).
                WHEN 8.
                  LEGACY_DATA-MAKTX = IT_EXCEL_DUMMY-VALUE(40).
                WHEN 9.
                  LEGACY_DATA-MEINS = IT_EXCEL_DUMMY-VALUE(3).
                WHEN 10.
                  LEGACY_DATA-MATKL = IT_EXCEL_DUMMY-VALUE(9).
                WHEN 11.
                  LEGACY_DATA-SPART = IT_EXCEL_DUMMY-VALUE(2).
                WHEN 12.
                  LEGACY_DATA-GROES = IT_EXCEL_DUMMY-VALUE(32).
                WHEN 13.
                  LEGACY_DATA-FERTH = IT_EXCEL_DUMMY-VALUE(18).
                WHEN 14.
                  LEGACY_DATA-ZEINR = IT_EXCEL_DUMMY-VALUE(22).
                 WHEN 15.
                  LEGACY_DATA-TAXKM1 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 16.
                  LEGACY_DATA-TAXKM2 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 17.
                  LEGACY_DATA-TAXKM3 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 18.
                  LEGACY_DATA-TAXKM4 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 19.
                  LEGACY_DATA-KTGRM = IT_EXCEL_DUMMY-VALUE(2).
                WHEN 20.
                  LEGACY_DATA-MTVFP = IT_EXCEL_DUMMY-VALUE(2).
                 WHEN 21.
                  LEGACY_DATA-XCHPF = IT_EXCEL_DUMMY-VALUE(1).
                WHEN 22.
                  LEGACY_DATA-TRAGR = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 23.
                  LEGACY_DATA-LADGR = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 24.
                  LEGACY_DATA-VPRSV = IT_EXCEL_DUMMY-VALUE(1).
                WHEN 25.
                  LEGACY_DATA-VERPR = IT_EXCEL_DUMMY-VALUE(14).
                  APPEND LEGACY_DATA.
                  CLEAR LEGACY_DATA.
              ENDCASE.
            ENDAT.
            AT END OF ROW.
            ENDAT.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " data_fetch_to_xls
    *&      Form  insertion
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM insertion .
    LOOP AT legacy_data.
    * Header
    BAPI_HEAD-MATERIAL = legacy_data-MATNR.
    BAPI_HEAD-IND_SECTOR = legacy_data-MBRSH.
    BAPI_HEAD-MATL_TYPE = legacy_data-MTART.
    BAPI_HEAD-BASIC_VIEW = 'X'.
    BAPI_HEAD-SALES_VIEW = 'X'.
    BAPI_HEAD-STORAGE_VIEW = 'X'.
    *BAPI_HEAD-PURCHASE_VIEW = 'X'.
    BAPI_HEAD-ACCOUNT_VIEW = 'X'.
    * Material Description
    REFRESH IT_MAKT.
    *IT_MAKT-LANGU = legacy_data-SPRAS.
    IT_MAKT-MATL_DESC = legacy_data-MAKTX.
    APPEND IT_MAKT.
    BAPI_MARD1-PLANT = legacy_data-WERKS.
    BAPI_MARD1-STGE_LOC = legacy_data-LGORT.
    BAPI_MARDX1-PLANT = legacy_data-WERKS.
    BAPI_MARDX1-STGE_LOC = legacy_data-LGORT.
    ** Client Data - Basic
    BAPI_MARA1-MATL_GROUP = legacy_data-MATKL.
    *bapi_mara1-OLD_MAT_NO = legacy_data-bismt.
    BAPI_MARA1-BASE_UOM = legacy_data-MEINS.
    BAPI_MARA1-PROD_MEMO = LEGACY_DATA-FERTH.
    BAPI_MARA1-SIZE_DIM = LEGACY_DATA-GROES.
    BAPI_MARA1-DOCUMENT = LEGACY_DATA-ZEINR.
    BAPI_MARA1-BATCH_MGMT = LEGACY_DATA-XCHPF.
    *BAPI_MARA1-UNIT_OF_WT = legacy_data-GEWEI.
    BAPI_MARA1-TRANS_GRP = legacy_data-TRAGR.
    BAPI_MARA1-DIVISION = legacy_data-SPART.
    BAPI_MARAX-MATL_GROUP = 'X'.
    *BAPI_MARAX-OLD_MAT_NO = 'X'.
    BAPI_MARAX-BASE_UOM = 'X'.
    BAPI_MARAX-PROD_MEMO = 'X'.
    BAPI_MARAX-SIZE_DIM = 'X'.
    BAPI_MARAX-DOCUMENT = 'X'.
    BAPI_MARAX-BATCH_MGMT = 'X'.
    *BAPI_MARAX-UNIT_OF_WT = 'X'.
    BAPI_MARAX-TRANS_GRP = 'X'.
    BAPI_MARAX-DIVISION = 'X'.
    *SALES
    BAPI_MVKE1-SALES_ORG = legacy_data-VKORG.
    BAPI_MVKE1-DISTR_CHAN = legacy_data-VTWEG.
    *BAPI_MVKE1-DELYG_PLNT = legacy_data-DWERK.
    BAPI_MVKE1-ACCT_ASSGT = legacy_data-KTGRM.
    BAPI_MVKEX1-SALES_ORG = legacy_data-VKORG.
    BAPI_MVKEX1-DISTR_CHAN = legacy_data-VTWEG.
    *BAPI_MVKEX1-DELYG_PLNT = 'X'.
    BAPI_MVKEX1-ACCT_ASSGT = 'X'.
    ** Plant - Purchasing
    BAPI_MARC1-PLANT = legacy_data-WERKS.
    BAPI_MARC1-LOADINGGRP = legacy_data-LADGR.
    BAPI_MARC1-AVAILCHECK = legacy_data-MTVFP.
    *BAPI_MARC1-MRP_GROUP =  legacy_data-disgr.
    BAPI_MARCX-PLANT = legacy_data-WERKS.
    BAPI_MARCX-LOADINGGRP = 'X'.
    BAPI_MARCX-AVAILCHECK = 'X'.
    *BAPI_MARCX-MRP_GROUP =  'X'.
    * Accounting
    BAPI_MBEW1-VAL_AREA = legacy_data-WERKS.
    BAPI_MBEW1-PRICE_CTRL = legacy_data-VPRSV.
    BAPI_MBEW1-STD_PRICE =  legacy_data-VERPR.
    *BAPI_MBEW1-VAL_CLASS =  legacy_data-BKLAS.
    *BAPI_MBEW1-STD_PRICE = legacy_data-STPRS.
    *BAPI_MBEW1-PRICE_UNIT = legacy_data-PEINH.
    BAPI_MBEWX-VAL_AREA = legacy_data-WERKS.
    BAPI_MBEWX-PRICE_CTRL = 'X'.
    BAPI_MBEWX-STD_PRICE =  'X'.
    *BAPI_MBEWX-VAL_CLASS =  'X'.
    * TAX JURISDICTION CODE
    BAPI_MLAN1-TAXCLASS_1 = LEGACY_DATA-TAXKM1.
    BAPI_MLAN1-TAXCLASS_2 = LEGACY_DATA-TAXKM2.
    BAPI_MLAN1-TAXCLASS_3 = LEGACY_DATA-TAXKM3.
    BAPI_MLAN1-TAXCLASS_4 = LEGACY_DATA-TAXKM4.
    BAPI_MLAN1-TAXCLASS_1 = 'X'.
    BAPI_MLAN1-TAXCLASS_2 = 'X'.
    BAPI_MLAN1-TAXCLASS_3 = 'X'.
    BAPI_MLAN1-TAXCLASS_4 = '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:' ,legacy_data-maTNR.
    ELSEIF BAPI_RETURN-TYPE = 'S'.
    WRITE: 'Successfully created material' ,legacy_data-maTNR.
    ENDIF.
    ENDLOOP.
    ENDFORM.                    " insertion
    The error: The field MARC-MTVFP/BAPI_MARC-AVAILCHECK is defined as a required field; it does not contain an entr
    suggestion will be vry helpful,
    Kind Regards,
    Edited by: Prasenjit Sengupta on Nov 16, 2009 9:11 AM

    Hi Prasenjit,
    Did you get any solution for this as I am getting same error from BAPI to update MRP controller in MARC table.
    Regards,
    Suruchi

  • BAPI_GOODSMVT_CREATE Error - The material does not exist or is not activatd

    Scenario is to make a Goods Receipt on a material which is being imported from external sources.
    There is a purchase order created for this already in SAP.
    From MII we are using standard BAPI - BAPI_GOODSMVT_CREATE and passing the fields below:
    GM_Code - 01 since it is a goods receipt
    Psting_date - current date
    Material - material code given by SAP
    Plant - Plant code on which GR takes place.
    Move_type - 101 because it is a GR
    Entry_Qnt - 1
    PO_number - Purchase order which is created in SAP
    When I pass these details to the standard BAPI I get a return message - " The material 10xxxxxxxx does not exist or is not activated"
    Not sure where I am going wrong.
    Any help is highly appreciated.

    Thanks for your reply Vinod...
    Well.. I am calling this BAPI from Netweaver MII and I just see the request and response tags to which I pass the required values to BAPI request fields.
    I am not sure how to call this FM which you are refering to, can you please elobrate a bit or is there any guide I am refer to?

  • A Function or BAPI to get Material Standard Price?

    Hi All,
    I need a Function or BAPI to get the Material Standard Price when the following Criteria is given;
    1. Material Code
    2. Plant
    3. Period
    4. Year
    5. Company Currency (Optional)
    I need only the Standard Price and Price Unit. Please give me a example with sample values.
    Thanks,
    Kishan

    Sri:
    I need only the Standard Price and Price Unit
    there is no specific FM for that.
    you need to write small select query in FM than use this custom FM into your program.
    Amit.

  • Creation of Plant Specific Views while creating or changing the Material

    Hi,
    When saving a material (MM01/MM02), based on data in custom table, I have to extend the material for different plants and plant specific views such as
    1.     Purchasing
    2.     Foreign Trade Import
    3.     MRP1
    4.     MRP2
    5.     MRP3
    6.     Forecasting
    7.     Parts F&P Data (custom view)
    8.     Accounting 1
    How can I achieve this? Is there any FM or BAPI that can be used to extend material for a plant and its specific views?
    Also please suggest me the user exit or BADI which has to be used to achieve this functionality?
    Best Regards,
    Kumar

    We can use the BAPI, BAPI_MATERIAL_SAVEDATA to extend material to different views.

Maybe you are looking for

  • Need Information on Support  Project

    Hi, I am new to Production and support  project whta r the points we need to discuss with the clints in support prj.. what r the responsibilities in support prj Any one of u send me the docs for the Production and support project Thanks in Advance, P

  • Engineer appointment cancelled without notificatio...

    Hey, We ordered Infinity option 2 on 21 April 2011 and it is supposed to be activated this Friday (13th May). However, it now says "Your appointment is no longer required, as our engineer can connect your line without requiring access to your premise

  • Additional Field to the LSO Follow up Participation Screen in LSO_PV15

    Hi All, I have a requirement in LSO where i need to display an Additional Field called SCORE in the LSO 'Follow up Participation' (TCODE : LSO_PV15) Screen. The Field appears on the Screen when i enhance the customer include in table HRPAD25. Now the

  • SOLVED: Installation of NVidia Driver messes with BASH? (x86-64)

    Hello, I just started using Arch - I migrated here from Gentoo (I failed to compile a working kernel five times!) and the convoluted messiness of Debian (which had serious problems with the proprietary NVIDIA driver). Within three hours after I began

  • How to get passed the iphone activation?

    I just bough an iPhone 5c from ebay. The guy never used but he didnt activate it either. He gave me all his information but when i went to get it activated, they threw the origional sim away so now i cant get passed it without the old sim. What do i