<?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 BDC log in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594516#M865504</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed a BDC and it is working fine. User wants &lt;/P&gt;&lt;P&gt;a log. After running the BDC he needs the list of all materials which has been uploaded and failed during uploading. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hav developed BDC for MM01 in Call transaction method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material                                               Status&lt;/P&gt;&lt;P&gt;123456                                                Successfull&lt;/P&gt;&lt;P&gt;54654564                                             Successfull&lt;/P&gt;&lt;P&gt;65456464                                             Failed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me in this plese.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2008 03:36:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-20T03:36:21Z</dc:date>
    <item>
      <title>BDC log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594516#M865504</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed a BDC and it is working fine. User wants &lt;/P&gt;&lt;P&gt;a log. After running the BDC he needs the list of all materials which has been uploaded and failed during uploading. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hav developed BDC for MM01 in Call transaction method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material                                               Status&lt;/P&gt;&lt;P&gt;123456                                                Successfull&lt;/P&gt;&lt;P&gt;54654564                                             Successfull&lt;/P&gt;&lt;P&gt;65456464                                             Failed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me in this plese.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 03:36:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594516#M865504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T03:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: BDC log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594517#M865505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check sy-subrc after call transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transaction&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  write:/ itab-matnr, 'successfull'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  write:/ itab-matnr, 'failed'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 03:41:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594517#M865505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T03:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: BDC log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594518#M865506</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  After CALL TRANSACTION  tcode .........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC NE 0&lt;/P&gt;&lt;P&gt;   MOVE : itab required records to one more internal table(i_errors) &lt;/P&gt;&lt;P&gt;                which is  haveing the required error  putput fields.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after all functionality of program is over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check IF NOT i_ERRORS[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   By using the WS_DOWLOAD   download your erroe file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 03:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594518#M865506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T03:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: BDC log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594519#M865507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai  &lt;STRONG&gt;Sameer&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually if there are any errors in CALL TRANSACTION we send those records to SESSION METHOD by using below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'XK01' USING&lt;/P&gt;&lt;P&gt;t_bdcdata MODE 'N' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM session_bdc.&lt;/P&gt;&lt;P&gt;ENDIF.&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;IF s_flag = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This is subroutine .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM session_bdc .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF s_flag = ' '.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;client = sy-mandt&lt;/P&gt;&lt;P&gt;group = 'vcentric'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;holddate = filler8&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep = 'X'&lt;/P&gt;&lt;P&gt;user = sy-uname&lt;/P&gt;&lt;P&gt;prog = sy-cprog.&lt;/P&gt;&lt;P&gt;s_flag = 'X'.&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;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;tcode = 'XK01'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;dynprotab = t_bdcdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " SESSION_BDC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or we can send the error records on into an flat file by using the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'XK01' USING&lt;/P&gt;&lt;P&gt;T_BDCDATA MODE 'N' MESSAGES INTO T_BDCMSG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC 0.&lt;/P&gt;&lt;P&gt;APPEND W_UPLOAD TO T_ERROR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR W_BDCMSG.&lt;/P&gt;&lt;P&gt;READ TABLE T_BDCMSG INTO W_BDCMSG INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR L_MSG.&lt;/P&gt;&lt;P&gt;CALL FUNCTION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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Eshwar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 03:49:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594519#M865507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T03:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: BDC log</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594520#M865508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank U all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U r answers are very helpfull i hav rewarded u points..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 04:19:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-log/m-p/3594520#M865508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T04:19:05Z</dc:date>
    </item>
  </channel>
</rss>

