Error in bapi while  changing  and add items in transparant table

data : t_poitems type standard table of bapimepoitem,
       t_poitemx type standard table of bapimepoitemx,
       w_poitems type bapimepoitem,
       w_poitemx type bapimepoitemx,
       t_return type standard table of bapiret2,
       w_return type bapiret2.
loop at t_modify_detail into w_modify_detail-ebeln.       * populating changing data
*--&modifying fields
w_poitems-po_item = w_modify_detail-ebelp.
w_poitems-material = w_modify_detail-matnr.
        append w_poitems to t_poitems.
w_poitemx-po_item = w_modify_detail-ebelp.
w_poitemx-po_itemx = 'X'.
w_poitems-material = 'X'.
        append w_poitemx to t_poitemx.
endloop.
      call function 'BAPI_PO_CHANGE'
        exporting
          purchaseorder                =  w_header-ebeln
        POHEADER                     =
        POHEADERX                    =
        POADDRV
       tables
         return                        =     t_return
          poitem                       =    t_poitems
         poitemx                      =     t_poitemx
        POADDRDELIVERY               =      
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
  WAIT  
ERROR IS:
giving error : cl_po_item_handle_mm.................cp
function in which error showing: mepo docitem_get

Check this sample code
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
BAPI PO CHANGE with MENGE
Hope it helps to identify your requirement and fix accordingly.
ashish

Similar Messages

  • Can u tell me any predefined BAPI for change and creation of Material

    Hi,
        Can anybody tell me  predefined BAPI for change and creation of Materialmasterand Pricing?
    Thanks & regards,
    Gopianne.

    you can use the BAPI to BAPI_MATERIAL_SAVEDATA create as well as to change material master.
    When changing material master data, you need enter only the material
    number.
    In the header data, you must select at least one view for which data is
    to be created. Depending on the view selected, you must maintain other
    required parameters. If you do not enter values for all of the required
    parameters, the method is ended with an error message.
    The corresponding fields in the tables (such as CLIENTDATA) must first
    be supplied with data by the calling program. An indicator must also be
    set for each of these fields so that the data is written to the database
    by the method. This requires the calling program to supply the
    corresponding field with the indicator in a checkbox table (for example,
    CLIENTDATAX). Checkbox tables exist for tables that do not contain any
    language-dependent texts (MAKT, MLTX), International Article Numbers
    (MEAN), or tax classifications (MLAN). Several data records for a
    material can be created in these tables.
    regards
    vivek
    reward points if it helps

  • HT2409 I'm getting "can't add volume. Unknown error occured" when I try and add my Mac hard drive to the privacy settings

    I'm getting "can't add volume. Unknown error occured" when I try and add my Mac hard drive to the privacy settings

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • How do I read txt file and add items to dropdownlist or checkbox

    I want to add items to a dropdown or check box by reading from a text file(and select one of them). (I donot use any table or database). The list of items is sometimes upto 20MB and hence cannot populate using session bean.I want items to be added to either checkbox or listbox during a button action. I have done this for textarea but unable so far to acheive for checkbox or listbox. I use following code which does not work:
    public String button3_action() {       
    try{           
    FileReader fr = new FileReader "F:/CreatorProjects/checkboxtst.prs");
    BufferedReader br = new BufferedReader(fr);
    String s;
    while((s=br.readLine())!=null) {
    dropdown1.setValue(s);
    br.close();
    fr.close();
    }catch(Exception e) {
    e.printStackTrace();
    return null;
    I know I cant just transplant textarea code for dropdownlist or checkbox.
    Any help is greatly appreciated.
    Thanks.
    Dr.AM.Mohan Rao

    I am able to read from txt file to a listbox if i write in sessionsbean1:
    try{
    FileReader fr = new FileReader("F:/CreatorProjects/checkboxtst.prs");
    BufferedReader br = new BufferedReader(fr);
    String s1="";
    String s="";
    while((s=br.readLine())!=null) {
    s1 = s1+s;
    s1= s1+"\n";
    disOptions = new com.sun.rave.web.ui.model.Option[] {              
    new Option(s1,s1)};
    diseases = new String[] {};
    fr.close();
    br.close();
    catch(Exception e) {
    e.printStackTrace();
    But I get all data in one line!! if I click submit button text area gets all. How to display items in each line????Please help...
    Dr.AM. Mohan Rao

  • Error in CV02N while changing the status.

    Hi Experts,
    We are getting a error while changing the status of technical change document that " Inconsistent characteristic value assignment" .The document is in status "in use" and we are trying to change it to " old version" using T code CV02N.
    when I tried to see the error desription it is telling that delete the inconsistencies. But I didn't find the list of incosistencies. What may be the problem? Please help me out to get ride of this problem.
    Thanks and best regards,
    Praveen

    Hi Pete,
    The full text message: Inconsistent characteristic value assignment
    Message no. C1821
    In diagnosis it is telling that "You want to change the value assigned to a characteristic. However, the change causes inconsistency, so the new value is not allowed."
    Actually I am just changing the status of the document. I am not changing any characteristic value.
    Actually it is appearing as information message. but while saving it pop up and not allowing to save.
    Please do the needful.
    Best Regards,
    Praveen

  • How to create a bapi to update and add record 2 abap r3 table created by me

    i have created a abap r3 table and i now want to insert records into it through SAP netweaver(Web-Dynpro). So i need a bapi to udate and insert records in the abap r3 table.if someone can please tell me how to create the bapi..coz i handel the EP part and dont know much about abap.

    BAPIs are defined as API methods of SAP business object types.
    A BAPI is implemented as a function module, that is stored and described in the Function Builder.
    To create BAPI you are supposed to do following steps :
    1) create package in SE80.
    2) create function group in SE80.
    3) create function module in SE37(REMOTE ENABLE) & relased it .
           write your logic in that FM.
    4) Go in SWO1 to create Object type /  object name (write the program name which is SE38 program generated in background )
    5) Then go to SWO1
          Utilities -> Api methods -> ADD method
             write the name of FM which you have created & continue.
    6) select your method
      a) EDIT -> change release status -> object type -> implement
                                                                           -> released
      b) EDIT -> change release status -> object type  component-> implement
                                                                           -> released
    7) go in BAPI & you will get your BAPI.

  • Co-author cannot access track change and add/delete scenes

    My co-author cannot access track change or add/delete scenes. Is it a bug or is there a setting that I did not set correctly.  I shared the document as co-author several times with the same results. Any help would be appreciated Thank you Brice

    Hi there,
    Unfortunately, currently only owner of the document has the right to turn on/off track changes or accept/reject changes. Co-author can still view the document as Original or Final from Review menu or even navigate through the changes using Next Change/Previous Change. Extending the track changes rights to co-author as well is being considered on our backlog of items to do.
    Meanwhile, the co-author should still be able to go ahead and edit existing text, add new text, delete existing text and it should be getting tracked.
    Do keep providing us your feedback on the track changes feature. Your feedback is extremely important to us and helps us to improve.
    Thanks
    Adobe Story Team

  • Split a text based on delimiter and add items to a sharepoint list using SPD workflow

    Hi All
    I have to store repeating table data into a sharepoint list. I have developed an approach to store data into a sharepoint list using web services as mentioned at
    http://www.bizsupportonline.net/infopath2007/how-to-submit-items-rows-repeating-table-infopath-sharepoint-list.htm. However this approach is working when form opened client only but when I opened it in browser this approach is giving error. Now I'm looking
    to promote repeating table data by combining items will a delimiter semi-colon (;). Please let me know how can I split the promoted field value using de-limiter and add it to a sharepoint list.
    Note:
    I'm working on SharePoint online 2010. (I don't have sharepoint on-premise, so I can't use SharePoint Object Model)
    If anybody know how to deal with this, please let me know.
    Thank you in advance.

    Hi Chuchendra,
    According to your description, my understanding is that you want to split the promoted field value in InfoPath form which was combined using semi-colon and add it to a SharePoint list.
    I recommend to submit the data to another SharePoint list first(use a column to store the value) and then create calculated columns to user formula to split the value, then use workflow to update the list where you want to add the value with the divided
    values.
    For example: the value is aa;bb;cc;dd.
    Based on the number of the semi-colons, we need to create one column to store the original value(named test for example), four calculated columns(v1,v2,v3,v4) to store the divided values and two more calculated columns(flag1,flag2) for use in the formula.
    v1: =LEFT([test],FIND(";",[test])-1)
    flag1: =RIGHT([test],LEN([test])-FIND(";",[test]))
    v2: =LEFT([flag1],FIND(";",[flag1])-1)
    flag2: =RIGHT([flag1],LEN([flag1])-FIND(";",[flag1]))
    v3: =LEFT([flag2],FIND(";",[flag2])-1)
    v4: =RIGHT([flag2],LEN([flag2])-FIND(";",[flag2]))
    We can also use Client Object Model to write code to split the value of the field.
    You can download the dll files form the link below:
    http://www.microsoft.com/en-in/download/details.aspx?id=21786
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Error in CIF while change in Material Group in R/3

    Hi,
    I have assigned Material Group Description as an external field in Extra Tab in APO. When I create a material the CIF updates the filed correctly.
    When I change the material group the CIF gives and error "Location does not exist for external location FR02, type , and BSG BSG1" where FR02 is my Plant.
    When I delete the queue and re execute the IM the change is updated in APO.
    Can someone tell me why the above CIF error appears for every change done.

    Nilesh,
    It is common for experienced ABAPers to be able to determine this on their own.  Normally all you should have to do is explain in business terms what is happening, and the ABAPer should be able to troubleshoot the problem without you first discovering the code details for him.
    There are a couple of ways to populate the aux fields in the SCM product master. The first userexit I would look at would be CIFMAT01 on the R/3 side.
    Best Regards,
    DB49

  • 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

  • Updating database table for 'CHANGE' and 'ADD' buttons.

    Hi,
    I am working on module pool program. Here i am using table control.Below is my requirement:
    1) I have designed a selection - screen with 'CHANGE' and 'DISPLAY' buttons and in screen 100 i have 'ADD' and 'SAVE' buttons.
    2) when i click on 'CHANGE' , it will move to screen 200 here i need to change quantity field for that particular record which is in table control.once i change the field value and click on 'SAVE'  a message should be populated that "RECORD IS SAVED' and  this record should be updated in database table with new quantity field value and it should return back to my selection screen.
    3) When i click on 'ADD' , it should display already existing records in disable mode and a new line should be added inorder to enter new records. Once i enter the data and click on SAVE, this new record should be saved in the database table along with existing records.
    Kindly suggest me a sample code for this as am new to table control in module pool programming.

    Hi Gaurav,
    I've a similar problem!! any solutions to your problem!!

  • While processing MIGO  "No Item Catagory exists Table T184L HID NORM V"

    Hi
    Stuck in MIGO , Po created with and  while processing MIGO I am getting the following error."No Item Catagory exists Table T184L HID NORM V)
    I am using Retail , maintained Item catagory group but still I am facing with this error ..

    Issue Solved with T Code 0184
    Edited by: SHESAGIRI.G on May 10, 2008 2:56 AM

  • Error ORA-02375 while trying to export/import JTF.JTF_PF_REPOSITORY table

    We have already created an SR, In the mean time, trying to see whether anyone else has come across this issue.  Thanks.
    On : 11.2.0.3 version, Data Pump Import
    Error ORA-02375 while trying to import JTF.JTF_PF_REPOSITORY table
    We are getting the below error while performing the full db
    import.
    ORA-02375: conversion error loading table
    "JTF"."JTF_PF_REPOSITORY" partition "EBIZ"
    ORA-22337: the type of accessed
    object has been evolved
    ORA-02372: data for row: SYS_NC00040$ :
    0X'8801FE000004AD0313FFFF0009198401190A434F4E4E454354'
    This issue is
    stopping our upgrade of database from 10.2.0.4 to 11.2.0.3. This is very
    critical for us to be resolved.

    Hi,
    seems this is Character set issue fo source and Target DB check this doc:Unable to Export Table WF_ITEM_ATTRIBUTE_VALUES due to errors ORA-02374, ORA-22337, and ORA-02372 (Doc ID 1522761.1)
    HTH

  • How to delete and add rows in a table control

    Hi
      how to delete rows and add new rows in a tbale control
    Sathya

    Hi,
    In the PAI write this code
    PROCESS AFTER INPUT.
    LOOP AT itab.
    ENDLOOP.
    MODULE MODIFY_TC.
    MODULE MODIFY_TC.
    To add a row
      DESCRIBE TABLE itab LINES tc_tab-lines.
      tc_tab-lines = tc_tab-lines + 1.
    To delete a row if check box is ticked
       DELETE itab WHERE check = c_x.
    To delete a row depending on tabix
       DELETE itab index l_tabix.
    ENDMODULE.
    Make sure that you put a if condition in the above module inorder to ensure addition or deletion of a row.
    Best regards,
    Prashant

  • Error in BAPI while creating incoming invoice

    Hi Experts,
    Im creating incoming invoice by using the BAPI,  'BAPI_INCOMINGINVOICE_CREATE'.
    when im going to posting my invoice it is showing the error like 'EDI: Error in customizing for differential invoicing'.it is a urgent requirement and need to solve this ASAP.Pls help me out with this error
    Im passing following parameters to BAPI:
    wa_header-invoice_ind = 'X'.
    wa_header-doc_date   =  sy-datum.   "Enter the document date
    wa_header-pstng_date = sy-datum .   "Enter the posting date
    * wa_header-ref_doc_no = '5000008590'.
    wa_header-comp_code = '1000'.
    *wa_header-gross_amount = '50.11'.  "Enter the gross amount(aft. tax) for the invoice
    *wa_header-calc_tax_ind = 'X'.
      wa_header-currency = 'INR'.
      wa_header-INV_TRAN = 'X'.
      wa_header-SIMULATION = 'X'.
    wa_item-invoice_doc_item = '000001'.
    wa_item-po_number = '3700000557'.    "Enter the PO number
    wa_item-po_item = '00010'.           "Enter the PO item number
    * wa_item-ref_doc = '5000008590'.      "Enter the GR number
    * wa_item-ref_doc_year = '2014'.       "Enter the GR fiscal year
    * wa_item-ref_doc_it = '0001'.         "Enter the GR item number
    * wa_item-tax_code = 'V0'.             "Enter the tax code applicable
    wa_item-item_amount = '50.60'.     "Enter the item amount
    * wa_item-quantity = '2380'.           "Enter the invoice quantity
    * wa_item-po_unit = 'EA'.              "Enter the UoM
    APPEND wa_item TO it_item.
    CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
       EXPORTING
         headerdata                = wa_header
    * *   ADDRESSDATA               =
      IMPORTING
        invoicedocnumber          = g_invno
        fiscalyear                = g_fyear
       TABLES
         itemdata                  = it_item
    * *   ACCOUNTINGDATA            =
    * *   GLACCOUNTDATA             =
    * *   MATERIALDATA              =
    * *   TAXDATA                   =
    * *   WITHTAXDATA               =
    * *   VENDORITEMSPLITDATA       =
         return                    = it_ret
    * *   EXTENSIONIN               =
    IF g_invno IS NOT INITIAL.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT          = 'X'
    * *   IMPORTING
    * *     RETURN        =

    Thanks every one for your valuable solutions.
    Issue is Solved by unchecking the flag.
    wa_header-INV_TRAN = 'X'.
    Thanks & Regards,
    Ramjee.

Maybe you are looking for

  • Scrollbar of OLE in forms 6i

    Hi all I am using forms 6i and Oracle 10g. I have an entry form and in this form there is an OLE item. I am using MS word application in this ole. When i write 2/3 pages documents i can not see the whole documents in the OLE contents. If I could enab

  • Scheduling time not coming as required

    Hello All I have an FG whose routing contains two operations, whose time are as under: Optn       Base Qty       Processing time 0010       1EA               20 MIN 0020       1EA               15 MIN As per my calculation the sys shall wind up the o

  • HT4211 Trying to update my apps but when prompted to enter in my Apple ID password, it's not my email ?

    Downloaded an app and entered my thumb print for verification. Was successful. Prompted to update my apps. When I chose to do do, prompts me to enter my Apple ID password, but the email is not mine. Tried several times, multiple diff emails come up,

  • Patch progam can't be opened

    i get a notice that patch program can't be opened when i try to download updates

  • HT1338 can i upgrade my operating system

    i have an iMac 10.5.8. having recently purchased an iphone 5 i found that i could not connect to my itunes library using my new hone as it needs t use the new version of itunes. i checked whether i needed to upgrade my software & system states that i