Update in user exit.

Hi all,
I have code in the User exit - EXIT_RFEBBU10_001 - which will be triggered by the transaction code FF.5.
My code is to update the Standard Database table FEBEP
My code  is. 
Update FEBEP
           SET FWAER = ''
               FWBTR = '0.00'
            where KUKEY = i_febep-kukey AND
                  ESNUM = i_febep-esnum.
But this is not updating the database table with FWBTR as 0.00 and FWEAR as nothing, but SY-SUBRC is 0 while debugging.
I used the same code in a seperate executable program that time it is updating the table, but inside the User Exit it is not doing.
Please tell me how to solve this...
Points assured
Regards,
Prabhu

Hello Prabhu,
I'm sorry to say that your whole approach is incorrect i.e. everything you are doing in this user-exit from start to finish is incorrect and it is against SAP Best Practice!
Firstly, you are trying to modify (update) a SAP standard database table - which is not recommended in the first place but then again I see you are trying to change a database full with highly sensitive information (The Electronic Bank Statement Line Item table)!!! Not only you may land up in big trouble personally for doing this but also I don't think your client's system auditors will be too pleased about that. So, Never Do This
Then, you are wondering if you could use a Commit Work statement in your user-exit - which is again not recommended. Let the system take care of that after it leaves your exit and before completing the transaction. So, again, Never Do This
Now, to solve your issue, you should be first reading the documentation of SAP Enhancement FEB00001 because your user-exit function module is linked to this enhancement. This is well documented and shows you how to code this exit. I think if you require any changes in the line items you should make changes in the export parameter E_FEBEP because SAP allows you to change E_FEBEP and finally don't forget to set the export parameter E_UPDATE = 'X' after you have changed data in any structure or table parameters to confirm changes back to SAP.
Hope this helps.
Cheers,
Sougata.

Similar Messages

  • Delivery text updation using user exits

    Hii All
    Our client has a requirment where we need to update text in delivery header when we save the delivery.
    The delivery text needs to be updated when we save the delivery.
    Can anyone help me in letting me know steps to be followed to do the same.
    Thanks & Regards,
    Gaurav Manocha

    First of all identify the text id associated with your delivery. Once you identify the text id, change the text id in the sample program below. You can have this logic coded within your MV50AFZ1 user exit
    data: w_txt_hdr  LIKE thead,
          i_text  LIKE tline  OCCURS 0 WITH HEADER LINE,
                         i_text-tdformat = '* '.
                         i_text-tdline = 'sample'.
                   append i_text.
                  w_txt_hdr-tdobject = 'VBBK'.
                  w_txt_hdr-tdname   = likp-vbeln.
                  w_txt_hdr-tdid     = '0008'. "text id
                  w_txt_hdr-tdspras  = sy-langu.
                 CALL FUNCTION 'SAVE_TEXT'
                       EXPORTING
                            client          = sy-mandt
                            header          = w_txt_hdr
                            savemode_direct = 'X'
                       TABLES
                            lines           = i_text
                       EXCEPTIONS
                            id              = 1
                            language        = 2
                            name            = 3
                            object          = 4
                            OTHERS          = 5.
                  IF sy-subrc <> 0.
                  ENDIF.

  • Inbound idoc values when updated from user exit not saved

    I'm trying to process some user exits of an inbound idoc from WE19.
    The values get correctly populated to IDOC_DATA internal tables of IDOC_INPUT_ORDRSP function module in debug kode
    but when the new idoc is generated from WE19 , those segment values (populated by exit) are not shown/saved.
    The user exit is EXIT_SAPLEINM_007.
    Is it not possible to populate segment values of inbound idocs from using user exits. If yes , then during testing using WE19 , every time a new idoc is created it should display those values into the concerned segments. Please help.

    Hello,
    yes is possible it ...
    I think the problem is:
    or
    you have something wrong when to append the new line on internal table
    or
    the exit used is not correct: read the documentation on EXIT_SAPLEINM_0**

  • Table update in user exit ZXM08U16

    I'm trying to put in a check and update table when an invoice is processed in MIRO. So far i have
    IF ?????-ebeln CP '92*' AND
       ?????-SHKZG EQ 'S'.
      SELECT SINGLE *
             FROM  zmmvendorstop
             WHERE lifnr     EQ ?????-lifnr
             AND   stop_date EQ '00000000'.
      IF sy-subrc EQ 0.
        zmmvendorstop-stop_date = sy-datum.
        zmmvendorstop-work_days = sy-datum - zmmvendorstop-start_date.
        MODIFY zmmvendorstop.
      ENDIF.
    ENDIF.
    I'm struggling on where to get the information to do the check from, so if anyone could help fill in the question marks it would be a great help.
    Thanks

    Hi,
    It is available in the structre E_TDRSEG-TBTKZ (Credit/debit indicator) and E_TDRSEG-ebeln(PO number).. this is tables paramter. Lifnr is also available in the structure.
    Regards,
    Nagaraj

  • Screen field Updation using user Exit

    Dear all
    In VA11, in the Services Tab, there is a table control  . Through Configuration , Functional consultant added one filed. The added field has to be filled by the customer Exit     SRVESLL .   In the debugging mode , claculation is working properly. But in the screen , the calculated value is not appearing .
    Can  anyone suggest me any solution???
    Thanks and Regards
    Karthikeyan.P

    Ya, I have extended .
    SRV_ESLL-ZIELWERT  =  SRV_ESLL-NETWR  /  SRV_ESLL-MENGE.
    but still its not appearing in the screen.
    thnkz
    Edited by: karthikeyan palaniayya on Apr 15, 2010 8:00 AM

  • User Exit for Updating Delivery Plant at Item Level in Sales Order

    Hello Experts
    There is a requirement to determine the delivery plant for each item level and than update the items with newly determined plant.  There is a user exit MV45AFZZ routine FORM USEREXIT_MOVE_FIELD_TO_VBAP. to update the item level entries in Sales Order in VA01 or VA02. Is this the right place to do this?, if yes , do i need to perform any other standard logic (like re determine Shipping points , schedule lines ) for newly determined plant? If not , can you please suggest any other place , BADI or user exit to change the delivery plant of sales order.
    Thanks a lot....
    -Harkamal

    Best place is MV45AFZZ-USEREXIT_SAVE_DOCUMENT_PREPARE. Populates the values just before saving the document. You can have your own deriving logic. Make sure that peice of code is trigger only for Sales Order create or change (VA01/VA02).
    Are you kidding???  You do realize that this is AFTER all validations against configuration, ATP, pricing, etc. have been performed??!!!  Never, ever change a critical value like plant in the SAVE user exits...

  • How do I SUBMIT from a user exit which is called in an update task?

    I want to send an idoc each time there is a goods movement. So, in the user exit of MB_POST_DOCUMENT I am calling IDOC_OUTBOUND_WRITE_TO_DB. This creates an idoc of status 30. However, in order to send the idoc I want to SUBMIT RSEOUT00. I get an ABAP dump on the SUBMIT because MB_POST_DOCUMENT is called in the update task, where SUBMIT is not allowed. Do you know any other way I can execute RSEOUT00 at this moment without having to call it later in batch?
    Thanks!!
    Joy

    Hi Naren,
    Your reply is VERY helpful!! Thank you so much.
    I added  CALL FUNCTION 'RSAP_IDOC_EINBUCHEN_VOM_BIW_4' IN BACKGROUND TASK. I am no longer getting the dump, but my idoc is still a status 03 and not a status 30. Should I expect to see it turn to a status 30? I ran this function directly in SE37 -> Test with the same parameters and it ran perfectly and turned the idoc to a status 03. Is there anything else I need to do in the code?
    Thanks again,
    Joy

  • User Exit to update user status at VA01/VA02

    Hi Expert
    Please help identify any User Exit to update User Status stored in tables (JSTO/JEST), at time of sales order (Business Object 2032) creation / change.
    Requirement is to set check mark on a specific user status in case of a material master is missing HTS code.
    Regards-Aamir

    Hi,
    If your requirement is to set the check the HTS field in the material master, you can make the field as Mandatory without which the  Material cant be saved
    You can make this field mandatory in OMS9 transaction code with field status as 89 and the field is MARC-STAWN
    Please revert if you need more details
    regards,
    santosh

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

  • Ztable not updating in sales order user exit

    Hi Genius Abapers.
    We want to take text ID data of sales order into Ztable. For taking the data we have used user exit in sales order. Now the problem is if we go through debug mode then the Ztable is updating but if we remove the break point Ztable is not getting updated.
    Please give solution for this problem
    Regards
    Narayana

    Hi Gurus,
            I am basically from SD and we used commit statements in the programme and this is the code we used
    Include name --- MV45AF0B_BELEG_INITIALISIEREN
    **********************************Code Addd by paresh 8.10.2007 starts *******************************
      DATA : BEGIN OF itab_so OCCURS 0,
             vbeln LIKE vbap-vbeln,
             posnr LIKE vbap-posnr,
             spras LIKE t002t-spras,
             END OF itab_so.
      DATA : BEGIN OF itab_so1 OCCURS 0,
             vbeln LIKE vbap-vbeln,
             posnr LIKE vbap-posnr,
             spras LIKE t002t-spras,
             END OF itab_so1.
      DATA : BEGIN OF it_tabid OCCURS 0,
             tdid LIKE stxh-tdid,
             tdspras like stxh-tdspras,
             END OF it_tabid.
      DATA : is_stxh TYPE stxh.
      DATA g_header TYPE string .
      DATA wa_plain_text TYPE zplain_text.
      DATA t_lines LIKE tline OCCURS 0 WITH HEADER LINE.
      DATA g_item(16)." type i.
      data :it_ztable type table of  ZPLAIN_TEXT .
      data wa_ztable type zplain_text.
      data flag.
    *****************************Read Header text***************************************
    *loop at vbak.
       itab_so1-vbeln = vbak-vbeln.
       itab_so1-posnr = vbak-posnr.
       itab_so1-spras = vbak-wklnd.
       APPEND itab_so1.
       CLEAR itab_so1.
    ENDLOOP.
    refresh it_tabid.
    clear it_tabid.
    refresh it_ztable.
    clear it_ztable.
      LOOP AT xvbap.
        itab_so-vbeln = vbak-vbeln.
        itab_so-posnr = xvbap-posnr.
        itab_so-spras = xvbap-wklnd.
        APPEND itab_so.
        CLEAR itab_so.
      ENDLOOP.
    LOOP AT itab_so.
        SELECT tdid tdspras FROM stxh INTO TABLE it_tabid WHERE tdobject = 'VBBK' AND tdname = vbak-vbeln  .
    ENDLOOP.
    *loop at it_ztable into wa_ztable.
      LOOP AT itab_so.
        LOOP AT it_tabid.
          is_stxh-tdobject = 'VBBK'.
          is_stxh-tdname   = vbak-vbeln.
          is_stxh-tdid     = it_tabid-tdid.
          is_stxh-tdspras  = it_tabid-tdspras.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              id                      = is_stxh-tdid
              language                = is_stxh-tdspras
              name                    = is_stxh-tdname
              object                  = is_stxh-tdobject
            TABLES
              lines                   = t_lines
            EXCEPTIONS
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              OTHERS                  = 8.
          IF sy-subrc = 0.
            LOOP AT t_lines.
              CONCATENATE g_header t_lines-tdline INTO g_header SEPARATED BY space.
            ENDLOOP.
            wa_plain_text-application = 'SO'.
          wa_plain_text-key1 = itab_so-vbeln.
            wa_plain_text-key1 = vbak-vbeln.
            wa_plain_text-key2 = 'HDR'.
            wa_plain_text-sub_application = it_tabid-tdid.
            wa_plain_text-text = g_header.
            wa_plain_text-last_date = sy-datum.
            MODIFY zplain_text FROM wa_plain_text .
       wait up  to  60 seconds.
             commit work.
            CLEAR: wa_plain_text.
            CLEAR : g_header,t_lines.
            refresh t_lines.
          ENDIF.
      if sy-subrc <> 0.
       delete from zplain_text where key1  = vbak-vbeln    and
                                  key2  = itab_so-posnr    and
                                  SUB_APPLICATION = it_tabid-tdid.
                                   commit work.
       endif.
        ENDLOOP.
      ENDLOOP.
    *endloop.
    Please do me the needfull
    Regards
    Manam.Narayana

  • User exit to update the incompletion log in sales order for pricing error

    Hi experts,
    I have to check the some mandotory pricing conditions in sales order, if that conditions are not exist in sales order then i need to show the information message as well as i need to update it in incompletion log of sales order. (incopletion log we can see on menu bar 'EDIT' or ctrl+F8 on main screen of VA01). So that user can save the sales order but it will be in incomplete status.
    I have completed it upto showing the information message using user exit 'MV45AFZZ', but after this i don't know how to update it in incompletion log of sales order for pricing. I tried to update in tables VBUK-UVPRS, but i am not getting the desired result.
    Please anyone can tell me how to update it. In which user exit i can update the incompletion log.
    Thanks and Regards,
    Vicky.

    Hi Vinod,
    I am sending you my code please check it,
       if TKOMK-SPART = 10.
        if XKOMV is not INITIAL.
          clear v_JEXP.
        READ TABLE XKOMV with key kschl = 'JEXP'.
        if sy-subrc = 0.
          check XKOMV-kwert = 0.
          message i003(ZT) with 'Value should not be 0 for conditioin type JEXP'.
          v_JEXP = 'X'.
        else.
          message i003(ZT) with 'Maintain the mandatory Conditioin type JEXP'.
          v_JEXP = 'X'.
        endif.
        if v_JEXP = 'X'.
      XVBUV-MANDT = sy-mandt.
      XVBUV-POSNR = '000010'.
      XVBUV-TBNAM = 'VBAP'.
      XVBUV-FDNAM = 'PRSOK'.
      XVBUV-FEHGR = 20.
      XVBUV-STATG = '06'.
      XVBUV-FCODE = 'PKON'.
      XVBUV-SORTF = 9999.
      XVBUV-LFDNR = 0000.
      XVBUV-UPDKZ = 'I'.
      append XVBUV.
        endif.
    endif.
    endif.
    Please suggest something to solve this.
    Thanks and Regards,
    Vicky.

  • User exit to update characteristic attributes in sales order

    Hi all,
    I am having one queer requirement.
    We are having variant configuration. We are manufactiuring a material which is having lenght as one of the characteristic.
    While creating the sales order the user will enter the value against length. This we have to pull in the inspection lot with range.
    For ex. if the length required by customer is 1000 mm then depending upon the tolerance limit say +/-1.5 %, another characteristic should get updated with the allowed range (here in this example the lower range  985 and upper range 1015) against another characteristic.
    This characteristis will sever as class characteristic for QM master inspection characteristic.
    Here the problem is the functionality can't be mapped with object dependency in satandard SAP (you can't derive range with object dependency), so I am looking for user exit to update the second characteristic depending upon the value of first characteristic and allowed percentage.
    The user exit should be effective for sales order creation as well as sales order change.
    Please help.

    Hello Nikhil,
    I am looking for the tolerance limit to upadte against one char only and not two separate chars.
    If the range is against only one char (and that too again in numeric format and not characteristic format) same shall can be pulled against master inspection characteristic in inspection lot.
    Looking forward for the soution.
    Mimiri

  • Need a badi or user exit to update numbers at level of Goods Receipt level

    Hi I need to update serial number based on combination of plant, company code and fiscal year while generating a Goods Receipt by using MIGO transaction code.
    Step1) once run the MIGO transaction, here enter values of Purchase Order, Quantity, and delivery note and check the item ok check box for goods receipt.
    Step2) Then check for any warnings and errors by clicking the check button/tabular
    Step3) Finally post the goods receipt for the purchase order by clicking Post button/tabular.
    Result:
    Then system will provides the Material of Document number for the goods receipt of purchase order. That number like 5000000342.
    Here client wants to put his number like V500000001.for one combination of plant, company code and fiscal year.
    Example
    Z TABLE AS LIKE BELOW COMBINATION
    Plant                  company code             first no               end no               current no     FISCAL YR
    7800/7801      2000                            V500000001      V599999999             
    7802/7803      3000                            F500000001      F599999999         
    7804                4000                            D500000001      D599999999         
    Whenever end user generates a GR then System should display one of above number instead of systems generate value.
    I have used to fix the issue badi> mb_badi_migo document_badi_update and user exit-> mb_cf001, mbcf0002 but not found the solution.
    Please provide me needful information.
    Thanks,
    Raj

    Hi
    <b>Here is the sample code...</b>
    method if_ex_mb_migo_badi~post_document .
      data: ls_migo_badi_example type migo_badi_exampl,
            lt_migo_badi_example type table of migo_badi_exampl,
            ls_extdata type migo_badi_example_screen_field,
            ls_xmseg   type mseg.
      field-symbols: <gt_extdata> type migo_badi_example_screen_field.
    * Transaction MIGO will now post a material document.
    * Any errors here MUST be issued as A-message (better: X-message)
    * Copy data from material document into internal table
      loop at gt_extdata into ls_extdata.
        if g_cancel is initial.
          read table it_mseg into ls_xmseg
             with key line_id = ls_extdata-line_id.
        else.
          read table it_mseg into ls_xmseg
             with key smbln = ls_extdata-mblnr
                      smblp = ls_extdata-zeile
                      sjahr = ls_extdata-mjahr.
        endif.
        if sy-subrc is initial.
          move-corresponding ls_extdata to ls_migo_badi_example.
          move-corresponding ls_xmseg   to ls_migo_badi_example.
          append ls_migo_badi_example to lt_migo_badi_example.
        endif.
      endloop.
    * The data from external detail screen can be saved now:
      check gt_extdata is not initial.
      call function 'MIGO_BADI_EXAMPLE_UPATE_DATA' in update task
        tables
          it_migo_badi_example = lt_migo_badi_example.
    * The data from external header screen can be saved now:
      move-corresponding is_mkpf to gs_exdata_header.
      call function 'MIGO_BADI_EXAMPLE_UPDATE_HEAD' in update task
        exporting
          is_migo_badi_header_fields = gs_exdata_header.
    endmethod.                    "IF_EX_MB_MIGO_BADI~POST_DOCUMENT
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • User exit/BADI for updating custom table in MB1B transaction-

    Dear All,
    When performing a material to material conversion in MB1B transaction for  batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
    The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
    Kindly suggest a user exit/BAIi available for updating the same in the custom table.
    Regards,
    Deepak

    Deepak, Exits for MB1B are
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.

  • User exit or BAdi for field update in ECC system for SUS supplier

    Dear Guru's,
    I am configuring MM-SUS scenario in our srm 7.01 scenario. Not all vendors of our client are going to be SUS vendors. For SUS vendors, the client will be using Purchase Order Acknowledgement and Advanced Shipping Notification key. I am thinking of configuring a confirmation control key which will incoporate requirement of PO acknowledgement and Inbound delivery document. The assignment of confirmation control key and PO Acknowledgement Required checkbox in the vendor master record will default it in the purchase order.
    Now, the question is how to update the existing vendor master data record which will be SUS vendor. I am looking at a solution like user exit or BAdi which updates the confirmation control key and purchase order acknowledgement required check box when the client manually assigns the class 'Z_CRED_SUSMM' to the  ERMS vendor master.
    Could you please help me to find the required exit or BAdi?
    Thanks and regards,
    Ranjan
    Ranjan Sutradhar

    EXIT_SAPMF02K_001 definitely wont work as this is for custom checks. this does not update data in vendor master.
    you can try using below method of VENDOR_ADD_DATA badi.
    IF_EX_VENDOR_ADD_DATA~PRESET_VALUES_PORG
    but you need to read the screen field for classification and then according to that i think you can change the LFM1 data inside this badi

Maybe you are looking for

  • Creating a dropdown and choosing multiple selections

    Can I create a dropdown in a form that I can choose multiple selections from so the items I choose will show up like a list?

  • How to Adjust iPhone Contrast

    hI, I FEEL LOT OF PROBLIM ,I CAN NOT ADJUST THE COTRAST ON IPHONE4.

  • HT1926 Unable to download the latest version of Itunes

    I have never had any issues downloading Itunes before but when i try to download the most recent version I get the following error message. "The feature you are trying to use is on a network resource that is unavailable.  Click ok to try again or ent

  • Am I able to use Sockets in applets

    I developed a server-client application in java using datagrams, and decided to try to convert the client application into an applet. The problem was that the applet wouldn't run in a browser but it worked if I used javas appletviewer! Tryed both JDK

  • Remove calling features - Answer 1571 and Privacy ...

    I've just ordered a new connection, and decided to opt into the "free" calling features Answer 1571 and Privacy at Home. After completing the order I was notified by email that these features are only free under certain conditions, otherwise there's