A way to display error messages from the program

Dear all,
I am looking forward to display a set of error messages(in a internal table) during the execution of the program to the user.
I wanted to know the better way of displaying error messages from my program with more options.
Well I tried out using displaying errors as ALV list/Grid or as simple list processing.
But I found some  stanadard transactions (Like in MM and FI  where errors are shown in a better way, but failed to find out how they are done.
Please guide me.
Thanks in advance
Aryan

Try to use application logging it has a very good way to display a set of messages.
[http://abap4.tripod.com/Using_Application_Logging.html|http://abap4.tripod.com/Using_Application_Logging.html]
Run this report in se38 an example sap report to understand logging way to show a set of messages
Report Name  :  SBAL_DEMO_01
Edited by: Vighneswaran CE on Dec 19, 2010 3:01 PM
Edited by: Vighneswaran CE on Dec 19, 2010 3:11 PM

Similar Messages

  • Database Connection Error: Cannot obtain error message from the server

    I have a SQL statement that wants to add a temp table to the database.   The SQL statement works fine but when I try to add it via 'Add Command' feature in Crystal XI R2, I get the following error message:
    Database Connection Error: Cannot obtain error message from the server
    Any ideas?
    Thanks in advance,
    Zack H.

    Hi Raghavendra,
    I am using this in the 'Add Command' feature but I get the error message displayed in the subject line:
    CREATE TABLE #TibetanYaks(
    YakID char(4),
    YakName char(20) )
    INSERT INTO #TibetanYaks (YakID, YakName)
    SELECT  LastName, FirstName
    FROM      Employee
    WHERE      EmployeeID between '2000' and '3000'
    I haven't tried to add this as a stored procedure but I imagine it will work as I have no problems yet with stored procedures.  I simply want to be able to use temporary tables for the sole purpose of that session and not creating anything static in the database.
    By the way, even though I get the error message, when I look on the backend database, I see that the temporary table was successfully created...its just not brought across correctly in Crystal.
    Any ideas?
    Zack H.

  • All of a sudden my iTunes stopped working, and I get the following error messages:   1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem   and   2. iTunes was not installed correct

    All of a sudden my iTunes stopped working, and I get the following error messages:
    1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem
    and
    2. iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows error 126).
    Now I've checked the forums and followed the advice of uninstalling all Apple applications, rebooting, and reinstalling iTunes.
    This is not working. I've tried installing as Administrator but doesn't make any difference at all.
    There must be a way to fix this? I'm not a tech geek but I want to avoid having to take my laptop back to factory settings to sort this out.
    Thanks

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99192)

  • Display error messages from Stored Procedures through ODBC

    I am working on a C++ application that uses an Oracle ODBC connection. In the exception part of a stored procedure I am using dbms_output.put_line ('error message'). Is there any way to display this message in the C++ application?
    Thanks.

    There are two parts.
    The stored proc must 'throw' an exception.
    And java must catch it.
    You probably already have the java part. That is the catch(SQLException).
    As for the stored proc you can use the following search string in the jdbc forum
    raise oracle
    You need to use 'raise' in the stored proc but I am not sure of the exact form, but one of the threads using the above search string is likely to have it.

  • Error message from the source system, Caller 09 contains an error message.

    Hi,
        Guru's, i got an error massage when my process chain is running(Daily) in BIW 7.0, the error got in Data Loading from source to PSA or data targets. The errors having the below details
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.   "
    Can any body help me out of this situation what to do and how to resolv ethe problem.
    Thanks and Regards,.
    Taps....

    Caller 09 is a very common issue - please search the forums before posting....
    Arun

  • Java - Axis2: How to get an error code / error message from the Javascript via SOAP

    Hi
    In our Java applicsation we call a Javascript in a Indesign CS Server using the following code:
    --- SNIP BEGIN ---
    // calls the remote service on the indesign server
    try {
    // create service
    ServiceStub oIndsgnSrvStub = new
    ServiceStub(sIndesignServer);
    // create service parameter
    ServiceStub.RunScriptParameters
    oIndsgnSrvRSParams = new ServiceStub.RunScriptParameters();
    // create arguments with source- and target-file for parameter
    ServiceStub.IDSPScriptArg[] oIndsgnSrvSArgs = new ServiceStub.IDSPScriptArg[2];
    oIndsgnSrvSArgs[0] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[0].setName("xml-input");
    oIndsgnSrvSArgs[0].setValue(sSourceFile);
    oIndsgnSrvSArgs[1] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[1].setName("output-file");
    oIndsgnSrvSArgs[1].setValue(sTargetFile);
    // define service parameter
    oIndsgnSrvRSParams.setScriptArgs(oIndsgnSrvSArgs);
    oIndsgnSrvRSParams.setScriptFile(sScriptFile);
    oIndsgnSrvRSParams.setScriptLanguage("javascript");
    oIndsgnSrvRSParams.setScriptText("");
    // create runscript
    ServiceStub.RunScript oIndsgnSrvRS = new ServiceStub.RunScript();
    // set parameter
    oIndsgnSrvRS.setRunScriptParameters(oIndsgnSrvRSParams);
    //$$$ there should be an answer returned by the InddSrvr
    // execute SOAP call
    ServiceStub.RunScriptResult oIndsgnSrvRes = oIndsgnSrvStub.RunScript(oIndsgnSrvRS);
    if(oIndsgnSrvRes.getErrorNumber() == 0) {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_SUCCESS);
    bOK = true;
    } else {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_FAILURE);
    bOK = false;
    //$$$ should be set, if there is something returned by inddsrvr
    //oServerProdJob.setErrorMsg(sErrorMsg);
    } catch(Exception e) {
    sError += e.getMessage() + "\n";
    bOK = false;
    --- SNIP END -----
    The problem is that we don't get the error code and/or the error message from the Javascript in oIndsgnSrvRes. The error code is always 0 if I set an Integer value as return in the Javascript. If I set a String, there is an Exception in the Java application.
    Here is the Java script we use:
    --- SNIP BEGIN ---
    main();
    main()
    var sError = "";
    var sXMLInput = "";
    var sLayoutPath = "";
    // get the SDKCodeSnippetRunner object
    var cbpAdapter = app.cbpCbpadapterObject
    if (cbpAdapter) {
    sXMLInput=app.scriptArgs.get("xml-input");
    sLayoutOutputFile=app.scriptArgs.get("output-file");
    sError = cbpAdapter.doProcess(sXMLInput, sLayoutOutputFile);
    return sError; // This give an Exception; if I return an Integer the ScriptResult is always 0
    --- SNIP END -----
    If I try this with the test application from Adobe I get the error code correctly. But in the Java application, using SOAP, I can't get the error code.
    What could be wrong?
    Any ideas?
    Thanks a lot for the support.
    Kind regards
    Hans

    user11340104 wrote:
    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Well, let google be your friend,
    http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
    There are many threads I guess talking about the same issue.
    HTH
    Aman....

  • I received an error message from the hardware test (4SNS/1/40000000:TCOP-85.875). Anyone know about this?

    I received an error message from the hardware test (4SNS/1/40000000:TCOP-85.875) Anyone know anything about this? Problem is that discs will not load.

    Reset PRAM and do the hardware test.
    Reset PRAM.   http://support.apple.com/kb/PH18761
    Contact Apple.
    Genius Bar reservation
    http://www.apple.com/retail/geniusbar/
    Best.

  • Collect Error Message from SAP program to BSP Page

    Hi Experts,
    I am displaying an error message in the form of pop-up Message  in a Screen based on a condition using BADI on R/3 screen , but when i am calling the screen from Portal (BSP PAge) I am unable to see the Error Message which is being displayed as a pop-up in r/3..
    How to catch the error and display in BSP Page.....
    I have searched the forum but didnt find any suitable replies....
    Plz help
    Regards,
    Srikar

    Hi Srikar,
    It depends.
    Generally though you display a message in SAPGUI it does not display automatically in BSP.
    Some times you have to manually write some code to populate and display a message in BSP.
    First you need to find the BSP page and write some code to display error messages in the same..
    Regards,
    Sreekanth

  • Error message from originating program when clicking on weblink to open FF4

    FF4 is now my default browser on my WinXP netbook. (Instead of FF3.6.)
    If FF is not open and I click on a weblink in Outlook or other programs, FF4 opens the webpage but I also get an error message in the originating program saying the system cannot find the file. If FF4 is already open I do not get the error message. FF3.6 did not generate this error message even though it took significantly longer to open than FF4.

    Hi Srikar,
    It depends.
    Generally though you display a message in SAPGUI it does not display automatically in BSP.
    Some times you have to manually write some code to populate and display a message in BSP.
    First you need to find the BSP page and write some code to display error messages in the same..
    Regards,
    Sreekanth

  • Display error message from SLG1 on shopping cart screen

    I have implemented a 'BBP_CATALOG_TRANSFER' badi. I am adding all the custom error messages in ET_SC_MESSAGES export parameter of this badi. As a result of this, all the custom error messages added in the above parameter, gets logged in the application log SLG1 automatically and I can see those custom messages in SLG1. Now how to display this message from SLG1 on the shopping cart screen on the top where you normally see standard error messages in red.
    Can anyone please help me on this?
    Thanks,
    Krupa

    Hi
    Which SRM version are you using ?
    I have not tried this... but I think this is not possible to display error messages
    using BBP_CATALOG_TRANSFER BADI.
    <u>Try to code your logic in using BBP_DOC_CHECK_BADI for filter type - BUS2121 (shopping cart). You need to add your custom message in ET_MESSAGES [] table.</u>
    <b>For sample coding, refer to the link below -></b>
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/bbp_doc_check_badi-CheckPurchasingDocument&
    <b>Hope this will definitely help.</b>
    Do let me know.
    Regards
    - Atul

  • Is there a way to read text messages from the past in a thread that has been ongoing for months?

    Is there a way to view/recover messages from months ago in a thread that has been ongoing? The messages are not deleted. If i just keep "loading new messages" a) it will take all day, I've tried, and b) it freezes on me.

    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Both will allow you to archive your text messages to your computer and read them easily.

  • Display error message in the status bar during PBO

    Hi All,
    I want to issue an error message on a program's selection-screen.
    The thing is when I issue an error message inside PBO, all the text in the selection-screen are gone and replaced with lines.
    So i displayed the error message in the status bar.
                      MESSAGE S074(Z4) DISPLAY LIKE 'E'.
    But the problem with this is that it will allow to continue data processing.
    What shall I do in order for my error message to behave as an error message and not as a status message?

    Hi,
    Write your message in PAI same as you have done MESSAGE S074(Z4) DISPLAY LIKE 'E'.
    after this use call screen 'your screen no'.
    it will not lock the field.

  • Display error message on the user profile modification page identity system

    HI All,
    I have created a workflow for chang attribute for email id. I have associated an external action to th workflow id which will check the emailid uniqueness in OID.
    When an end user login to OAM user manager and clicks on update my profile, use can see a button with modify request beside email id. when user modifies email id and save the changes, we are able to display email id already exist message in the next page of user profile. but we need to display the message on the same page.
    Can any one help us.
    Thanks in Advance.

    You can do this using java script throwing an alert popup or you can check if the fields are initial in oninputprocessing and fill a variable like gv_error = 'Enter values of mandatory fields.' and display the same in layout using
    <phtmlb:messageBar id = "messageBar"
    type = "<%= gv_severity_str %>"
    text = "error"/>
    See this thread for more..
    How to display error messages in bsp page
    search the forum before posting a new thread....

  • Displaying error messages from application log

    Hi,
    I am using the function module RV_DELIVERY_CREATE for creating delivery in my program. If the sy-subrc is not zero i.e if delivery is not created, i have to display error messages collected inside the application.How can i do this ?
    The object nd subobject are existing in SLG0 but when i
    tried to see the object and subobject in SLG1 transaction , no logs were found.
    Do we need to activate the object and sunobject somewhere before logging can take place??
    I am using the following code in my program to display the logs but it is displaying no logs found: 
    CALL FUNCTION 'APPL_LOG_SET_OBJECT'
          EXPORTING
            object                    = 'ZCH_SCL'
            subobject                 = 'DL'
      LOG_HANDLE                = ' '
      NO_LOG                    = ' '
    EXCEPTIONS
      OBJECT_NOT_FOUND          = 1
      SUBOBJECT_NOT_FOUND       = 2
      OTHERS                    = 3
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    CALL FUNCTION 'APPL_LOG_INIT'
    EXPORTING
    OBJECT                    = 'ZCH_SCL'
       SUBOBJECT                 = 'DL'
      LOG_HANDLE                = ' '
    EXCEPTIONS
      OBJECT_NOT_FOUND          = 1
      SUBOBJECT_NOT_FOUND       = 2
      OTHERS                    = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
          PERFORM z_call_rv_delivery_create. " to call fm rv_delivery_create
          IF sy-subrc ne 0.
            CALL FUNCTION 'APPL_LOG_DISPLAY_INTERN'
      EXPORTING
        object                               = 'ZCH_SCL'
       subobject                            = 'DL'
       title_list_screen                    = 'Error Logs'
      COLUMN_SELECTION                     = '11112221122   '
      COLUMN_SELECTION_MSG_JUMP            = '1'
      EXTERNAL_NUMBER_DISPLAY_LENGTH       = 20
      I_S_DISPLAY_PROFILE                  =
    IMPORTING
      NUMBER_OF_PROTOCOLS                  =
    EXCEPTIONS
      OBJECT_NOT_FOUND                     = 1
      SUBOBJECT_NOT_FOUND                  = 2
      OTHERS                               = 3
    thanks,
    vartika

    Hi Vartika,
    you need to save that log after creating and appending to it.
    here is a code to save that log.
    If log created, save to database
      if e_bal_hndl is not initial.
        refresh: bal_hndl.
        append e_bal_hndl to bal_hndl.
        call function 'BAL_DB_SAVE'
          exporting
            i_client         = sy-mandt
           i_in_update_task = 'X'
            i_t_log_handle   = bal_hndl
          importing
            e_new_lognumbers = log_no
          exceptions
            log_not_found    = 1
            save_not_allowed = 2
            numbering_error  = 3
            others           = 4.
    u have to write this code after appending info to Log.
    hope this will help.
    regards,
    vikas

  • Internet Sales B2C - Display error message on the basket

    Hi, I am working on developments on the Internet Sales B2C scenario. I am trying to add new checks that are to be performed after the user has clicked the "Order" button on the basket.jsp page.
    I have already created the action and the BO, BOM, and Backend object and I changed the action flow so after b2c/basketcheckout.do instead of calling b2c/maintaincheckout.do the system calls my own action, and if I have an error what I am doing is calling the addMessage() on the Basket object, and then sending the action flow to b2c/basketdisplay.do.
    Everything is working fine except that the messages that I add to the basket are not shown when basket.jsp is displayed and I think this is because somewhere after the b2c/basketdisplay.do action is called and before the basket.jsp page is displayed the standard deletes any messages on the basket.
    Should I change my program so instead of calling b2c/basketdisplay.do I call a different action to display the basket but keep my messages?
    Does anyone has any better idea than what I am doing rigth now? I would gladly appreciate any help.
    The config.xml that I have looks like this:
    <action path="/b2c/basketcheckout" type="com.sapmarkets.isa.isacore.action.b2c.order.MaintainBasketB2CCheckoutAction">
                   <forward name="login" path="/b2c/login.jsp"/>
                   <forward name="basketEmpty" path="/b2c/order/basketEmpty.jsp"/>
                   <forward name="checkout" path="/b2c/basketchecktopes.do"/>
                   <forward name="ordersplit" path="/b2c/busy.jsp"/>
              </action>
              <action path="/b2c/basketchecktopes" type="com.orbitel.isa.action.CheckTopes">
                   <forward name="checkout" path="/b2c/maintainCheckout.do"/>
                   <forward name="basket" path="/b2c/basketdisplay.do"/>
              </action>
    And the coding in my action is:
    UserSessionData userSessionData = UserSessionData.getUserSessionData(request.getSession());
    BusinessObjectManager bom = (BusinessObjectManager)userSessionData. getBOM(BusinessObjectManager.ISACORE_BOM);
    SalesDocument miOrden = bom.getBasket();
    if(miResp.equals("A"))
         return mapping.findForward("checkout");
    else
         miOrden.addMessage(new Message(Message.ERROR, "system.forward.info", new String[]{"Ha superado el tope de sesion"}, null));
         return mapping.findForward("basket");
    Thanks
    Juan

    You can do this using java script throwing an alert popup or you can check if the fields are initial in oninputprocessing and fill a variable like gv_error = 'Enter values of mandatory fields.' and display the same in layout using
    <phtmlb:messageBar id = "messageBar"
    type = "<%= gv_severity_str %>"
    text = "error"/>
    See this thread for more..
    How to display error messages in bsp page
    search the forum before posting a new thread....

Maybe you are looking for