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

Similar Messages

  • 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

  • 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

  • Error message from Application Server

    Hi All,
    Is it possible to capture a descriptive error message from the Application server when we try to transfer a file from SAP and it does not get written to the application server.
    I know it is possible to catch the standard catchable runtime exceptions, but I also would like to know if the file transfer fails in any other conditions which do not result in runtime dumps, nevertheless I should be able to get the error message.
    Thanks in advance,

    hi,
    it is not possible to find the run time errors in application server while writing the file.using sy-subrc only we can find out. where it is writing correctly like this.
    we can see all the application server files in this Tcode: AL11

  • Add error message to application log from BADI

    Hi All,
    I am working on a BADI......
    As the txn is already adding its messges in log thru BAL_LOG_CREATE, BAL_LOG_MSG_ADD...etc......
    after that my badi comes into picture.....and it displays the message in POPUP
    Now i want to add my error message form BADI to this already created log .....
    Kindly suggest...
    Note..I tried to use BAL_LOG_MSG_ADD it got add but the display is in full screen...not in POPUP....
    CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
      EXCEPTIONS
        PROFILE_INCONSISTENT = 1
        INTERNAL_ERROR       = 2
        NO_DATA_AVAILABLE    = 3
        NO_AUTHORITY         = 4
        OTHERS               = 5.
    Thanks
    RK
    Edited by: Rahul Keshav on Sep 8, 2010 12:50 AM
    Edited by: Rahul Keshav on Sep 8, 2010 12:51 AM

    The scenario is.....
    we are in an appraisal form thru txn phap_admin...
    now for goal weightage.....there is a std check ...for entered value.....check value for multiple of 5.....
    if we enter weightage as 4 ...system will make it 5 and a std POPUP  will display stating that the value 4 has been changed....
    this is a std log....
    now i have to implement a badi HRHAP00_VAL_DET......for calculating the total weightage.....
    I have to throw an error if the total weightage is less then 100%....
    i cant use message type 'E'...in Badi...
    so i want to add my error message in the std log...so that both message comes in one log/popup only.....
    If you goto se80...and for function group HRHAP_UI_DOCUMENT....
    you can seen the subroutine...
    form f3100_popup_value_log_create
    here the std messages are adding to the log.....
    simillary i want to add my message too ..inside the badi....in the same log....
    thnx
    RK
    Edited by: Rahul Keshav on Sep 8, 2010 10:20 PM

  • ICWC: Getting messages from application log

    HI there,
    I'm trying to retrieve messages from the SAP GUI application log. Right now, the standard views do get the messages, but I have introduced a new viewset and view. These new viewsets and views do not seem to display the error messages.
    Any help is much appreciated.
    Cheers,
    J

    Hi Joshua,
        Application log messages do not appear by default in ICWC. Application developers have to add the appropriate messages in the global message container either in the GENIL implementation (where standard APIs are called) or in the UI of your custom-built views, wherever convenient.
      I hope this has given you some hints.
    Regards,
    Sudipta.

  • Email portlet 9.0.4 shows error message in application.log

    Hi,
    I deployed the email portlet 9.0.4 on 10g portal. It works for some time but since an unknown point in time it shows the following in the portlet area: "Failed to get the ImapClient instance, either you are not authenticated to use the service or session is lost. Logout from portal and login again. ".
    And in the application.log I found the following:
    04/01/05 15:51:39 email: [instance=25024_EMAIL_PORTLET_71546261, id=94025627009,3] ERROR: oracle.portal.integration.email.imap.ImapException: Failed to get the ImapClient instance, either you are not authenticated to use the service or session is lost. Logout from portal and login again.
    oracle.portal.integration.email.imap.ImapException: Failed to get the ImapClient instance, either you are not authenticated to use the service or session is lost. Logout from portal and login again.
    at oracle.portal.integration.email.impl.ImapClient.getInstance(Unknown Source)
    at htdocs.message__header._jspService(_message__header.java:65)
    at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:251)
    at oracle.portal.provider.v2.render.http.AbstractResourceRenderer.renderBody(Unknown Source)
    at oracle.portal.provider.v2.render.RenderManager.render(Unknown Source)
    at oracle.portal.provider.v2.DefaultPortletInstance.render(Unknown Source)
    at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.showPortlet(Unknown Source)
    at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.handleHttp(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at oracle.webdb.provider.v2.adapter.SOAPServlet.doHTTPCall(Unknown Source)
    at oracle.webdb.provider.v2.adapter.SOAPServlet.service(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    04/01/05 15:51:46 email: [instance=(null), id=(null)] ERROR: Request has exceeded its warning timeout Time[elapsed=1780171ms. Warning timeout=20000ms.] Request[id=(null) providerId=71546261 portletId=(null) portletName=(null) portletInstance=(null) user=PORTAL] Thread[ name=AJPRequestHandler-ApplicationServerThread-30 priority=5 alive=true interrupted=false groupName=main]
    04/01/05 15:51:48 email: [instance=(null), id=(null)] ERROR: Request has exceeded its warning timeout Time[elapsed=180699ms. Warning timeout=20000ms.] Request[id=(null) providerId=71546261 portletId=(null) portletName=(null) portletInstance=(null) user=PORTAL] Thread[ name=AJPRequestHandler-ApplicationServerThread-35 priority=5 alive=true interrupted=false groupName=main]
    04/01/05 15:51:50 email: [instance=(null), id=(null)] ERROR: Request has exceeded its warning timeout Time[elapsed=420954ms. Warning timeout=20000ms.] Request[id=(null) providerId=71546261 portletId=(null) portletName=(null) portletInstance=(null) user=PORTAL] Thread[ name=AJPRequestHandler-ApplicationServerThread-41 priority=5 alive=true interrupted=false groupName=main]
    04/01/05 15:51:52 email: [instance=(null), id=(null)] ERROR: Request has exceeded its warning timeout Time[elapsed=100902ms. Warning timeout=20000ms.] Request[id=(null) providerId=71546261 portletId=(null) portletName=(null) portletInstance=(null) user=PORTAL] Thread[ name=AJPRequestHandler-ApplicationServerThread-48 priority=5 alive=true interrupted=false groupName=main]
    The message "ERROR: Request has exceeded its warning timeout" repeats continually and frequently. The problem stops occuring after I restart the OC4J, but it occurs again after some time. Anybody encounter the same and has solution to it?
    Thanks.

    I found that Email portlet create a new SMTP connection to the SMTP server every time initSession is called(constructor of class Smtp). These increasing number of SMTP connection finally hit the limit of the SMTP server, leading to incomplete execution of initSession, which cause the problem.
    (call path: MailProviderInstance.initSession() -> MailAuthenticationModule.authenticate() -> Smtp())
    One thing to notice is that, when I test it no mail is to be sent. There should not be any open SMTP connection. Thus I wonder if it is a mistake in the program code that makes these unnecesssary SMTP connections.
    If so, would there be a new release of email portlet available?

  • How to Write Error messages to application.log file in OAS 10g.

    Hi All i am in urgent need of writing log messages to Oracle Application Server10g application.log file.
    Using JDeveloper 10.1.3.4.0.4270.
    Thanks & Regards,
    Renuka
    Edited by: Renuka on Jan 18, 2013 8:00 AM

    Zariel wrote:Boot from where? If you want the entire boot process you can use debug parameter. BUT I dont know what you will get becauseyour harddrive gets mounted during init, and during init it dumps dmesg to a log file, i guess dmesg gets its logs from minilogd which also gets started during init. The only way of doing it would be to get the kernel to log its output to ram then flush it to disk at the relevant time. Ive no idea if you can do this or not.
    I just boot normally from my hard disk, but all the messages between "INIT version 2.86 booting" and the output from /etc/issue (when login is started), is gone. It's not in /var/log/messages nor do I get it via dmsg.
    All the kernel messages BEFORE "INIT version 2.86 booting" are logged okay.

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

  • How to display Image as Error instead of Error Message from Resource Bundle

    hi,
    I want to display images as error instead of error message from Application Properties in struts1.1
    Ex:
    I want to prompt a user to type password length min. of 6 char. If failed, need to show simple image as error rather
    "Length should be min. 6".
    reagrds
    parthiban.

    BalusC wrote:
    RahulSharna wrote:
    in the respective resource bundle modify the value by something was below
    error.password.length=<img src="/images/password-Length.gif" alt="Password Length Issue" align="center"/>
    OK, it apparently allows HTML in error messages.Yes struts allows it :)

  • On starting up firefox i am getting an error message from javascript application telling me that my username is an invalid username/password combination.If i continue to get this error message,try entering my email address as my username.

    Hi,on starting firefox which i have used solely as my browser for years i am now getting an error message from java script application that shows my username followed by a message saying; 'username'-Invalid username/password combination.If you keep getting this error,try entering your email address as your username'. I then press the OK button within that error message box and it dissapears and everything seems ok although hover my cursor over the mail(envelope) icon and it says not connected.
    I only started having this problem since downloading firefox 4.It also does not tell me where this problem is occuring so i do not know where to log on with this information.I would be most grateful for any help with this matter.Many thanks.

    Take a look in the Error Console for details about that.
    Tools > Error Console <br />
    Right-click the message and use '''Copy''' to get that complete message.

  • Display error message in batch job log

    Hello
    I have a batch job running and I have an error coming during some validation logic.
    The problem is I need to continue the batch job when this error message comes and it should not cancel the batch job as it is doing currently but display that error message in batch job log, there are more similar error messages coming in job log and job gets finished, but when my error message comes job gets cancelled.
    I cannot give it as info message as it will give wrong idea about message type.
    Is there any FM by which we can add message in job log?

    Sanjeev I have done that but problem is I do not want to give that as Information message but Error message only and continue processing.
    If you see in screenshot 3rd message is given by me as information and you can see error messages also 6th and 7th and job continued till it is finished
    Basically I want that 'I' to be displayed as 'E'.
    Display error message in batch job log 

  • Error message from Adobe Reader. cannot extract the embedded font 'LICCMC+MyriadPro-Light'. some characters may not display or print correctly. Print looks like gibberish

    Trying to view/print PDF documents from website. Print looks like gibberish and is unreadable. Problem is with the embedded fonts. Error message from Adobe says cannot extract the embedded font 'LICCMC+MyriadPro-Light'. some characters may not display or print correctly.

    Try Adobe support, that's not a Firefox support issue. <br />
    http://forums.adobe.com/index.jspa

  • ADF-BC/JSF How to display acustom error message from a backing bean

    Hi all
    Can anybody provide an example of how to manipulate the list of error messages from a JSF backing bean.
    In my code I use a different navigation case and this directs the user to the page displaying the error message but I am sure that there must be a more elegant way.
    Thanks in advance
    Thanassis

    Thanks Kris
    I think you 've put me on the right track here, it's just that in my case what I really want to do is prevent my users from editing records not belonging to their own group. This is done via a selectOne table component and then the backing bean code tests if the value #{row.UserGroup} matches the #{bindings.LoggedOnUserGroup.inputValue}. If the values are equal then the beans returns the navigation case to the edit page. Otherwise it returns the navigation case for the "cannot edit" page.
    So what I am thinking is to return null and somehow raise the right kind of exception in order to display the error in the af:messages tag.
    Thanassis

  • How to display error message in front end application

    Hi Expert,
         I have one concurrent program that used to activate and deactivate the responsibilities ,
    I want that if any error occured in this program then how can I display the error message in application front end.
    Thanks in advance.

    Hi Paul,
    In the DOC_CHECK or DOC_SAVE BADI, you have a global internal table named et_messages. The structure of this table is 'bbp_smessages_badi'. You can append your error message here by inputting the message type, ID and number. The message type is either 'E' for error or 'W' for warning and the number would depend on your message class(ID). You will be able to see the error message on top of the screen, can be a red or yellow highlight depending on your appended message. I don't think creating the error message via the MESSAGE syntax will be successful, maybe this is why you are getting a runtime error.
    Regards,
    Noel

Maybe you are looking for