<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: BAL Application Log in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558883#M583420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check out the link below it might help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/bb/6811f980ae11d3966f00a0c930660b/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/bb/6811f980ae11d3966f00a0c930660b/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************&lt;STRONG&gt;please reward points if the information is helpful to you&lt;/STRONG&gt;***************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2007 12:21:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-10T12:21:34Z</dc:date>
    <item>
      <title>BAL Application Log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558881#M583418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts , &lt;/P&gt;&lt;P&gt;I am creating a module pool. &lt;/P&gt;&lt;P&gt;It is having 1st selection-screen . &lt;/P&gt;&lt;P&gt;Then based on selection i am displaying data in ALV. &lt;/P&gt;&lt;P&gt;Based on data in this ALV i have to perform certain operation such as copy/delete bom . &lt;/P&gt;&lt;P&gt;Before performing any operations , i  m supposed to check the selected row .&lt;/P&gt;&lt;P&gt;If any errors are there then i have to store in BAL application log . &lt;/P&gt;&lt;P&gt;If i click on some button then i have to display Application Log . &lt;/P&gt;&lt;P&gt;Even if somebody changes records in ALV then i have to check it ( if errors exist then save to application log ) &lt;/P&gt;&lt;P&gt;I dont want to save this log in database , only in memory . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me , i am not aware of BAL application log . &lt;/P&gt;&lt;P&gt;Please let me know if any extra objects to be created in database  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards , &lt;/P&gt;&lt;P&gt;Manoj .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 11:05:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558881#M583418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T11:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: BAL Application Log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558882#M583419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer programs SBAL_DEMO* to understand the functionality of BAL Application&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 11:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558882#M583419</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2007-07-10T11:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: BAL Application Log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558883#M583420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check out the link below it might help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/bb/6811f980ae11d3966f00a0c930660b/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/bb/6811f980ae11d3966f00a0c930660b/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************&lt;STRONG&gt;please reward points if the information is helpful to you&lt;/STRONG&gt;***************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 12:21:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558883#M583420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T12:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: BAL Application Log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558884#M583421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to the programs in the package SZAL for application log usage. There are quite comprehensive scenarios described in the programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sharat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 13:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558884#M583421</guid>
      <dc:creator>sharat_chandra</dc:creator>
      <dc:date>2007-07-10T13:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: BAL Application Log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558885#M583422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     try this&lt;/P&gt;&lt;P&gt;See BAL_&lt;STRONG&gt;LOG&lt;/STRONG&gt; FMs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at Dev class SBAL. Lots of examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. create a log instance using BAL_LOG_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. create an internal table it_messages which will have my error messages, loop through this and call BAL_LOG_MSG_ADD for each message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Then call BAL_DSP_LOG_DISPLAY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out function module APPL_LOG_DISPLAY for showing the display (as in transaction SLG1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAL_FILTER_CREATE, &lt;/P&gt;&lt;P&gt;BAL_DB_SEARCH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 13:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558885#M583422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T13:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAL Application Log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558886#M583423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Manoj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to create &amp;lt;i&amp;gt;application logs&amp;lt;/i&amp;gt; and store them you require an (application) &amp;lt;b&amp;gt;object &amp;lt;/b&amp;gt;and a &amp;lt;b&amp;gt;sub-object&amp;lt;/b&amp;gt; (transaction &amp;lt;b&amp;gt;SLG0&amp;lt;/b&amp;gt;). Please note that this is cross-client customizing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having defined your object and sub-object you can use the following sample coding in order to collect your messages and store them as application log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details please refer to my posting &amp;lt;b&amp;gt;Message Handling - Finding the Needle in the Haystack&amp;lt;/b&amp;gt; in the &amp;lt;a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki"&amp;gt;Wiki&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_MSG_HANDLER
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Message Handling using interface IF_RECA_MESSAGE_LIST
*&amp;amp;
*&amp;amp; For more details please refer to:
*&amp;amp; 
*&amp;amp;---------------------------------------------------------------------*

REPORT  zus_sdn_msg_handler.




DATA:
  gs_msg          TYPE recamsg,
  go_msglist      TYPE REF TO if_reca_message_list.


" Macro for adding freely defined messages (&amp;lt;&amp;gt; SYST messages)
DEFINE mac_build_msg.
  clear: gs_msg.
  gs_msg-msgty = &amp;amp;5.
  gs_msg-msgid = '00'.
  gs_msg-msgno = '398'.
  gs_msg-msgv1 = &amp;amp;1.
  gs_msg-msgv2 = &amp;amp;2.
  gs_msg-msgv3 = &amp;amp;3.
  gs_msg-msgv4 = &amp;amp;4.
  gs_msg-detlevel = &amp;amp;6.

  go_msglist-&amp;gt;add( is_message = gs_msg ).
END-OF-DEFINITION.



PARAMETERS:
  p_opt1   RADIOBUTTON GROUP radi DEFAULT 'X',
  p_opt2   RADIOBUTTON GROUP radi,
  p_opt3   RADIOBUTTON GROUP radi.


START-OF-SELECTION.

  " Create message handler
  CALL METHOD cf_reca_message_list=&amp;gt;create
*    EXPORTING
*      ID_OBJECT    = 'RECA'   " &amp;lt;= set your object here     (SLG0)
*      ID_SUBOBJECT = 'MISC'   " &amp;lt;= set your sub-object here (SLG0)
*      ID_EXTNUMBER =          " &amp;lt;= set your own external number
    RECEIVING
      ro_instance  = go_msglist.


  " ...Here starts your checking procedures
  mac_build_msg 'Application Log'
                 syst-uname syst-datum syst-uzeit 'I' '1'.

  mac_build_msg 'Check changes in row'
                 '1' space space 'I' '2'.  " 2nd hierarchy level

  mac_build_msg 'Value xyz removed'
                 '-&amp;gt;' 'ok' space 'I' '3'.  " 3rd hierarchy level

  mac_build_msg 'Value abc changed'
                 '-&amp;gt;' 'not ok' space 'E' '3'.

  mac_build_msg 'Value 123 modified'
                 '-&amp;gt;' 'check' space 'W' '3'.

  mac_build_msg 'Check changes in row'
                 '2' space space 'I' '2'.


  PERFORM display_log.

  EXIT.
  CALL METHOD go_msglist-&amp;gt;set_extnumber
    EXPORTING
      id_extnumber = '&amp;lt;your own external identifier'.

  CALL METHOD go_msglist-&amp;gt;store
*    EXPORTING
*      IF_IN_UPDATE_TASK = ABAP_TRUE
*    EXCEPTIONS
*      ERROR             = 1
*      others            = 2
          .
  IF sy-subrc &amp;lt;&amp;gt; 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.


END-OF-SELECTION.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_LOG
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM display_log .
* define local data
  DATA:
    ld_handle           TYPE balloghndl,
    lt_log_handles      TYPE bal_t_logh,
    ls_profile          TYPE bal_s_prof.


  " Get log handle of collected message list
  ld_handle = go_msglist-&amp;gt;get_handle( ).
  APPEND ld_handle TO lt_log_handles.


  IF ( p_opt1 = 'X' ).
    " GET a display profile which describes how to display messages
    CALL FUNCTION 'BAL_DSP_PROFILE_DETLEVEL_GET'
      IMPORTING
        e_s_display_profile = ls_profile.  " tree &amp;amp; ALV list

  ELSEIF ( p_opt2 = 'X' ).
    " GET standard profile to display one log
    CALL FUNCTION 'BAL_DSP_PROFILE_SINGLE_LOG_GET'
      IMPORTING
        e_s_display_profile = ls_profile.

  ELSE.  " p_opt3 = 'X'.
    CALL FUNCTION 'BAL_DSP_PROFILE_NO_TREE_GET'
      IMPORTING
        e_s_display_profile = ls_profile.
  ENDIF.


* set report to allow saving of variants
  ls_profile-disvariant-report = sy-repid.
*   when you use also other ALV lists in your report,
*   please specify a handle to distinguish between the display
*   variants of these different lists, e.g:
  ls_profile-disvariant-handle = 'LOG'.


  CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
    EXPORTING
      i_s_display_profile  = ls_profile
      i_t_log_handle       = lt_log_handles
    EXCEPTIONS
      profile_inconsistent = 1
      internal_error       = 2
      no_data_available    = 3
      no_authority         = 4
      OTHERS               = 5.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

ENDFORM.                    " DISPLAY_LOG
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 13:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bal-application-log/m-p/2558886#M583423</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-07-10T13:19:47Z</dc:date>
    </item>
  </channel>
</rss>

