<?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 Application log in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-log/m-p/2135395#M449206</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;is it possible to add a whole internal table to application log by one command ? ( a function /method call ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Apr 2007 12:51:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-13T12:51:10Z</dc:date>
    <item>
      <title>Application log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-log/m-p/2135395#M449206</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;is it possible to add a whole internal table to application log by one command ? ( a function /method call ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 12:51:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-log/m-p/2135395#M449206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T12:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Application log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-log/m-p/2135396#M449207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes we can add the whole data into application log..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Application Log data save option
        c_save_all_log_data    TYPE c VALUE 'X',
        l_subrc(6)  TYPE c,
        l_text(200),
        l_pernr(8).

  IF g_log_call = 1.
    g_bal_log-extnumber = 'IT15 BDC Error log!'.
    g_bal_log-aluser    = sy-uname.
    g_bal_log-alprog    = sy-repid.

* Create a Application log
    CALL FUNCTION 'BAL_LOG_CREATE'
      EXPORTING
        i_s_log                 = g_bal_log
      IMPORTING
        e_log_handle            = g_log_handle
      EXCEPTIONS
        log_header_inconsistent = 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.
  ENDIF.

loop at g_return.
  g_log_mess-msgty     = g_return-type.
  g_log_mess-msgid     = g_return-id.
  g_log_mess-msgno     = g_return-number.
  g_log_mess-msgv1     = g_return-message.
  g_log_mess-msgv2     = g_return-message_v1.
  g_log_mess-msgv3     = g_return-message_v2.
  g_log_mess-msgv4     = g_return-message_v3.
  g_log_mess-probclass = 'Error Class'.
appemd g_log_mess.
endloop.

* add this message to log file
  CALL FUNCTION 'BAL_LOG_MSG_ADD'                           "#EC *
    EXPORTING
      i_s_msg       = g_log_mess
    EXCEPTIONS
      log_not_found = 0
      OTHERS        = 1.



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 12:53:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-log/m-p/2135396#M449207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T12:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Application log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-log/m-p/2135397#M449208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marian, you probably noticed that sample code Abhay provided does not work. The parameter i_s_msg in function module BAL_LOG_MSG_ADD is a flat structure - not a table. Abhay's sample may work, but only for the table header - in case the internal table has been defined with addition 'WITH HEADER LINE'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I cannot provide a solution to your ultimate question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br: Kimmo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-log/m-p/2135397#M449208</guid>
      <dc:creator>Kimmo_from_Finland</dc:creator>
      <dc:date>2007-06-25T09:51:42Z</dc:date>
    </item>
  </channel>
</rss>

