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.

Similar Messages

  • BADI or User exit  for FB50 to update custom field in table COEP

    Hi all,
    i have added one custom field in table COEP through include CI_COBL .
    when i do posting through sales order(VA02) or purchase order(ME22n) that custom fields in COEP get updated with controlling document
    and through BADI AC_DOCUMENT i m updating that custom field in COEP.
    but when i do manual posting through FB50 controlling document is generated in COEP but i m not able to update that custom field
    because in this case BADI AC_DOCUMENT  is not get triggered.
    is there any BADI or User exit or enhancement spot for FB50 through which i can update that custom field in table COEP

    Hi Sandy,
    Thanks for u r reply,
    RFAVIS01 is not getting triggered through FB50
    and F180A001 ( EXIT_SAPLF048_001) is getting triggered but it doesnt contain COEP field in its parameter
    import - F180A_DOC_HEAD_TAB
                 F180A_DOC_ITEM_TAB
    changing - RELATION_TAB

  • 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

  • CJ20N BADI or user-exit when back without saving

    Dear all,
    I am looking for a BADI or a user-exit when the user press the back button in transaction CJ20N.
    Please note that the user don't want to ave in this case.
    Thank you for your help.
    Regards,
    Kevin MICHEL
    Moderator message: please (re)search yourself before asking, make use of available information/documentation.
    Edited by: Thomas Zloch on Oct 22, 2010 11:23 AM

    Hi venkatesh,
    put a breakpoint into method GET_INSTANCE of class cl_exithandler.
    Then do what you want to supervise. The method is called for all BADIs triggered. You will find out which one can be used.
    Please excuse the generic nature of my answer. I didn't know what you already tried.
    Regards,
    Clemens

  • Updating EKKO within user exit ZXM06U22 (EXIT_SAPLEBND_002)

    I am trying to update EKKO table (2 new fields that I added to CI_EKKODB) in user exit ZXM06U22 (EXIT_SAPLEBND_002).  I am populating E_CEKKO (the 2 new fields) with this information, but for some reason, it is not saving to the database (EKKO table) after I save my ME21N or ME22N transaction.  The very first thing i do in this user exit is:
    move-corresponding I_CEKKO to e_cekko.
    Does anyone have any ideas for other code that I need to add to this user exit to get these new field values in EKKO to save to database table?
    Thanks!
    Sarah.

    You should use SMOD enhancement MM06E005 to do this
    EXIT_SAPMM06E_006, EXIT_SAPMM06E_007, EXIT_SAPMM06E_008

  • MM06E005 - Custom fields to table ekko using CI_EKKODB

    Hi, I've added some new fields to this structure.
    I've added then this to the header screen of me32k.
    I need to write some abap code to make this field work, I mean now appers but is not written/read from the database table.
    In which userexits should I write this code ? Using Which structures ?
    Thanks,
    Miguel P.

    Hello Miguel,
    take enhancement MM06E005!
    How did you add the fields to the header screen of me32k? You should have used SAPLXM06, dynpro 0201! You can read/write via EXIT_SAPMM06E_006 ff.
    Don't forget to activate your relevant project (CMOD).
    Regards,
    Martin

  • User Exit when i am saving notification in IW21(Create PM Notification )

    Please give a correct exit name
    I tried all this but control not going inside the exit.
    IWO10026          
    IWO10027          
    IWOC0001          
    IWOC0002          
    IWOC0003          
    IWOC0004
    QQMA0024          
    Thank you
    Kumar

    hi,
    IWOC0001 this ll get triggered when u create notification...in iw21 as soon as u press enter after putting the notification type in IW21...........

  • 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.

  • 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

  • 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

  • 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 field in a standard table - AFVC

    Hi All,
    We have created a custom field in table AFVC. While updating other things related to that Order/Operation, we need to update this custom field.
    Can you kindly let me know how we can approach this? Do we use a direct Modify/update statement in such cases to update the standard sap table?
    Regards
    An

    Hi Ankur,
    There are few ways to do.
    1) Implement the screen field in the transaction at the operation level for visibilty to all the reason code. After updation of USER STATUS you need write the small utlity to update that field through LSMW or any other way to update this field in the transaction directly to save in the database table.
    2) AFVC means orders operation data. In this table many types of order data will store so you have to choose which type of order you are going to update whether it will be Internal order or production order or maintaineance order etc..
    3) Direct updation is last preference if there is no way for updation.
    Please let me know which order cateogry you are updating from thrid party sytem to your current system.
    As J@Y said if you are updating through some function module then in that case for BAPI's there is separate structure EXTENSION_IN and OUT to update the custom fields.
    Thanks,
    Satheesh

  • 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

  • Update the database table inside an user exit.

    Hi Experts,
    I have a issue where i have to update a custom table in an User exit.
    I am using Lock object for ENQUE/DEQUE.
    I have tried to use statements like UPDATE/MODIFY inside the user exit.
    But the problem is that it's not updating the database table at the same time.
    I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.
    The real issue is that this custom table is read for batch creation at the same time for different users.
    Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..
    While requirement is to create a different/unique batch numbers.
    Program is updating the table but it's taking time..so in between other users are creating the same batch number.
    Please guide me what would be the best solution for this.
    Regards,
    Amit Kumar Singh

    Thanks for your quick reply.
    My actually requirement is like that.
    I have to create a Process Order using tcode COR1.
    After passing some input value it goes inside an User Exit.
    There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.
    The new batch number is created using the combination of these table fields.
    Once a new batch number is created it increment the numeric key field number by one.
    Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.
    Here i am not able to update the database table inside this User Exit.
    Table is geeting updated but after some time and out of this User Exit.
    Please suggest what's required in that case?
    Regards,
    Amit Kumar Singh
    Edited by: Amit  Singh on Feb 3, 2009 11:33 AM

  • 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.

Maybe you are looking for

  • Firefox 'opens' but doesn't/won't open an actual browser window?

    Firefox Beta 4 has crashed out on me several times, but since the most recent crash Firefox will 'open,' but doesn't actually open a new browser window. Even if I go to the menu and manually select "new window" it doesn't do so. Nor can I submit comm

  • RE: Images not displaying...

    I am a very novice user of RoboHelp and inherited maintenance of the files from a source who left the company.  We use Team Foundation Server to store source files and Harvest to publish the files; however, in the last week I noticed new images added

  • How can I Maximize a Windows and include a check box into my jtable

    Hi there, I have made a program to show a JTABLE it is working well, I'm talking about show information(DATA), my question is related with MAXIMIZE my jframe or window, how can I do that??? other question is related with include or add a new column t

  • Program icons on the Dock

    i loaded office for MAC as an administrator and it shows on my dock.  How do I get it to show on other users dock and make it stay on the dock?

  • Apex Collections

    When I do a select * from apex_collectionsI always get a "no data found." even though my application tells me that there does indeed exist an apex collection. For debugging purposes, what is the best way to see what is contained in an apex collection