<?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: Handling errors in BDC? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528580#M241776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Session Method: No need to write any code for error handling.&lt;/P&gt;&lt;P&gt;1. Program Creates a session with the uploaded DATA.&lt;/P&gt;&lt;P&gt;2. Process Session using SM35&lt;/P&gt;&lt;P&gt;3. Error/status log created by System&lt;/P&gt;&lt;P&gt;4. Session can be reprocessed for error records&lt;/P&gt;&lt;P&gt;5. Successful records will not be recreated during re-processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL Transaction method: &lt;/P&gt;&lt;P&gt;Need to write error handling. Not very difficult &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; Check SY-SUBRC after CALL TRANSACTION 'TCODE', if SY-SUBRC &amp;lt;&amp;gt; 0, error and capture the same from table BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this make some sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Aug 2006 06:48:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-29T06:48:55Z</dc:date>
    <item>
      <title>Handling errors in BDC?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528576#M241772</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;How do handle errors in Session and call Transaction method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 06:26:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528576#M241772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T06:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Handling errors in BDC?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528577#M241773</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;  In Session method, error log will be generated by the system with the details of the error &amp;amp; the description, In call transaction this needs to be done handled explicitely using the structure BDCMSGCOLL, you can declare an internal table to trap the messages with the type BDCMSGCOLL and use fm FORMAT_MESSAGE to get it in to an internal table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the following statment,&lt;/P&gt;&lt;P&gt;Call transaction 'TCode'&lt;/P&gt;&lt;P&gt;using IT_BDCDATA&lt;/P&gt;&lt;P&gt;mode A/N/E&lt;/P&gt;&lt;P&gt;update S/A&lt;/P&gt;&lt;P&gt;messages into IT_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 06:31:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528577#M241773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T06:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Handling errors in BDC?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528578#M241774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Session method. &lt;/P&gt;&lt;P&gt;1) synchronous processing. &lt;/P&gt;&lt;P&gt;2) can tranfer large amount of data. &lt;/P&gt;&lt;P&gt;3) processing is slower. &lt;/P&gt;&lt;P&gt;4) error log is created &lt;/P&gt;&lt;P&gt;5) data is not updated until session is processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call transaction. &lt;/P&gt;&lt;P&gt;1) asynchronous processing &lt;/P&gt;&lt;P&gt;2) can transfer small amount of data &lt;/P&gt;&lt;P&gt;3) processing is faster. &lt;/P&gt;&lt;P&gt;4) errors need to be handled explicitly &lt;/P&gt;&lt;P&gt;5) data is updated automatically &lt;/P&gt;&lt;P&gt;Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3.   BDC is not a typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is &lt;/P&gt;&lt;P&gt;not bi-directional.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC works on the principle of simulating user input for transactional screen, via an ABAP program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typically the input comes in the form of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &amp;#145;Call Transaction&amp;#146;, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.  It can also be used for real-time interfaces and custom error handling &amp;amp; logging features. Whereas in &lt;/P&gt;&lt;P&gt;Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Batch Input (BI) programs still use the classical BDC approach but doesn&amp;#146;t require an ABAP program to be written to format the BDCDATA. The user has to format the data using predefined structures and store it in a flat file. The BI program then reads this and invokes the transaction mentioned in the header record of the file.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are not available for all application areas.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION-&amp;gt;&lt;/P&gt;&lt;P&gt;The BDCMSGCOLL does not have the messages text. It has only the message type, number and message parameters. &lt;/P&gt;&lt;P&gt;You have to read the message text.  (recall that the database table T100 stores all the messages.) &lt;/P&gt;&lt;P&gt;There are more than one method of doing this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is the psuedocode for one of the methods. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;LOOP for the internal table IT1 which has data value from flat file. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;call transcation using.... &lt;/P&gt;&lt;P&gt;if SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Read the dictionary table T100 FOR ALL ENTRIES in BDCMSGCOLL. &lt;/P&gt;&lt;P&gt;(also use the condition T100-SPRAS  =  SY-LANGU (the log on language. This is because you need only the message texts in English if the user is logged in English language) &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;IF message type is E , then, transfer the contents of this particular error record to file x. (TRANSFER......) &lt;/P&gt;&lt;P&gt;( Ignore all other messages. Only consider type 'E' messages. Ignore other types of messages.) &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;(You can also store the message text from T100 and the error record in another internal table IT2) &lt;/P&gt;&lt;P&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;&lt;A href="http://www.sap-img.com/abap/question-about-bdc-program.htm" target="test_blank"&gt;http://www.sap-img.com/abap/question-about-bdc-program.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 06:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528578#M241774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T06:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Handling errors in BDC?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528579#M241775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in session method..&lt;/P&gt;&lt;P&gt;system maintains implicit error log..u need not to main tain any thing for this&lt;/P&gt;&lt;P&gt;if u want to see forst&lt;/P&gt;&lt;P&gt;execute ur bdc with session name any in SM35.&lt;/P&gt;&lt;P&gt;after that select session name and click on error log on application bar.u can fid out all error relevent to ur seseion name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in call transaction..&lt;/P&gt;&lt;P&gt;u have to maintain explicit error..for this&lt;/P&gt;&lt;P&gt;define a internal table with include structure BDCMSGCOLL...&lt;/P&gt;&lt;P&gt;mention this internal table in ur call transaction command like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transaction 'xk01' using '&amp;lt;BDCDATA table name&amp;gt;' messages into &amp;lt;BDCMSGCOLL table name&amp;gt; \&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think tshis will help u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 06:41:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528579#M241775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T06:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Handling errors in BDC?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528580#M241776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Session Method: No need to write any code for error handling.&lt;/P&gt;&lt;P&gt;1. Program Creates a session with the uploaded DATA.&lt;/P&gt;&lt;P&gt;2. Process Session using SM35&lt;/P&gt;&lt;P&gt;3. Error/status log created by System&lt;/P&gt;&lt;P&gt;4. Session can be reprocessed for error records&lt;/P&gt;&lt;P&gt;5. Successful records will not be recreated during re-processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL Transaction method: &lt;/P&gt;&lt;P&gt;Need to write error handling. Not very difficult &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; Check SY-SUBRC after CALL TRANSACTION 'TCODE', if SY-SUBRC &amp;lt;&amp;gt; 0, error and capture the same from table BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this make some sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 06:48:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-errors-in-bdc/m-p/1528580#M241776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T06:48:55Z</dc:date>
    </item>
  </channel>
</rss>

