07-27-2006 10:42 AM
i have created a application log and put messages in that..
how we can see that application log..
thanks and regards......
07-27-2006 10:45 AM
You use BAL_LOG..... function modules ??.
If so logs can be wieved in transaction SLG1.
BR< JAcek
Message was edited by: Jacek Slowikowski
07-27-2006 10:45 AM
07-27-2006 10:49 AM
Hi Sharadha,
See BAL_LOG FMs,
And also check SLG0 & SLG1..(SLG1 is the transaction to view application logs.To add messages or create a new one, you will need to refer to the Function group SLG0.)
Regards,
Abhy
Message was edited by: Abhy Thomas
07-27-2006 12:11 PM
Hi Sharada,
Use CALL FUNCTION 'BAL_DSP_LOG_DISPLAY' to display the application log. Displaying application log can be possible in many ways, as a popup window, as normaal one ,as tree. YOu can play around with APPLICATION with these standard programs.
SBAL_DEMO_01
SBAL_DEMO_02
SBAL_DEMO_03
SBAL_DEMO_04
SBAL_DEMO_04_*
SBAL_DEMO_05
Still if you any need any more on this , let me know.
<b>Example Program</b>
****************************************************************
* create a log where all message should be added to
****************************************************************
PERFORM log_create.
***********************************************************************
* Add information that this is a check for passenger flights
***********************************************************************
* this informnation can be added as a free text
PERFORM msg_add_free_text USING text-002.
PERFORM msg_add_free_text USING text-003.
* ***********************************************************************
* display log file
***********************************************************************
PERFORM log_display.
*--------------------------------------------------------------------
* FORM LOG_CREATE
*--------------------------------------------------------------------
FORM log_create.
DATA:
l_s_log TYPE bal_s_log.
* define some header data of this log
l_s_log-extnumber = 'Application Log Demo'. "#EC NOTEXT
l_s_log-aluser = sy-uname.
l_s_log-alprog = sy-repid.
* ...
* create a log
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = l_s_log
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM.
*--------------------------------------------------------------------
* FORM MSG_ADD_FREE_TEXT
*--------------------------------------------------------------------
FORM msg_add_free_text USING value(i_text) TYPE c.
* add this message to log file
* (I_LOG_HANDLE is not specified, we want to add to the default log.
* If it does not exist we do not care =>EXCEPTIONS log_not_found = 0)
CALL FUNCTION 'BAL_LOG_MSG_ADD_FREE_TEXT'
EXPORTING
* I_LOG_HANDLE =
i_msgty = 'S'
i_text = i_text
EXCEPTIONS
LOG_NOT_FOUND = 0
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM.
*--------------------------------------------------------------------
* FORM LOG_DISPLAY
*--------------------------------------------------------------------
FORM log_display.
DATA:
l_s_display_profile TYPE bal_s_prof,
l_s_fcat TYPE bal_s_fcat.
* get a prepared profile
CALL FUNCTION 'BAL_DSP_PROFILE_POPUP_GET'
IMPORTING
e_s_display_profile = l_s_display_profile
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* show log file with modified output profile
* - we specify the display profile since we created our own
* - we do not specify any filter (like I_S_LOG_FILTER, ...,
* I_T_MSG_HANDLE) since we want to display all messages available
CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
EXPORTING
* I_S_LOG_FILTER =
* I_T_LOG_CONTEXT_FILTER =
* I_S_MSG_FILTER =
* I_T_MSG_CONTEXT_FILTER =
* I_T_LOG_HANDLE =
* I_T_MSG_HANDLE =
i_s_display_profile = l_s_display_profile
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Raghav
07-27-2006 12:48 PM
09-08-2011 10:26 AM