Use BAPI: BAPI_MATERIAL_SAVEREPLICA to update customer field in MARC

HI All,
I will use the BAPI BAPI_MATERIAL_SAVEREPLICA to update a customer field in database table MARC. For that I have extended the structures BAPI_TE_E1MARC and BAPI_TE_E1MARCX with the customer field.
Afterwards I have filled the tables EXTENSIONIN and EXTENSIONINX with the corresponding value for the update. Addtionally I have added the field in transaction OMSR (setting to display in the field selection, because the field should not maintenance over the standard transaction MM01 and MM02). 
Processing of the BAPI give no error message, but the corresponding field in table MARC won't be updated. What's going wrong? Is there somebody, who could help me?
Thanks and best regards
Stefan

Hi
Try this BAPI function module:
" BAPI_MATERIAL_MAINTAINDATA_RT "
Data: LS_HEADDATA TYPE BAPIE1MATHEAD,
         LS_RETURN TYPE BAPIRETURN1,
          LT_PLANT TYPE TABLE OF BAPIE1MARCRT,          LS_PLANT TYPE BAPIE1MARCRT,
          LS_PLANTX TYPE BAPIE1MARCRTX,          LT_PLANTX TYPE TABLE OF BAPIE1MARCRTX.
        CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
               EXPORTING
                   HEADDATA   = LS_HEADDATA
               IMPORTING
                   RETURN     = LS_RETURN
               TABLES
                   PLANTDATA  = LT_PLANT
                   PLANTDATAX = LT_PLANTX.
Check the PLANTDATA in the above fm in which pass your ''STEUC'' to BAPIE1MARCRT-CTRL_CODE......
Hope this works.....

Similar Messages

  • How to update a custom field of MARC table using BAPI_MATERIAL_SAVEREPLICA

    Hi,
    I want to update a custom field (Appended field) of MARC table using  BAPI_MATERIAL_SAVEREPLICA. Please help me in this issue. I cannot use BAPI_MATERIAL_SAVEDATA as this updated the MARC table record by record. I have to update bulk records at a time.
    Thanks
    Rahul.

    Hi,
    Use the Documentation given for struture in BAPI docuemntation...
    For loading data into custom fields of MARC use the structure - BAPI_TE_MARC.
    First, structures BAPI_TE_<NAME> (<NAME> = MARA, MARC, MARD, MBEW, MLGN, MLGT, MVKE, MARM, MAKT) and the appropriate check structures BAPI_TE_<NAME> (<NAME> = MARAX, for example) have to be extended by the customer to include the required fields. The structures that are delivered as standard only contain the relevant key fields. When new fields are added to this structure, you should ensure that a field has the same name as the field in the database table. Furthermore, the fields in the structures BAPI_TE_<NAME> can only be CHARACTER fields. Data element BAPIUPDATE is to be used for the fields in the check structure (exception to this: key fields.)
    Parameters EXTENSIONIN and EXTENSIONINX are used for transferring data to the method. Field STRUCTURE contains the name of the structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX). This names is used to identify the work area (for example,  WA_BAPI_TE_MARA or WA_BAPI_TE_MARAX) to which the data is transferred. The remaining fields in parameters EXTENSIONIN or EXTENSIONINX contain data for the key fields (for example, the material number) and the data for customer-specific fields. The number of characters reserved in both parameters for the contents of the customer-specific fields must match the number of characters for the relevant field in the work area. If the number of required characters is less, the remaining characters are left blank. Only when all characters have been filled can the contact for an additional field be transferred. Bear in mind that only data for which an appropriate indicator has been set in the work area can be updated to the database.
    Regards,
    Bhargava

  • Error using Bapi_PO_Change for update custom fields

    Dear Expert,
    I have requirement for update custom field in table ekko. I used BAPI_PO_CHANGE with PO_number as a key. Then i put the value of custom field in segment TABLES - EXTENSIONIN.
    But I get error : "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
    When I checked, I found the difference between data type the value for BAPI_PO_CHANGE (Usinf structure BAPIPAREX) and data type for custom field in table EKKO.
    Data Type in BAPI_PO_CHANGE is CHAR (you can see in structure BAPIPAREX). And data type for the custom field is DECIMAL.
    I found the note '1124803', but the correction note was not applicable for us because our released system is 500.
    Is there any suggestion or solution for resolve our problem?
    Really appreciate your help.
    Thanks.

    Hi Laxmikanth Bethi ,
    I tried with BAPI_PO_CHANGE in level header, and SAP was support the BAPI. And also i tried to appending the same fields in MEPOHEADR & MEPOHEADERX structures, but the problem is the type of my custom fields are DECIMAL, then the type MEPOHEADR & MEPOHEADERX structures are CHARACTER. So i got the error :  "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
    Because the types are difference.
    Have you any suggestion to solve this problem?
    Really appreciate for your input.

  • Extending sales order change BAPI and updating custom fields

    Hi
    i added 3 new fields into VA01/02/03 screen.i added at the header level in the additional data tab B area and appended them in VBAK table.
    i want to change these values using sales order change BAPI.i added the fields in the structure VBAKKOZ,VBAKKOZX,BAPE_VBAK,BAPE_VBAKX.
    may i know what else i need to do?should i move them anywhere with in the code or does the bapi take those values automatically using EXTENSIONIN structure?
    also can some one send me code to actually check if bapi is changing my values?
    if poss tell me how should i populate values into BAPI.

    After adding field in structures VBAKKOZ,VBAKKOZX,BAPE_VBAK,BAPE_VBAKX, create pair of name-value pair extensiot structure and value.
    Fill values as follows :
    Data :   ls_parex  TYPE  bapiparex,
                lt_parex  TYPE STANDARD TABLE OF  bapiparex.
    ls_parex-structure = 'BAPE_VBAK'.
    ls_parex-valuepart1+0(10) = Sales order no
    ls_parex-valuepart1+10(XX) = somevalue.  <---- Value for custom field no 1
    ls_parex-valuepart1+XX(XX) = somevalue.  <---- Value for custom field no 2
    APPEND ls_parex TO lt_parex  .
    clear ls_parex.
    ls_parex-structure = 'BAPE_VBAKX'.
    ls_parex-valuepart1+0(10) = Sales order no
    ls_parex-valuepart1+10(1) = 'X'. <--- checkbox mark for custom field no 1
    ls_parex-valuepart1+11(1) = 'X'. <--- checkbox mark for custom field no 2
    APPEND ls_parex TO lt_parex.
    Same pair for VBAKKOZ & VBAKKOZX
    Updating custom fields
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = Sales order number
          order_header_inx = 'U'   <--- U for update
        TABLES
          extensionin      = lt_parex[].
    Edited by: nkarwa on Oct 25, 2010 12:39 PM

  • Need to update custom fields in MSEG table using "BAPI_GOODSMVT_CREATE"

    Hi All,
    There is a requirement to update custom fields in table MSEG which are part of append structure. There is a option to update the custom fields using the one of the tables parameters "EXTENSIONIN". Anyone please advice how can I update the custom field thru EXTENSIONIN.
    Thanks in advance.
    cheers,
    Vijay

    see the help
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/4099948b8911d396b70004ac96334b/frameset.htm
    Regards
    Kiran Sure

  • How Update Custom fields for EABL DB table by using BAPI_MTRREADDOC_UPLOAD

    Hi friends,
    How can I Update Custom fields for EABL DB table by using BAPI_MTRREADDOC_UPLOAD
    for the parameter EXTENSIONIN of type BAPIPAREX
    I am passing the Structure as BAPI_TE_EABL
    in that structure MRIDNUMBER as EABL-ABLBELNR field value
    ZMESSAGE some text of 30 char and
    ZSKIPC of 2 char
    but I am not able to update that data for the MRIDNUMBER (ABLBELNR ) in DB table EABL
    I am getting RETURN Structure message type E
    as
    "Upload interim entries: Maintain one table only"
    Can any one provide me solution
    Thanks in Advance
    Ganesh

    Hi,
    Refer the following SAP notes.
    1. Note 485557 - BAPI_REQUISITION_CREATE: 'EXTENSIONIN' customer enhancements
    2. Note 584902 - BAPI_REQUISITION_CHANGE: ExtensionIn not connected
    3. Note 792132 - EBAN, EBKN: user-defined fields are not filled
    Regards,
    Harish

  • BAPI_EQUI_CREATE  to update custom fields.

    Is it possible to update custom fields in  Equipment master (EQUI table) using FM 'BAPI_EQUI_CREATE '? If yes, pls let me know which structure needs to updated.
    Thanks,
    Deepa

    I would think that just the name would be a key indicator.....CREATE but you want to Update....Why wouldn't you use BAPI_EQUI_CHANGE to update existing equipment records.  I would expect to have to extend the BAPI to handle the new fields.

  • Updating custom field in table EKKO within user exit when PO is saved

    I am trying to update a custom field in table EKKO when a PO is saved.  I am using FM EXIT_SAPMM06E_013, within enhancement MM06E005.  Since EKKO is not a table that can be updated with this user exit, I am using a technic that I read about on SDN where I assign a field symbol to the calling program variable and then am able to access data within EKKO table.  But when I pass this data back into the field symbol, for some reason this field is not getting saved when the PO is saved.  In debug mode, it looks like this field is getting updated, but when I look in the table after the PO is saved, it is not there.  My code sample is below.  What I am doing wrong?
    data:
      CHAR(50) VALUE '(SAPLMEPO)EKKO-ZHDRCSTCENTER',
      g_zhdrcstcenter like ekko-zhdrcstcenter,
      FIELD-SYMBOLS <F1> type any.
    if i_ekko-ekorg = '5401'.
      ASSIGN (char) to <F1>.
      g_zhdrcstcenter = <F1>.
      move '0000113322' to g_zhdrcstcenter.
      <F1> = g_zhdrcstcenter.
    endif.
    Thanks!
    Sarah Smyth.

    Firstly, have you investigated using EXIT_SAPMM06E_008 to set any custom fields you have added in the EKKO_CI / CI_EKKODB structure?.. that might work more easily.
    In terms of doing an assign back into a calling program's memory, it can work but it's probably worth setting a break point in your code then stepping through watching the values in EKKO - sometimes you can find subsequent code that re-writes an earlier copy of values back into the structure, thereby preventing you doing your change...  SAP does warn this method is for "internal use".  Also check in your debugger that it's SAPLMEPO and not SAPMM06E you need.

  • Updating custom fields in DFKKOP when returning a refund

    Hi all,
    I am looking for an event to update custom fields on DFKKOP on the item level when returning a refund in PSCD. So far I have tried using events 290, 295. I know that somewhere the clearing document(AUGBL) is cleared. Haven't as yet found out where.
    Kind regards,
    Ameeta
    Moderator note:  Duplicate postings in several forums is a violation of the rules of engagement.  Please use this thread for responses Updating custom fields in DFKKOP during refunds retunrs
    Edited by: William Eastman on Mar 9, 2010 2:51 PM

    Hi all,
    I am looking for an event to update custom fields on DFKKOP on the item level when returning a refund in PSCD. So far I have tried using events 290, 295. I know that somewhere the clearing document(AUGBL) is cleared. Haven't as yet found out where.
    Kind regards,
    Ameeta
    Moderator note:  Duplicate postings in several forums is a violation of the rules of engagement.  Please use this thread for responses Updating custom fields in DFKKOP during refunds retunrs
    Edited by: William Eastman on Mar 9, 2010 2:51 PM

  • Updating custom fields in BSEG table

    Hi Experts,
    I searched through SDN but did not find satisfactory answer to my problem.
    The scenario is that FIDCC2 Idoc is coming to SAP system. This Idoc has extended to include few custom fields. These fields need to be updated in table BSEG. Table BSEG also contains these custom fields. However, the Idoc processing routine is not updating custom fields in table BSEG with the data coming in Idoc. How can I do that?
    Thanks in advance,
    Netrey

    This message is processed by function module IDOC_INPUT_FIDCC2. If you drill down into the code a little bit, you should be able to find BTE/open FI or user exit calls (CALL CUSTOMER-FUNCTION) before the document is being posted.
    I found two that are using the ACCIT structure for passing the line items, which should contain your customer fields as well, if they were added to BSEG properly (via transaction OXK3).
    Please have a look.
    Thomas

  • How can forbid changing data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?

    I am using BAPI  'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.
    But this BAPI also can be used for change mode.
    How to forbid the change of MAT data when use this BAPI?
    TKS a lot~~
    I am looking foward to your response~~~

    you have to find out what the user did before your program goes ahead and starts the BAPI.

  • How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?

    I am using BAPI  'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.
    But this BAPI also can be used for change mode.
    How to forbid the change of MAT data when use this BAPI?
    TKS a lot~~
    I am looking foward to your response~~~
    Edited by: lorryhappy on Dec 22, 2009 11:35 AM

    Hi
    You can achieve it in another way..
    Before Passing Data to BAPI , Check whether the material is existing or not..
    If material is existing (Present in Material Master Tables e.g. MARA ) using
    data: l_matnr like mara-matnr.
    Select single matnr from mara into l_matnr.
    IF sy-subrc EQ 0.
    " Material is existing ==> Do Not Pass to BAPI
    else.
    " Material is NOT existing ==> Pass to BAPI for creation.
    endif.
    Repeat above logic for every material in batch..
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • FM / BAPI to update STEUC field in marc Table basing on material and plant

    Hi,
    I need to to update STEUC field in marc Table basing on material and plant. please suggest FM / BAPI.
    Thanks.
    raviraj.

    Hi
    Try this BAPI function module:
    " BAPI_MATERIAL_MAINTAINDATA_RT "
    Data: LS_HEADDATA TYPE BAPIE1MATHEAD,
             LS_RETURN TYPE BAPIRETURN1,
              LT_PLANT TYPE TABLE OF BAPIE1MARCRT,          LS_PLANT TYPE BAPIE1MARCRT,
              LS_PLANTX TYPE BAPIE1MARCRTX,          LT_PLANTX TYPE TABLE OF BAPIE1MARCRTX.
            CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
                   EXPORTING
                       HEADDATA   = LS_HEADDATA
                   IMPORTING
                       RETURN     = LS_RETURN
                   TABLES
                       PLANTDATA  = LT_PLANT
                       PLANTDATAX = LT_PLANTX.
    Check the PLANTDATA in the above fm in which pass your ''STEUC'' to BAPIE1MARCRT-CTRL_CODE......
    Hope this works.....

  • Updating the CUstomer fields in mARC table using BAPI_MATERIAL_SAVEREPLICA

    Hi friends,
    I want to update the Zfields in MARC table .Please provide me the details for updating these fields (Extension in bapi) Using the  BAPI_MATERIAL_SAVEREPLICA
    Thanks in advance

    Hi Varsha,
    There is documentation provided for this funtion module:
    If long texts (for example, basic data texts, internal notes, purchasing info texts, material notes or sales and distribution texts) or customer-specific fields have to be created for a material, some specific characteristics have to be taken into consideration. These characteristics are detailed in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
    Documentation is present for the parameters by clicking on EXTENSIONIN, EXTENSIONINX
    Regards,
    Swarna Munukoti

  • Updating Custom field in Table BUT000 using BAPI 'BAPI_ISUPARTNER_CHANGE'.

    Hi,
    I have added a new custom field in table BUT000. Now i want to update that field with 'X' and i have used EXTENSIONIN parameter in the BAPI 'BAPI_ISUPARTNER_CHANGE'. i have populated the field name(Custom field name) and value 'X' to that structure and passed to BAPI. But that field value was not getting updated. So can any one help me how to resolve this issue.
    Thanks,
    Sushma

    Hi Ravi,
    Thanks for your response.
    I have passed the Structure name  in parameter EXTENSIONIN, but still i am facing the same problem.
    Thanks,
    Sushma

Maybe you are looking for

  • Safari won't launch, can't send crash report

    hi all, i have a 2009 macbook pro running 10.5.8. for several days now safari crashes out while using it. when it does that, i have to force quit the program and relaunch. very often, the browser won't relaunch at all. if i leave it alone for a while

  • BUG 11930680 & APEX_040100

    I am finding this bug 11930680 is affecting my APEX 4.1.1 install.. I am Running 11.2.0.1 on Redhat linux eg I get 21 versions of this SQL in APEX_040100 in v$sql_shared_cursor, with reasons AUTH_CHECK_MISMATCH LANGUAGE_MISMATCH SELECT SHORTCUT_NAME,

  • HP Officejet 5610 All-in-One Paper Jam

    Hi, I'm getting a paper jam error on my printer screen when setting up my 5610 after a long time of no use. I followed this guide but it did not work. I checked the back, the rollers, everything. The problem is that the cartridge carrying box goes fr

  • ISync won't open after 10.4.7 update

    As per the subject line, after installing the latest 10.4.7 update via the Software Update application, my iSync has stopped working. If I click on it it just bounces away in the dock but never actually opens. I tried downloading the Inetl Combo upda

  • Lens profile request: Nikon Coolpix A

    Dear Adobe Lightroom team, Could you please either add a dedicated lens profile for the new Nikon Coolpix A or advise on which of the many available lens profiles for Nikon glasses would best match the Coolpix A? Many thanks en avance!