WARNING MESSAGE in USER EXIT

Hi ,
We are not able to TRIGGER a WARNING MESSAGE but we are able to TRIGGER an ERROR MESSAGE for a particular Business Scenario in side a user Exit.
Any way we can produce the WARNING MESSAGE from the USER EXIT.
Regards,
Sap User

Hi sapuser,
1. We can issue message of type 'I'
  (messsage of type W
  gets displayed on status bar,
  and if the standard transaction,
  again display some its own message,
  then our message will be overwritten)
2. it will be displayed in a message box.
regards,
amit m.

Similar Messages

  • 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

  • Warning message in field exit

    Hi All,
    I'd the requirement of giving a warning message for transaction VA01 if user enters some specific order type.
    So I'd created a field exit for AUART for this screen. But i am able to give error message only and found out that warning & info messages can't be given in a field exit.
    Please help me out. Is there any way I can give a warning message in field exit or suggest some other sol. for it.
    Thanks,
    Manu

    Hi,
    Thanks f or your answers, but the issue is that i need to give this message as User enters the details on VA01 screen & presses enters.SO i can't use user exit like move_field_to_Vbak & others.
    Also, using a FM to give pop up message will ultimately make use of statement CALL SCREEN which is not allowed in field exit, i also tried FMs which displays messages normally means not in pop up screen, but again through it also i can only give error messages.
    Please suggets if there is any other option.
    Thanks,
    Manu Parihar

  • INFO MESSAGE in USER-EXIT

    Hello Friends,
           I am trying to give information message in User exit while creating PO
           Is it possible to give message type ' I '  ???
           If not how to give info message on to ME21N ??
    Thanks,
    Ajay

    I'm not sure why that should be. Perhaps as gudise mahesh  says it will not trigger in update mode? My code is straightforward and it does work. It outputs a message type i if the last person to amend a po tries to release it.
    IF sy-ucomm = 'MERELEASE' AND
       sy-repid = 'SAPLXM06'.
      CLEAR wa_bekpo.   
      READ TABLE it_bekpo INTO wa_bekpo INDEX 1.
      SELECT SINGLE ernam FROM ekko INTO l_uname
          WHERE ebeln = wa_bekpo-ebeln.
      IF l_uname = sy-uname.
        e_cekko-ekorg = space.
        MESSAGE i076(zmm).
        LEAVE TO TRANSACTION sy-tcode.
      ENDIF.
    Exclude last person to change PO   
      SELECT * FROM cdhdr   
        INTO CORRESPONDING FIELDS OF TABLE it_cdhdr   
        WHERE objectclas = c_class       
          AND objectid   = wa_bekpo-ebeln    
          AND change_ind  NE c_i.   
      IF NOT it_cdhdr IS INITIAL.  
        SORT it_cdhdr BY udate DESCENDING utime DESCENDING.
        READ TABLE it_cdhdr INDEX 1 ASSIGNING <cdhdr>.  
        IF <cdhdr>-username = sy-uname.   
          e_cekko-ekorg = space.  
          MESSAGE i089(zmm).    
          LEAVE TO TRANSACTION sy-tcode. 
        ENDIF.      
      ENDIF.
    ENDIF.
    Sorry I couldn't be of much help.

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

  • 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

  • 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

  • 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

  • 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

  • Warning message to users before auto-logoff

    Our Basis folks have set up auto logout after a certain amount of user inactivity.
    The users have requested a warning message 10, and then 5 minutes before they are logged off due to inactivity.  Our Basis person says this would have to be done in ABAP. Is this true?.  If it is, how would I do it in ABAP? Is there a table that shows active/inactive time by user?  Thanks.

    OK - so they get a popup ten minutes before logoff; if they respond to it, the clock is reset and they don't get logged off; otherwise, another popup at five minutes; if they don't respond they get logged off. Is that about correct?
    Rob

  • How to display multi-line popup message in user exit?

    Hi,
    I need to display a multi-line popup text message with controllable response buttons in a user exit.
    I looked at POPUP_TO_CONFIRM with its DIAGNOSE_OBJECT, but I need substitution parameters and the FM doesn't support this functionality. So this won't meet my needs.
    Does anyone have any suggestions (maybe with some example code?) about how to do this?
    Thx.
    Andy

    Code:
    LOOP AT I_KNB1 WHERE ZTERM NE ZPAGDESCR-ZZTERM.
    IF SY-TABIX = 1.
      IF I_TEXT_TABLE[] IS INITIAL.
         PERFORM HEADER TABLES I_TEXT_TABLE.
         REFRESH :  I_T052U.
            SELECT ZTERM ZTAGG TEXT1
           FROM T052U
           INTO TABLE I_T052U
           FOR ALL ENTRIES IN  I_KNB1
           WHERE SPRAS = SY-LANGU AND
                 ZTERM = I_KNB1-ZTERM.
        ELSE.
        REFRESH :  I_T052U.
        SELECT ZTERM ZTAGG TEXT1
           FROM T052U
           INTO TABLE I_T052U
           FOR ALL ENTRIES IN  I_KNB1
           WHERE SPRAS = SY-LANGU AND
                 ZTERM = I_KNB1-ZTERM.
           I_TEXT_TABLE-TDLINE = TEXT-T01.
           APPEND I_TEXT_TABLE.
           CLEAR I_TEXT_TABLE-TDLINE.
      ENDIF.
         MOVE 'Company' TO I_TEXT_TABLE-TDLINE+0(10).
         MOVE 'Payment' TO I_TEXT_TABLE-TDLINE+10(10).
         MOVE 'Day' TO I_TEXT_TABLE-TDLINE+20(5).
         MOVE 'Description' TO I_TEXT_TABLE-TDLINE+26(100).
         APPEND I_TEXT_TABLE.
         CLEAR I_TEXT_TABLE-TDLINE.
         MOVE 'Code' TO I_TEXT_TABLE-TDLINE+0(10).
         MOVE 'Term' TO I_TEXT_TABLE-TDLINE+10(10).
         MOVE 'Limit' TO I_TEXT_TABLE-TDLINE+20(5).
         APPEND I_TEXT_TABLE.
         CLEAR I_TEXT_TABLE-TDLINE.
         I_TEXT_TABLE-TDLINE = TEXT-T01.
         APPEND I_TEXT_TABLE.
         CLEAR I_TEXT_TABLE-TDLINE.
    ENDIF.
         MOVE I_KNB1-BUKRS TO I_TEXT_TABLE-TDLINE+0(10).
         MOVE I_KNB1-ZTERM TO I_TEXT_TABLE-TDLINE+10(10).
         LOOP AT I_T052U WHERE ZTERM = I_KNB1-ZTERM .
           MOVE I_T052U-ZTAGG TO I_TEXT_TABLE-TDLINE+20(5).
           MOVE I_T052U-TEXT1 TO I_TEXT_TABLE-TDLINE+26(100).
          APPEND I_TEXT_TABLE.
          CLEAR I_TEXT_TABLE-TDLINE.
         ENDLOOP.
    ENDLOOP.
    ENDIF.
    IF NOT I_TEXT_TABLE[] IS INITIAL.
      CALL FUNCTION '/RWD/POPUP_TO_DISPLAY_TEXTLIST'
        EXPORTING
      TASK             = 'DISPLAY'
          TITEL            = 'Inco term payment term mismatch'
    IMPORTING
      FUNCTION         =
        TABLES
          TEXT_TABLE       = I_TEXT_TABLE .
    ENDIF.

  • Basic type DELVRY01 - Message typeDESDAV- User exit required

    HI,
        We are using the Basic type DELVRY01 as an outbond IDOC to post the data to external system. I'm looking for change the USER Exit where I can add entries to the segment E1ADRM1.
      Early replies are appreciated and rewarded.
    Thanks & Kind Regards,
    Suresh

    Hi Suresh,
    Please check this sample code on how to update for particular IDoc segment.
    DATA: ZE1EDPT2 LIKE E1EDPT2.
    LOOP AT IDOC_DATA.
      CASE IDOC_DATA-SEGNAM.
         WHEN 'E1EDPT2'.
           MOVE IDOC_DATA-SDATA TO ZE1EDPT2.
           ZE1EDPT2-TDLINE   = <...>    <- import from memory id
           ZE1EDPT2-TDFORMAT = <...>    <- import from memort id
           MOVE ZE1EDPT2 TO IDOC_DATA-SDATA.
           MODIFY IDOC_DATA.
         WHEN <...>
         OTHERS.    
       ENDCASE.
    ENDLOOP.
    Regards,
    Ferry Lianto

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

  • Problem with information message in User exit

    Hi All,
    Iam using the below code in MV45FZZ to check the customer(sold to party) entered in VA31 with a Ztable and popup a message if it exist in the Ztable.
    select single * from zcust into zcust where kunnr = kuagv-kunnr.      
    if sy-subrc = 0.                                                      
    call function 'POPUP_TO_INFORM'                                       
         exporting                                                        
    titel   = 'INFORMATION'                                               
    txt1    = 'Calender day orders for this customer have been blocked'   
    txt2    = 'Please contact [someone] if this block should be removed'  
            TXT3    = ' '                                               
            TXT4    = ' '                                               
         exceptions                                                       
              others  = 1.                                                
    if sy-subrc = 0.                                                      
    leave to screen 101.                                                  
    endif.                                                                
    endif.                                                                
    <b>The problem is, the message needs to be in logon language based.</b>
    I tried to give it in a text element, however it is asking me a access key to enter it in a text element. Also I tried to give just a information message box like this message I088(z2). But this is comming like a success message .  Letme know how to overcome this.
    Regards,
    Senthil

    Hello,
    I have gave similar kind of info message in the same exit like this
    <b>          message i082(Z48SD) with l_r_xvbap-posnr
                                       l_r_xvbap-matnr
                                       text-302.</b>
    <b>Text-302 is created for the same program SAPMV45A</b>
    U could try like this.
    If useful reeward.
    Vasanth

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

Maybe you are looking for

  • How to make one album show up for multiple artists?

    I'd like some albums to show up under multiple artists in iTunes in Windows.  Say for example "The Basement Tapes" by Bob Dylan and The Band.  It would be nice to see this album under both these artists.  Or to have "Two Men With the Blues" show up u

  • JDev 10.1.3 Prod Bug in Structure Window when using PL/SQL and Stored Types

    Using JDev 10.1.3 build 3673 When loading/editing a PL/SQL package with code like the following: rec := NEW Record001Row; Where Record001Row is a stored type on the database gives an "Error Expecting ;" in the JDev Structure Window. Once the above li

  • Customer Loyalty Call

    So, I finally answered a call from an 866 number I didn't recognize and found that it was from the "Verizon Wireless Customer Loyalty" department where they were trying to get me to agree to leave my unlimited data plan and go to another plan.  She s

  • Oracle Workflow VS Oracle Approvals Management

    Hi, I am new to Oracle Apps. I would like to know the difference between Oracle Workflow and Oracle Approvals Management. I a bit confused. Why we need to have Oracle Approvals Management module if the same can be achieved through Oracle Workflow. Am

  • Multiple zip with same zip compression

    Hi, I have a number of small texts, say 100-1000 bytes. They contain similar kind of texts and if I zip with all of them together it gives excellent compression. However, I need to zip them 1 by 1, since I will later access only one of them and I don