<?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: error record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681864#M619934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mithun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &amp;lt;b&amp;gt;FORMAT_MESSAGE&amp;lt;/b&amp;gt; function module to show the error/successful messages using the CALL TRANSACTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code...&lt;/P&gt;&lt;P&gt;    CALL TRANSACTION tcode USING it_bdcdata&lt;/P&gt;&lt;P&gt;                           MODE   p_ctumod&lt;/P&gt;&lt;P&gt;                           MESSAGES INTO it_messtab.&lt;/P&gt;&lt;P&gt;  LOOP AT it_messtab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      id     = it_messtab-msgid&lt;/P&gt;&lt;P&gt;      lang   = it_messtab-msgspra&lt;/P&gt;&lt;P&gt;      no     = it_messtab-msgnr&lt;/P&gt;&lt;P&gt;      v1     = it_messtab-msgv1&lt;/P&gt;&lt;P&gt;      v2     = it_messtab-msgv2&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      msg    = v_msg&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE:/2  it_messtab.&lt;/P&gt;&lt;P&gt;    SKIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2007 12:24:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-28T12:24:07Z</dc:date>
    <item>
      <title>error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681862#M619932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to handle the errors (duplicate records) in CALL TRANSACTION METHOD and how can we show the enduser about he error record?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 12:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681862#M619932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T12:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681863#M619933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mithun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using CALL TRANSACTION you can capture the error as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_bdcmsgcoll type standard table of BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'Tcode'&lt;/P&gt;&lt;P&gt;                                  USING 'BDCDATA'&lt;/P&gt;&lt;P&gt;                                  Messages 'it_bdcmsgcoll'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here once the transaction is called and when you get the cursor back to the program, it_bdcmsgcoll will contain the error message occurred if any during the execution of transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later you can read the table it_bdcmsgcoll and display the message to the user.&lt;/P&gt;&lt;P&gt;&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 for helpful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 12:18:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681863#M619933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T12:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681864#M619934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mithun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &amp;lt;b&amp;gt;FORMAT_MESSAGE&amp;lt;/b&amp;gt; function module to show the error/successful messages using the CALL TRANSACTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code...&lt;/P&gt;&lt;P&gt;    CALL TRANSACTION tcode USING it_bdcdata&lt;/P&gt;&lt;P&gt;                           MODE   p_ctumod&lt;/P&gt;&lt;P&gt;                           MESSAGES INTO it_messtab.&lt;/P&gt;&lt;P&gt;  LOOP AT it_messtab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      id     = it_messtab-msgid&lt;/P&gt;&lt;P&gt;      lang   = it_messtab-msgspra&lt;/P&gt;&lt;P&gt;      no     = it_messtab-msgnr&lt;/P&gt;&lt;P&gt;      v1     = it_messtab-msgv1&lt;/P&gt;&lt;P&gt;      v2     = it_messtab-msgv2&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      msg    = v_msg&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE:/2  it_messtab.&lt;/P&gt;&lt;P&gt;    SKIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 12:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681864#M619934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T12:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681865#M619935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mithun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are posting lots of simple questions - I'd guess you have been given an exam or interview to complete for a job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try using the search option instead of asking all of these questions as they have all been asked and answered before, and please don't forget to credit SDN if you get an interview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 12:31:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681865#M619935</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T12:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: error record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681866#M619936</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;To Find the duplicate records use Select statement before calling the Transaction..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is the Sample code for ur Scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES LFA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM LFA1 WHERE LIFNR = ITAB-LIFNR.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM FILL_BDC_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call Transaction 'MK01' &lt;/P&gt;&lt;P&gt;    USING IT_BDCDATA&lt;/P&gt;&lt;P&gt;    MODE 'N'&lt;/P&gt;&lt;P&gt;    MESSAGES INTO IT_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Loop at IT_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;&amp;lt;&amp;lt;  Call the FM   FORMAT_MESSAGE to display the message to user...&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refresh: it_bdcdata, it_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if Helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 12:32:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-record/m-p/2681866#M619936</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-08-28T12:32:01Z</dc:date>
    </item>
  </channel>
</rss>

