Custom error message in user exit is giving Short dump

Hi All,
We have a scenario where in if any user try to create/Change/Delete particular types of contract in SAP system we have to issue error message
saying ZIN/ZIR contract creation/Change/Deletion is blocked in SAP. This has to be done from the web application. So we are putting below code
in user exit MV45AFZZ in the form USEREXIT_SAVE_DOCUMENT_PREPARE.
CONSTANTS: lc_vbcpic01 TYPE sy-uname VALUE u2018VBCPIC01u2019, u201CWeb application user ID
         lc_zin           TYPE vbak-auart VALUE u2018ZINu2019,
                     lc_zir            TYPE vbak-auart VALUE u2018ZIRu2019,
                     lc_text(32)    TYPE c VALUE u2018Check long text for more detailsu2019.
DATA: l_uname TYPE sy-uname.
CLEAR: l_uname.
MOVE sy-uname TO l_uname.
*If user ID is not the Web application ID then block the creation/Change/Deletion
IF   l_uname NE lc_vbcpic01
AND ( vbak-auart EQ lc_zin
OR    vbak-auart EQ lc_zir ).
MESSAGE e830(zv) WITH lc_text.
ENDIF.
This code is working fine while creating/Changing the contract i.e. Giving us error message so that user wonu2019t be able to create/change the contract.
But when we delete the contract from VA42, Control is coming to this message statement and is giving Short dump. Below is the error analysis of the dump.
Error Analysis:
During "Exit Command" processing, the program tried to send a " " message.
This is not allowed at this point in processing.
The program had to be terminated.
Screen name.............. "SAPMV45A"
Screen number............ 4001
If any one has come across such scenario/any work around for this problem please let me know your inputs. Your inputs are highly appreciated.
I am working on 4.6C version of SAP.
Note: When i issue information/Warning message contract is getting deleted after displaying the message.
Thanks,
Vinod.

I exactly replicated the same in DELETE_DOCUMENT also
I am getting the Dump. I tried with exit also , but it continued and deleted. To avoid deletion we have to use Leave program or LEAVE TO CURRENT TRANSACTION.
Delete Function is Defined as EXIT command. so it is not possible to give error message. To convice you i just copied demo program and raised the error message.
it is also giving the dump.
copy the demo program DEMO_DYNPRO_AT_EXIT_COMMAND and make this change , information to error .
MODULE cancel INPUT.
  MESSAGE e888(sabapdocu) WITH text-001 ok_code input1 input2.
  IF ok_code = 'CANCEL'.
    CLEAR ok_code.
    LEAVE PROGRAM.
  ENDIF.
ENDMODULE.
and see...

Similar Messages

  • Can we display custom error message in user decision step screen.

    Hi,
    My requirement is to display error message when approver selects reject button in user decision step.
    based on some condition i need to display error message in user decision screen when approver tries to
    reject .
    Please help
    Thanks,
    Phani

    Hi ibrahim,
    Thanks for your Replay.
    steps
    1. cretae global class with interface  IF_SWF_IFS_WORKITEM_EXIT.
    2. cretae Event with importing parameter.
    where i need to call EVENT_RAISED method ,do inned to call that method in
    IF_SWF_IFS_WORKITEM_EXIT ?
    how  SWRCO_EVENT_AFTER_EXECUTION value is passed to method EVENT_RAISED ?
    Thanks,
    phani

  • Display error message in user-exit EXIT_SAPMP56T_002

    Hi,
    I'm doing a validation in user-exit EXIT_SAPMP56T_002 (include ZXTRVU03), and I want to display a error message. So, I'm using the instructions:
    continue_with_update = 'N'.
    MESSAGE ID xxx TYPE 'E' NUMBER yyy.
    What happens is that in SAP GUI it works fine, but in SAP Portal it gives a lot of java exceptions.
    Is there other way to display the error message that it works fine in the portal?
    Thanks.
    Sónia

    Hi,
    I tried with that but it doesn't work.
    With the instruction "Message ID..." the portal shows an RFC ERROR SYSTEM FAILURE with all that java exceptions.
    With your suggestion it does not retrieve my message, and instead it retrieves a customized message "Trip cannot be saved in this status, check mileage start and end location", that refers to the expense report and does not make any sense when I'm only creating the trip.
    Any idea for this?
    Thanks.
    Sónia

  • Error Message in user-exit  EXIT_SAPLRRS0_001 in Query

    Hi,
    ABAP BW Guru's
    I got an ABAP  type problem with RANGE numeric variables  in EXIT_SAPLRRS0_001.
    With character or dates iuser-exits worke fine.
    My characteristic is CONNID Type  NUMC 4
    My user-exit variable is named CONNID_EXIT_STEP_2.
    My ABAP processing in the exit for the user-exit varibale is quite simple (testcase):
      DATA: l_e_t_range TYPE rsr_s_rangesid.
      l_e_t_range-low  =  '17'.
      l_e_t_range-opt  =  'EQ'.
      l_e_t_range-sign =  'I'.
      APPEND  l_e_t_range      TO   e_t_range.
    My Error message in the BEX Analyser is:
    Value "17" for user-exit variable CONNID_EXIT_STEP_2 is inavlid.
    What's wrong with the ABAP processing in the exit  (testcase) ?
    The debugger clearly shows l_e_t_range-low with value 17.
    l_e_t_range-low  seems is a character.
    Anyone can give a tip ?
    Thank You !
    Martin
    ThanXs

    Dear Karthik,
    You are right. First time my user exit execute, after that report automatically call message located Function Module LCOPDU13 504th row
         IF NOT SY-MSGID IS INITIAL.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    Message number is 806 message id is RU.
    Can you help me for fix this situation? I just want to add a data control in ZXCOFU05 user exit. For user fill data (werks based)
    Thanks your helpful answer

  • Error message from user exit - current screen becomes grayed(non-editable)

    I am working on a Sales Order (VA01/VA02) user exit(USEREXIT_SAVE_DOCUMENT_PREPARE) in MV45AFZZ program. I am validating certain values entered by user in this exit. Based on a condition, I issue a error message e.g. "message e001(ZV) with .....". I expect the processing to interrupt and the system control  returns to the current screen. When there is an error, error message shows up on the status bar, but the current screen is completely grayed out(non-editable), not able to modify the incorrect entries. I keep hitting ENTER but no change to the grayed screen. Is there anything wrong in the way I issue error message?
    I am on ECC6.
    Thanks.

    could you please help me if possible in my senario :-
    I am validating a field(serial number while creating delivery) in standard exit ZXQSMU04 and written a code to display an error message. The functionality is working correctly on validation and displaying the error message. But once the error is getting trigger the serial number field is becoming in gray mode i.e non editable.
    I tried a lot to overcome this issue but not getting success could anyone help me to make the field editable while triggering the error message.
    Please note : Its an exit and not having any message field in export or return table. Also tried with warning and information message.
    Thanks in advance.
    Regards,
    Gautam Kumar

  • Customized Error Message for User

    What's your recommendation re displaying Customized User Error msg as opposed to the generic, techy #SQLERRM# ?
    How can one implement this ?
    How can one capture #SQLERRM# (or whatever), evaluate the ORA number and display a message grandmom can understand ?
    Please give an example if you can in the context of DELETE a record on P301 "Product Information" of the "Sample App"
    Thanks

    short of coding the dml procs yourself and trapping those error messages that way, i don't think we offer you a good way currently to trap and translate error messages coming out of our automatic DML processes. i've just logged the enhancement request to facilitate this, but for now i'm pretty sure you'd have to code that dml and trap your errs yourself.
    regards,
    raj

  • Raising error messages in user exit..

    hi,
    i have my code in sales order user exit FORM USEREXIT_SAVE_DOCUMENT.
    the code needs to check for a condition and if that fails i do not want to allow the user to save the sales order, rather do the change as i expect.
    i can display the message using my message class, right ? but then how to prevent further action of saving the sales order ?
    thks

    After you give the error message, set the FCODE to 'ENT1'.
    Like:
            message e398(00) with
                    'Some error occured. Press enter.'.
            fcode = 'ENT1'.
    Regards,
    Naimesh Patel

  • Display error message in user-exits for ME21n

    Hi,
    I want to give error message in exit EXIT_SAPMM06E_013
    but it is getting displayed as information and gets roll back .
    Can anyone help to display error message and stop there itself so that to give corret data and save.
    the code in this exit is as below.
    IF I_EKKO-BUKRS = '0800'.
        CLEAR:V_FLAG.
        READ TABLE TEKPA WITH KEY PARVW = 'ZN'.
        IF SY-SUBRC NE 0.
          MESSAGE E000(ZD)."'XXX' TYPE 'E'.
        ENDIF.
    ENDIF.
    Thanks,
    Suresh

    check this
    EXIT_SAPMM06E_012 to display error message
    especially look at the last post , adding the log.

  • Error message in user Exit

    Hi friends,
    Iam working on sone userexit in tcode Ko01 . actually  i have to through the error message ...break point comes to that point it is not throughting that message...the message format i have used is
    MESSAGE msgtypemsgnumber(messageid)   WITH 'text message'.
    the FM in which the include is there does not contain exceptions then can u plz tell me how i should through the error message....
    thanks in advace...

    hi praja,
    i m also facing the same problem. have u got any solution for this problem? if u have any solution pls share with me.
    regards,
    vicky.

  • E-Commerce create order runtime error because of user-exit

    Hi all,
    we face the following problem in our e-Commerce 5.0 R3 B2B application:
    In our R3 system, we have implemented the userexit_save_document_prepare when creating sales order (VA01) because we do not want an order to be created (saving is cancelled) if some conditions are not met. If this happens, the systems throws an error message that users can see at the status bar and the order creation is cancelled (but the user still is on the VA01 transaction).
    Now, we are implementing SAP e-Commerce solution and we can create orders when these messages are not thrown (the order is saved without any message because all conditions are met). If one of these error messages (in user-exit) are thrown (the user has exceeded some limit, for instance), then e-Commerce application does not show the message but shows a runtime error and crashes (user has to log in again and so on...). I include the error trace below.
    Is it not possible to show these error messages (which have information for user) on our B2B application?
    com.sap.isa.businessobject.BORuntimeException: order create not possible
         at com.sap.isa.businessobject.BusinessObjectHelper.splitException(BusinessObjectHelper.java:78)
         at com.sap.isa.businessobject.order.Order.saveAndCommit(Order.java:393)
         at com.sap.isa.isacore.action.order.MaintainBasketSimulationSendAction.basketPerform(MaintainBasketSimulationSendAction.java:122)
         at com.sap.isa.isacore.action.order.MaintainBasketBaseAction.isaPerform(MaintainBasketBaseAction.java:998)
         at com.sap.isa.isacore.action.IsaCoreBaseAction.ecomPerform(IsaCoreBaseAction.java:343)
         at com.sap.isa.isacore.action.EComBaseAction.doPerform(EComBaseAction.java:353)
         at com.sap.isa.core.BaseAction.execute(BaseAction.java:211)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at com.sap.isa.core.RequestProcessor.processActionPerform(RequestProcessor.java:674)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:391)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:117)
         at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:62)
         at com.tealeaf.capture.LiteFilter.doFilter(Unknown Source)
         at com.sap.isa.isacore.TealeafFilter.doFilter(TealeafFilter.java:61)
         at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:58)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:384)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Thanks in advance.

    Hi Jolly,
    thanks for your quick response. The user-exist is not java-based but ABAP-based. User-exit is included in program: MV45AFZZ. Routine: USEREXIT_SAVE_DOCUMENT_PREPARE.
    If we do not want to let the user save the order we use:
    MESSAGE eXXX....
    Thanks.

  • Error for customer specific Authorization check (User Exit)

    Dear Experts,
    I am facing a problem in PM.
    I have created a maintenace plan for calibration via t code IP42 and mentioned the order type PM05. Scheduling is done for the order. I got the order number.
    I have released the order and got the inspection lot number.
    While entering the results recording through t code QE17, the reluts are out of the specified range, i have given the valuation Rejected, immediately system is giving an error message as below:
    "Error for customer specific Authorization check (User Exit)"
    Though there is no user exit activated in the system, this message is coming and not allowing the result recoring for rejection.
    If I'm entering the result recording within the specified range, then valuation is Accepted and its allowing to save.
    I have checked the following user exits:
    QQMA0002: QM: Authorization Check for Entry into Notif. Transaction
    QQMA0026: PM/SM: Auth. check when accessing notification transaction.
    The above 2 User Exits are not active.
    I have also checked a note 429066. But it says incase of any dump for that user exit only its applicable and more over the current version of the system is ECC 6.0 packae 15, where as that note is applicable upto 4.6C.
    Please some one help me on this issue.
    Thanks and Regards,
    Praveen.

    Dear Pete,
    I have cheked with my technical team, There is no hotpacks updated recently. This is the implementaion project I'm in, so performing the cycle for the first time.
    Any how I got it solved, in T code QE17, after entering the Inspection lot in next screen goto menu path Settings - User settings - Defects recording mention the reprt type and tick on Reprt type Changable.
    At the time of result recording if the valuation is Rejected then it ask for defects recording close that window if not rwequired then save, the error message no longer apperaing now.
    Regards,
    Praveen

  • Custom error messages on while validating User profile

    Hi,
    I have developed a valadation handler to validate data of a user while creating/updating.
    If any of the attribute valation failed then my ValidationFailedException is getting triggered but it is showing my custom message on the server logs and on UI console i am getting "Server error occured" message. It is not display my custom errror message on the ui console.
    Please let me know the steps to perform to show my custom error messages on ui console.
    Below are the steps I followed.
    1) Develeped a class which implements ValidationHandler.
    2) Imported plugin into MDS database
    3) Imported EventHandler xml into MDS database.

    {thread:id=2256511}
    -Bikash

  • Can we show custom error message if the user fail to log in MII system.

    Hi,
    Is it possible to show a custom error message when a log in is failed because of access restrictions?
    I am using xMII version 11.5
    Thanks
    Regards,
    Neha Maheshwari

    Since you are on 11.5, it is possible to make edits to some of the system jsp pages, etc. but it would NOT be my recommendation to do so.  Since the NetWeaver versions for MII 12.0 and beyond use UME for the login instead of the LHSecurity engine, this would be a very short term change.
    What specific changes would you like to make, the login page messages, query result messages, applet messages?

  • Custom error messages in selection-screen

    Hello All,
    I have one query. I have developed a vendor aging report. In the SELECT-OPTIONS, there are 5 fields namely company code, business area, vendor group, vendor code and cash management group. What the user wants is if he enters any invalid value in any of the 5 fields, custom error message should be displayed like 'invalid company code' etc. I think we have to write these messages in 'at-selection-screen' event. Can u help me out with a sample code snippet w.r.t the above program? I have written the code as:
    AT SELECTION-SCREEN.
      IF S_BUKRS ne BSIK-BUKRS.
      MESSAGE e000. 'invalid company code' TYPE 'E'.
      ENDIF.
    But not giving the correct output.i.e. even if I enter a valid company code, the error message is displayed. Can u help me in solving this problem?
    Thanks and Regards,
    Satvik
    Edited by: Satvikpanchal on Jul 22, 2011 9:42 AM

    Hi,
      use AT SELECTION-SCREEN on S_BUKRS-low.
    Use select query for checking the Company code in T001 table check the
    Company code already exist or not? If it is not there show the message.
    Code like
    AT SELECTION-SCREEN on S_BUKRS-low.
    select single bukrs into lv_bukrs
          from T001 where bukrs = s_bukrs-low.
    if sy-subrc NE 0.
    MESSAGE e000. 'invalid company code' TYPE 'E'.
    ENDIF.
    i think you company code is select option so you have to check S_BUKRS-high also.
    using the event AT SELECTION-SCREEN on S_BUKRS-high.
    Regards,
    DHina..

  • How can i display warning messages in user exit EXIT_SAPLMGMU_001 (MM02)

    Hi all,
    while modifying the material master using MM02, i have added new conditions to display messages in user exit EXIT_SPALMGMU_001.
    But using this user exit i am not able to display warning messages.
    Can you please help me with this?
    Sample code which i have included in exit :
    SELECT SINGLE mstav FROM mara
    INTO w_mstav
    WHERE matnr = wmara-matnr.
    IF wmara-mstav NE w_mstav.
    IF wmara-mstdv NE sy-datum.
    wmara-mstdv = sy-datum.
    MESSAGE w177(z03_mm) WITH text-s04 text-s21.
    ENDIF.
    ENDIF.
    Thank you all in advance.

    As written in the SAP documentation of the Enhancement , you can only raise error message using a
    MESSAGE .. RAISING APPLICATION_ERROR.
    You could manage the "warning" yourself, sending an error first time and keeping a trace of the check in some STATICS variable, and not raising the error again if data input remains unchanged between two call of the include.
    <i>----
    EXIT_SAPLMGMU_001
    Where Is the Customer Exit - EXIT_SAPLMGMU_001 called?
    The customer exit is in function module MATERIAL_UPDATE_ALL. The
    function module checks the data for errors (logical relationships,
    foreign keys, fixed domain values, and so on) when the material master
    is updated.
    Use
    o New fields
    You can make checks possible for new fields of your own. These
    checks must be identical to the checks that you carry out for your
    new fields in online maintenance.
    o Existing fields
    For existing fields, you can extend and intensify the checks.
    You can also change data for descriptions and general material data
    (MARA). For example, the descriptions can be generated from attributes
    of the material.
    Limitations
    You cannot bypass existing checks.
    Interface to Application
    The respective data of the current logical transaction is contained in
    the structures, for example, in structure WMARA for MARA. Nonrelevant
    structures are transferred with their initial values.
    General material data that can be changed (CMARA) has the structure
    MARU. This MARA view contains fewer internal fields than MARA itself. If
    WMARA is filled, CMARA is also filled when accessed.
    The customer exit contains the exception APPLICATION_ERROR for your
    self-defined error situations.
    Using the language element MESSAGE .. RAISING APPLICATION_ERROR, you can
    terminate the current (logical) transaction and display your message in
    the log. </i>
    Regards

Maybe you are looking for

  • Report for Pending MIRO

    Hi, I am creating a Infoset Query for Pending MIRO report means PO + Vender whose GR has done but not MIRO. i use EKKO and EKBE..... Can any other table should me used.......Please suggest ! REgards, Pardeep Malik

  • Iam getting the message firefox cannot be used coz i dont have usp10.dll.i use windows xp ..please help.

    dear folks After i downlaod and install firefox.. i get a message displayed ...as "this application has failed to start because usp10.dll was not found.Re-installing the application may fix this problem".Please help me fix this as i want to use firef

  • How to find Extract for the bank key/ bank account changed in vendor maste

    Hello Gurus, I need help in finding the extract for the bank details of vendors changed for a period of time. I tried using FK04 under multiple selection and ran the report for the selected vendors. It only shows  the "bank details created" or "bank

  • Pages will not open a new document

    Hi all For some reason I cannot open a new pages document (neither blank nor template). I can open existing documents but when I try to open a new document it just freezes and I have to force quit. My software is updated and I've tried repairing disk

  • Fiori App Configurations

    Dear All Gurus, We have just successfully set up the Fiori Server(BASIS) and the next step gonna be the App Configuration. I know that there are a lot of PDF and links for this subject . What is the best/latest guideline given by SAP for latest App C