Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how we can see application log

Former Member
0 Kudos

i have created a application log and put messages in that..

how we can see that application log..

thanks and regards......

6 REPLIES 6

Former Member
0 Kudos

You use BAL_LOG..... function modules ??.

If so logs can be wieved in transaction SLG1.

BR< JAcek

Message was edited by: Jacek Slowikowski

Former Member
0 Kudos

Check these tcode.

BDR1

CONV01

LLDEL

PRICATLOG

PRICAT

VI15

Former Member
0 Kudos

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

Former Member

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

0 Kudos

You can see it in slg1,

regards

Former Member