How to handle error message during PAI?

Hi Experts,
Need help here.
In my dialog screen, I have a field which is typed 'QUAN'.
In entering different format , e.g. with non numeric value or a negative value, an error message appear and it does not process the MODULES inside the chain or FIELD MODULE ON REQUEST.
Does anyone knows how to handle this kind of error. I need to display into a separate screen the errors I encountered coz I'm creating a new RF transaction.
Points will be rewarded.
Thanks in advance.

Hai
in your case(RF case) it is other way...
yes you can use
field x_currency module check_currency.
in module check_currency.
you have to display errors in another screen say 200.
in that there will be 4 fields, all are display only fields.
X_MESSAGE-MSGV1  of type sy-msgv1
X_MESSAGE-MSGV2  of type sy-msgv2
X_MESSAGE-MSGV3 of type sy-msgv3
X_MESSAGE-MSGV4 of type sy-msgv4
you populate the messages with these fields and then display it in the screen.
  method check_currency.
*--do all your checks here....
       if error
         clear x_message.
        x_message-msgv1 = 'Enter Valid Employee Number'(004).
        leave to screen 0200.
      endif.
    endif.
ENDMODULE.                 " VALIDATE_Currency
in screen 200 PBO you need to format the message
using the below logic.
       Method for formatting the message
  method message_format.
    data : lt_text type table of tline,         "text table
           lx_text type tline.                  "work area
    refresh lt_text.
    clear lx_text.
    concatenate x_message-msgv1 x_message-msgv2 into lx_text-tdline
      separated by space.
    append lx_text to lt_text.
    clear lx_text.
    concatenate x_message-msgv3 x_message-msgv4 into lx_text-tdline
      separated by space.
    append lx_text to lt_text.
*- formatting the message
    call function 'FORMAT_TEXTLINES'
      exporting
        formatwidth = 20
      tables
        lines       = lt_text
      exceptions
        bound_error = 1
        others      = 2.
    clear: x_message.
*- transfer the message data to screen fields
    loop at lt_text into lx_text.
      if sy-tabix = 1.
        x_message-msgv1 = lx_text-tdline.
      elseif sy-tabix = 2.
        x_message-msgv2 = lx_text-tdline.
      elseif sy-tabix = 3.
        x_message-msgv3 = lx_text-tdline.
      elseif sy-tabix = 4.
        x_message-msgv4 = lx_text-tdline.
      else.
        exit.
      endif.
    endloop.
  endmethod.                    "message_format
Regards
Vijay

Similar Messages

  • How To Handle Error Message In TCD Recording?

    Hi All,
      I tried recording a transaction (my own transaction) by not enterring value in an obligatory field. the error message came. but when i executed the script, it showed an error. but actualy, the error message was expected right? how to handle this situation? i tried with tcd and sapgui recording. both gave almot the same result.
      i am including the script which i have written.
    MESSAGE ( MSG_1 ).
    *TCD ( ZCUST , ZCUST_1 , ECC ).
    SAPGUI ( SAP_1 , ECC ).
    ENDMESSAGE ( E_MSG_1 ).
    v_mno = &tfill.
    v_msg = E_MSG_1[v_mno]-msgtext.
    v_mtp = E_MSG_1[v_mno]-msgtyp.
    If Msg Type is E *** **** It Has To Be E ****
    IF ( v_mtp = 'E' and v_msg = 'Account no AC02 does not exist EXIT = X').
    logtext(0,'Passed').
    ELSE.
    log(v_mtp).
    log(v_msg).
    logtext(1,'Failed').
    ENDIF.
    End Of The Condition For Message Type E ******

    I have recording messages using the TCD command.
    My script (very simple):
    MESSAGE ( MSG_2 ).
    TCD ( ME21 , ME21_1 , R3 ).
    ENDMESSAGE ( E_MSG_2 ).
    In the MESSAGE command interface, I defined rules to allow several kind of messages.
    Execution: 3 mesages found:
          * transform PR into PO
           MESSAGE     MSG_2 [1,009 sec]
             RULES  MSG_2 = XML-DATA-01
            Message  MODE  EXIT  TYPE  ID    NR
            [1]      'A'         'I'   06    456
            [2]      'A'         'W'   'ME'  080
            [3]      'A'         'E'   'ZE'  029
             TCD    ME21                 [0,545 sec N] Target sys R3 -> ZDA010A219
            S06017 Standard PO created under the number 8201075606
               Tgt System Z_A219->R3->ZDA010A219 (ZDA 010 ... HP-UX ORACLE)
               CALL TRANSACTION ME21 ME21_1 XML-DATA-01
               03 MESSAGES FROM ME21 ME21_1 XML-DATA-01
               I  06 456 Release effected with release code 00001
               W  ME  080 Delivery date: next workday is 02.05.2007
               S  06 017 Standard PO created under the number 8201075606
           ENDMESSAGE  E_MSG_2 (&TFILL = 0)
    As you can see, 3 messages are found but the &TFILL variable is still 0.
    I guess (but cannot test yet) I would manage to record those messages using SAPGUI command.
    Is there anything wrong with my script?
    My SAP_BASIS component is in version 620. I'm not using the ultimate version of eCATT (no WEBDYNPRO command, etc.). Could it be an explanation?
    Thank you in advance,
    Olivier

  • How to handle error messages in BDC background mode

    Hi experts,
      I got one problem in BDC, We are uploading data throgh BDC program,that program is calling Standard Batch Input programs,
    Now we got one requirement, i.e., In some special cases we have to send one message as a error message.I handled this in foreground but, how to handle this in background.

    Hi,
    if session is being used
    automatically the log will begenereated in the sm35 transaction
    but if call transaction is used
    put all the error messages in the applicationserver using
    open data set
    and after the exectionof the program in the background
    you have to run another progam which reads the data stroed inthe application server
    that also with open data set only...
    thanks & regards,
    Venkatesh

  • How to raise error message from PAI of oops ALV report

    Hi All,
    I have a requirement to raise error message form editable oops alv . After entering the data and then press SAVE button .
    Please help.
    Thanks in Advance

    HI SK,
    Write a Local class (Event Handeler) to handel the events. In Editable ALV once the user enter a value, CL_GUI_ALV_GRID will raise an event called DATA_CHANGED.
    1. Define and Implement a local class to handle that event.
    In the implementation of this class you need to get data from imported object to an internal table, then compare the same with the ALV output table.
    * Local Class to handler the events raised from the ALV Grid
    CLASS LCL_EVENT_HANDLER DEFINITION.
    PUBLIC SECTION.
    * Method to handel EDIT event, DATA_CHANGED of CL_GUI_ALV_GRID
      METHODS : ON_DATA_CHANGE FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                           IMPORTING ER_DATA_CHANGED.
    ENDCLASS.
    * Event handler class Implementation
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
      METHOD ON_DATA_CHANGE.
        DATA : LT_MODIFY TYPE LVC_T_MODI,
                   LS_MODIFY TYPE LVC_S_MODI.
    * Copying changed data into intenal table from Object
        LT_MODIFY = ER_DATA_CHANGED->MT_MOD_CELLS.
    * Modifying the ouptut table with the changed values
        IF LT_MODIFY[] IS NOT INITIAL.
              *Compare the ALV Output table with LT_MODIFY
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Then raise  a message on required condition in the same method.
    Note: To trigger the above method, you need to set event handler before displaying ALV (before calling method SET_TABLE_FOR_FIRST_DISPLAY)
    * Creating object for the Local event handler class
      CREATE OBJECT GR_HANDLER.
    * Set handler (call method of Event_handler) to handler Edit event
      SET HANDLER GR_HANDLER->ON_DATA_CHANGE FOR  GR_GRID.
    Regards,
    Vijay

  • How to handle error message

    I recently had to download driver as printer stopped printing - got printer to print but still receiving message:
    "Runtime Error   Program:C:\Program Files (x86)\HP]Digital Imaging]bin\HPQKYGRP/EXE     -This application has requested the Runtime to terminate in an unusual way.  Please contact the application's support team for more information.
    What do I do with this??? I am way over my head.
    Help please.

    Hello Cathyvi. I understand you are experiencing a runtime error. Could you please explain when the error occurs? Could you also provide the following information:
    1. The printer model number. If you require assistance locating this information, please reference this website: http://h10010.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=bpy21016
    2. Your operating system. If you require assistance locating this information, please reference this website: http://windows.microsoft.com/en-CA/windows/which-operating-system
    I look forward to your response.
    Mario
    I worked on behalf of HP.

  • Handle error message

    hi
    How to handle error message for following FM?
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = lv_filename
        filetype                        = 'DBF'
        write_field_separator           = 'X'
    IMPORTING
      filelength                      = lv_file_len
       TABLES
        data_tab                        = it_final
        fieldnames                      = t_header
        EXCEPTIONS
       file_write_error                = 1
       no_batch                        = 2
       gui_refuse_filetransfer         = 3
       invalid_type                    = 4
       no_authority                    = 5
       unknown_error                   = 6
       header_not_allowed              = 7
       separator_not_allowed           = 8
       filesize_not_allowed            = 9
       header_too_long                 = 10
       dp_error_create                 = 11
       dp_error_send                   = 12
       dp_error_write                  = 13
       unknown_dp_error                = 14
       access_denied                   = 15
       dp_out_of_memory                = 16
       disk_full                       = 17
       dp_timeout                      = 18
       file_not_found                  = 19
       dataprovider_exception          = 20
       control_flush_error             = 21
       OTHERS                          = 22.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Error Message:  GUI_DOWNLOAD
    GUI_DOWNLOAD - Access Denied!! Why its throwing error message?
    Control flush error in gui_download
    Error in GUI_DOWNLOAD in background processing
    Error In Gui_download
    Reward points..

  • How to Customize Error message in JXL

    Hi All,
    I want to customize error message in JXL. I.e. When we apply number validation to a cell and if you enter invalid data MS-Excel shows error message saying that "The value you entered is not valid". But I want to customize this message to "Data should be a decimal number". Can anyone help me how to acheive it. Thanks in Advance.
    Thanks
    Venkat.

    Thx alot...!! for all your valuable replies.
    And, I found a way to achieve my requirement in a declarative way.
    I just created an entity validator on EmployeeEO.
    - Rule_Type: Key Exists
    - Rule Definition:
    - Validation Target Type: Entity Object
    - Association Name : <Select Assiociation created > "EmpDeptFK"
    - Failure Handling:
    - Error Message: "Invalid Deparment ID {0} Entered. Please enter a valid Department ID."
    - Message Token for "0": Department ID
    And It fulfilled my requirement.

  • Error Message During Vista Install W/ Bootcamp

    I crashed my original vista installation, so I am trying to get it up and running again. After deleting the old partition and creating a new one with BCA in Leopard, I get this error message during vista installation
    Windows cannot install required files. The file does not exist. Make sure all files required for installation are available, and then restart installation. Error Code: 0x80070005
    I thought maybe it was My Vista DVD, so I borrowed a friends, and it did the same thing. This is on a Macbook PRO purchased a little over a month ago.
    Please HELP! I need my vista installation up and running for work!

    "but when detecting hard drives, nothing shows up in the list."
    I don't really understand that statement as without any drives showing up how were you able to even start the install?
    At any rate, during your first installment, the one that succeded, do you remember which partition it was that you Formated with the windows installer? When you use Boot Camp to partition and install the windows os, BC sets the volume name to BOOTCAMP. As far as I know this is the one that you must use for your windows os. Before you can install windows though, you must use the windows installer to format it to NTFS <----- the format type depends on a at least a few conditions, the one that I can remember is partition size. I believe 32G and above it HAS to be NTFS. But my point is, if you try and use any other partition that might come up on your list besides the one that BC made for you, it will probably error out (if you even get anywhere at all with it). Do you know FOR SURE that you chose the correct partition to format? This is the only other possibility that I can come up with at the present time.

  • Error message during cube creation

    Hi expert,
    System show the following error message during cube creation, please info how to solve this problem. Thanks.
    Define the characteristics of the validity table for non-cumulatives
    Message no. R7846
    Diagnosis
    The InfoCube contains non-cumulative values. A validity table is created for these non-cumulative values, in which the time interval is stored, for which the non-cumulative values are valid.
    The validity table automatically contains the "most detailed" of the selected time characteristics (if such a one does not exist, it must be defined by the user, meaning transfered into the InfoCube).
    Besides the most detailed time characteristic, additional characteristics for the InfoCube can be included in the validity table:
    Examples of such characteristics are:
    A "plan/actual" indicator, if differing time references exist for plan and actual values (actual values for the current fiscal year, plan values already for the next fiscal year),
    the characteristic "plant", if the non-cumulative values are reported per plant, and it can occur that a plant already exists for plant A for a particular time period, but not yet for plant B.
    Procedure
    Define all additional characteristics that should be contained in the validity table by selecting the characteristics.
    In the example above, the characteristics "plan/actual" and  "plant" must be selected.
    The system automatically generates the validity table according to the definition made. This table is automatically updated when data is loaded.

    Hi,
    Go to the Extras Tab in the definition of the Cube and there select " Maintain Non-Cumulatives" and there select the Plant check box. You can also check Material but it is not recommended. Now try to activate the cube. I think it will work for you.

  • How to handle errors in a file at sender side?

    Hi
    I have done a file to proxy scenario.
    I know how to handle errors on proxy.
    But on sender side when picking the file if one the record have worng fomat its throwing mapping error and its not processing any record..
    I wanted to process the records which have right format and data and  all remaining recrods which have wromg format should be send back to the sender as file.
    How to do this.
    How to handle error in sender file.
    Regards
    Sowmya

    Hello Sowmya,
    In your scenario Three ways you can validate the data.
    1) Before the data reaches into SAP system ie in XI system during Mapping or before mapping i,e in Adapter Module in the Sender side
    2) this option, is in the receiver applications side. ie. Validations will be taken care in the SAP system i.e in ABAP server proxy code.
    3)Through BPM, If Mapping Exception Occures then through exception Branch you can send bad formate file to sender again.
    Generally, it is prefer to more business critical validations in the Application System ie Receiver Application System (ABAP Server Proxy)
    In this, you can have more flexibility of the validations as you are validating some of the SAP payroll informations as Personal ID etc.
    Based on the complexity and flexibility of the requirement, you can either do this in the XI (if XI, ie Sender Adapter Module or Mapping) or in the ABAP proxy
    Thanks'
    Sunil Singh

  • Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets.

    Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets. then it names the file as an m4p file. Everything works beautifully on the iPad through Preview, and validates through iTunes Producer up until the attempted upload. If you've been able to accomplish this, please let me know how you prepared your audio files. Many thanks.

    Hello Fellow iBook Authors!
    Today I received the same error that you all have been discussing.  I tried selecting the DRM
    and this did not work for me, though I'm glad it did for some.  Here's what I did as a work-around. . .
    Since iBooks Author did not have a problem with Videos, I simply used one of my video programs, ScreenFlow to turn the audio into a video file m4v.  I added an image and extended the length or timing of the image to span the length of the audio file.  Then exported as an .mov.  I then opened QuickTime and opened the file and exported the file to iTunes. 
    You can use iMovie, Camtasia or any other progam that will allow you to export the audio as a movie file.  Does this make sense?  I hope this helps, at least in the short-term.
    Michael Williams

  • How to send error message to forms from Database Trigger

    Hi, Please help me to send error message to forms from Database Trigger?
    RgDs,
    Madesh.R.M

    You are correct, the On-Error trigger is a Forms trigger. However, if your Form is going to display the error generated by the database stored procedure or trigger - you might not see the database error in your Form unless you check the DBMS_ERROR_CODE in the On-Error trigger and manually display the Error Code and associated Text. I've see this happen with a co-worker. The Form she was working on was based on a table with an Before-Insert trigger. Because she was not explicitely handling the error from the Before-Insert trigger in the Forms On-Error trigger, her Form appeared to halt for no reason at all. Once she added code to the On-Error trigger in the Form to handle the DBMS_ERROR_CODE, she discovered the trigger was producing an error and was able to show the error to the user in the On-Error trigger.
    I understand the desire to keep as much as possbile in the database, but with that comes some extra coding in your Forms to handle this. This extra coding could easily be placed in a Forms Library, attached to a Form and called in the On-Error trigger. Your code could look like this:
    DECLARE
       /*This example assumes you have an Alert defined
          in your Form called: 'ERROR' */  
       al_id    ALERT;
       al_text  VARCHAR2(200);  /* Max text of a Forms Alert message*/
       al_btn   NUMBER;
    BEGIN
    IF DBMS_ERROR_CODE != 0 THEN
       /* Error code is ORA-00000 Normal Successful completion
           So only handle non-zero errors  */
       al_text := DBMS_ERROR_CODE||':'||DBMS_ERROR_TEXT;
       al_id := Find_Alert('ERROR');
       set_alert_property(al_id, alert_message_text, al_text);
       al_btn := show_alert(al_id);
    END IF;
    END;Your original question was "How to send error message to forms from Database Trigger?" The answer is you don't because Forms already gets the database error code and database message through the Forms DBMS_ERROR_CODE and DBMS_ERROR_TEXT functions. Look these up in the Forms help and it should clear things up for you.
    Craig...
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:50 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM

  • Error messages during vista startup

    Hi,
    i have strange error messages during Vista 65 loading. Everzthing going well but sistem is booting really slow.
    Don't know how explain this except some screenshoots. They are uploaded on link under.
    screenshoot1
    http://www.shock.co.ba/DSC00116.JPG
    screenshoot2
    http://www.shock.co.ba/DSC00117.JPG

    Hi dotshock,
    try this procedure http://www.lancelhoff.com/2008/09/29/unrecognized-partition-table-for-drive-80/
    Hope it helps
    Stefan

  • After upgrading to 27, firefox will not start. Saw an error message during the upgrade process.

    After upgrading to 27, firefox will not start. Saw an error message during the upgrade process but cannot remember.
    Tried to run firefox.exe -P but receive error message:
    XML Parsing error: undefined entity
    Location: chrome://mozapps/content/profile/profileSelection.xul
    Line number 18, Column 1:
    <dialog
    ^
    Running on Windows XP SP3. No problem whatsoever before upgrading to 27. Sending this from Chrome as I cannot open Firefox at all.

    Thanks jschaer2000: after starting it once in safe mode, I closed Mozilla and tried several restarts in normal mode. So far, all worked:-)
    Thank you very much again.
    Still the automatic update process bothers me: it took me several days to discover the reason to the malfunction, since when I removed the problematic version from Add and Remove Programs, I didn't pay attention at first that it was another version, not v26 which I installed from my folder.
    In addition, I like to save the installation files before I run new programs and if I didn't have v26 exe file, I couldn't have operated Mozilla at all. Not that it was fun to remove and install again each time v27 didn't react, but it was better than nothing, I still prefer Mozilla over its competition.

  • How to prevent error message for material description in MDG material detail screen, when user click on check action

    Dear Experts,
    I have a requirement for making material description as non mandetory in change request view of mdg material screen.
    I have done that using field usage in get data method of feeder classes, but still message is displaying.
    This message 'Material description is mandatory is displaying with check action only, but not with save or submit after i anhance field property as not mandetory.
    How to prevent error message for material description in MDG material detail screen, when user click on check action.
    Thanks
    Sukumar

    Hello Sukumar
    In IMG activity "Configure Properties of Change Request Step", you can completely deactivate the reuse area checks (but will then loose all other checks of the backend business logic as well).
    You can also set the error severity of the checks from Error to Warning (per CR type, not per check).
    Or you provide a default value for the material description, e.g. by implementing the BAdI USMD_RULE_SERVICE.
    Regards, Ingo Bruß

Maybe you are looking for

  • I can't install ios 6.1.6 on my iPhone 3GS

    I have an iPhone 3GS running ios version 6.1.3. I'd like to update it to get the new security patch in 6.1.6, but the only upgrade I'm being offered in settings is to 7.0.6. My understanding is that iOs 7 doesn't work on a 3GS and it will crash my ph

  • A familiar problem with a not so simple solution

    Hey all, I'm having a problem with my phone and I was hoping that someone could help me out. Now, this is a problem which I know has been posted on these boards before, but I was unable to find a solution in the threads that I've seen. The problem is

  • Stray film rolls and pics

    Hi. Was just going through my library and I have found something strange. Sorting by rolls I have roll 92 ( May 8th 2003) next roll is 420, which also says it was imported on the same date. Problem is there are pics in that roll from the same time bu

  • [SOLVED] How to install custom kernel from AUR?

    I am trying to install the custom kernel for the Acer Aspire One from AUR. What is the correct way to go about doing this? I pacman -U the .pkg.tar.gz I downloaded and it put a new kernel folder in /usr/src. Do I just copy the old .config file and ma

  • Calculating Age in BEx Query

    I want to calculate age of Order based on Order create date. I am having order create date as key figure date in Order cube. Age is calculated at runtime as (Last day of month) - Order create Date. For Example. If ORder 'A' is created in 10/01/2004 a