<?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 regarding call transaction and session method??? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155908#M455510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cud u pls let me know &lt;/P&gt;&lt;P&gt;1. differences between call transaction and session???&lt;/P&gt;&lt;P&gt;2. Is it possible to schedule call transaction in background?? ( all are saying MODE N = background scheduling  in call transaction.......but i dont think so)&lt;/P&gt;&lt;P&gt;3. Is it posible to handle multiple transactions in call transaction ? if so,how?&lt;/P&gt;&lt;P&gt;4. Is it posible to handle multiple transactions in session ? if so,how?&lt;/P&gt;&lt;P&gt;5. How can we see the log in session method????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Apr 2007 13:33:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-08T13:33:05Z</dc:date>
    <item>
      <title>regarding call transaction and session method???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155908#M455510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cud u pls let me know &lt;/P&gt;&lt;P&gt;1. differences between call transaction and session???&lt;/P&gt;&lt;P&gt;2. Is it possible to schedule call transaction in background?? ( all are saying MODE N = background scheduling  in call transaction.......but i dont think so)&lt;/P&gt;&lt;P&gt;3. Is it posible to handle multiple transactions in call transaction ? if so,how?&lt;/P&gt;&lt;P&gt;4. Is it posible to handle multiple transactions in session ? if so,how?&lt;/P&gt;&lt;P&gt;5. How can we see the log in session method????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Apr 2007 13:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155908#M455510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-08T13:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: regarding call transaction and session method???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155909#M455511</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;==&amp;gt;2)U cannot schedule a Call transaction in background.. but u can execute it in background immediately by giving mode as N .. ( u cannot schedule this Call transaction to get executed after some time may be after 20 mins or tomorrow or regularly -- i.e scheduling  )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt;3) No.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt;4) Yes . Use two BDC_INSERT Fms instead of One .. One fm with one Tcode and second with some other tcode..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt;5) Go to SM35 transaction .. here u can find the sessions and their details and the log for the processed transactions..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt;1) Here are the differences..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;CALL TRANSACTION USING :&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;With this method the system processes the data more quickly than with batch input sessions. Unlike batch input sessions, CALL TRANSACTION USING does not automatically support interactive correction or logging functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program prepares the data and then calls the corresponding transaction that is then processed immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;The most important features of CALL TRANSACTION USING are:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;Synchronous processing &lt;/P&gt;&lt;P&gt;&amp;gt;Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called &lt;/P&gt;&lt;P&gt;&amp;gt;You can update the database both synchronously and asynchronously&lt;/P&gt;&lt;P&gt;&amp;gt;The program specifies the update type&lt;/P&gt;&lt;P&gt;&amp;gt;Separate LUW (logical units of work) for the transaction&lt;/P&gt;&lt;P&gt;The system executes a database commit immediately before and after the CALL TRANSACTION USING statement &lt;/P&gt;&lt;P&gt;&amp;gt;No batch input processing log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Session Method :&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offers management of sessions, support for playing back and correcting sessions that contain errors, and detailed logging. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program prepares the data and stores it in a batch input session. A session is a collection of transaction data for one or more transactions. Batch input sessions are maintained by the system in the batch input queue. You can process batch input sessions in the background processing system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program must open a session in the queue before transferring data to it, and must close it again afterwards. All of these operations are performed by making function module calls from the ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most important aspects of the session interface are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;Asynchronous processing &lt;/P&gt;&lt;P&gt;&amp;gt;Transfers data for multiple transactions &lt;/P&gt;&lt;P&gt;&amp;gt;Synchronous database update&lt;/P&gt;&lt;P&gt;&amp;gt;During processing, no transaction is started until the previous transaction has been written to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;A batch input processing log is generated for each session &lt;/P&gt;&lt;P&gt;&amp;gt;Sessions cannot be generated in parallel&lt;/P&gt;&lt;P&gt;&amp;gt;The batch input program must not open a session until it has closed the preceding session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;**Plz do remember to close your thread, when ur problem is solved !!&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;regards,&lt;/P&gt;&lt;P&gt;sai ramesh &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Apr 2007 13:41:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155909#M455511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-08T13:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: regarding call transaction and session method???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155910#M455512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi abc,&lt;/P&gt;&lt;P&gt;   Differences between call transaction and session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Session Method:&lt;/P&gt;&lt;P&gt;1) Data is not updated in the database table until the session is processed.&lt;/P&gt;&lt;P&gt;2) No sy-subrc is returned.&lt;/P&gt;&lt;P&gt;3) Error log is created for error records.&lt;/P&gt;&lt;P&gt;4) Updation is always synchronous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Transaction Method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Immediate updation in the database table.&lt;/P&gt;&lt;P&gt;2) sy-subrc is returned.&lt;/P&gt;&lt;P&gt;3)Error need to be handled explicitly.&lt;/P&gt;&lt;P&gt;4) updation can be synchronous as well as asynchronous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) ya u can use using the N mode no screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)u can't handle multiple transaction in call transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) u can handle multiple transaction in session using the BDC_INSERT fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5)When u go to SM35 u can able to see the error records.&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;Arun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Apr 2007 18:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155910#M455512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-08T18:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: regarding call transaction and session method???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155911#M455513</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;Check these links..Reward All the helpfull answers...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://myweb.dal.ca/hchinni/sap/bdc_home.htm" target="test_blank"&gt;http://myweb.dal.ca/hchinni/sap/bdc_home.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/learning-bdc-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/learning-bdc-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdchome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdchome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/learning-bdc-" target="test_blank"&gt;http://www.sap-img.com/abap/learning-bdc-&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html" target="test_blank"&gt;http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 03:54:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155911#M455513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T03:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: regarding call transaction and session method???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155912#M455514</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;Check this documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About Session method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this method you transfer data from internal table to database table through sessions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless session is processed, the data is not transferred to database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_OPEN_GROUP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You create the session through program by BDC_OPEN_GROUP function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters to this function are: &lt;/P&gt;&lt;P&gt;&amp;#149; User Name: User name &lt;/P&gt;&lt;P&gt;&amp;#149; Group: Name of the session&lt;/P&gt;&lt;P&gt;&amp;#149; Lock Date: The date on which you want to process the session.&lt;/P&gt;&lt;P&gt;&amp;#149; Keep: This parameter is passed as &amp;#145;X&amp;#146; when you want to retain session after&lt;/P&gt;&lt;P&gt;processing it or &amp;#145; &amp;#145; to delete it after processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_INSERT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function creates the session &amp;amp; data is transferred to Session.&lt;/P&gt;&lt;P&gt;Parameters to this function are:&lt;/P&gt;&lt;P&gt;&amp;#149; Tcode: Transaction Name &lt;/P&gt;&lt;P&gt;&amp;#149; Dynprotab: BDC Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_CLOSE_GROUP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function closes the BDC Group. No Parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some additional information for session processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call transaction &amp;lt;tcode&amp;gt; using &amp;lt;BDCTAB&amp;gt;&lt;/P&gt;&lt;P&gt;Mode &amp;lt;A/N/E&amp;gt;&lt;/P&gt;&lt;P&gt;Update &amp;lt;S/A&amp;gt;&lt;/P&gt;&lt;P&gt;Messages into &amp;lt;MSGTAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 1 is transaction code.&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 2 is name of BDCTAB table.&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 3 here you are specifying mode in which you execute transaction&lt;/P&gt;&lt;P&gt;A is all screen mode. All the screen of transaction are displayed.&lt;/P&gt;&lt;P&gt;N is no screen mode. No screen is displayed when you execute the transaction.&lt;/P&gt;&lt;P&gt;E is error screen. Only those screens are displayed wherein you have error record.&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 4 here you are specifying update type by which database table is updated.&lt;/P&gt;&lt;P&gt;S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.&lt;/P&gt;&lt;P&gt;A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Tcode: Transaction code&lt;/P&gt;&lt;P&gt;2. Dyname: Batch point module name&lt;/P&gt;&lt;P&gt;3. Dynumb: Batch input Dyn number&lt;/P&gt;&lt;P&gt;4. Msgtyp: Batch input message type (A/E/W/I/S)&lt;/P&gt;&lt;P&gt;5. Msgspra: Batch input Lang, id of message&lt;/P&gt;&lt;P&gt;6. Msgid: Message id&lt;/P&gt;&lt;P&gt;7. MsgvN: Message variables (N = 1 - 4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps for CALL TRANSACTION method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Internal table for the data (structure similar to your local file)&lt;/P&gt;&lt;P&gt;2. BDCTAB like BDCDATA&lt;/P&gt;&lt;P&gt;3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)&lt;/P&gt;&lt;P&gt;4. Loop at itab.&lt;/P&gt;&lt;P&gt;Populate BDCTAB table.&lt;/P&gt;&lt;P&gt;Call transaction &amp;lt;tcode&amp;gt; using &amp;lt;BDCTAB&amp;gt;&lt;/P&gt;&lt;P&gt;Mode &amp;lt;A/N/E&amp;gt;&lt;/P&gt;&lt;P&gt;Update &amp;lt;S/A&amp;gt;.&lt;/P&gt;&lt;P&gt;Refresh BDCTAB.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(To populate BDCTAB, You need to transfer each and every field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The major differences between Session method and Call transaction are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SESSION METHOD CALL TRANSACTION&lt;/P&gt;&lt;P&gt;1. Data is not updated in database table unless Session is processed. Immediate updation in database table.&lt;/P&gt;&lt;P&gt;2. No sy-subrc is returned. Sy-subrc is returned.&lt;/P&gt;&lt;P&gt;3. Error log is created for error records. Errors need to be handled explicitly &lt;/P&gt;&lt;P&gt;4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error Handling in CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps for the error handling in CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Internal table for the data (structure similar to your local file)&lt;/P&gt;&lt;P&gt;2. BDCTAB like BDCDATA&lt;/P&gt;&lt;P&gt;3. Internal table BDCMSG like BDCMSGCOLL&lt;/P&gt;&lt;P&gt;4. Internal table similar to Ist internal table&lt;/P&gt;&lt;P&gt;(Third and fourth steps are for error handling)&lt;/P&gt;&lt;P&gt;5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)&lt;/P&gt;&lt;P&gt;6. Loop at itab.&lt;/P&gt;&lt;P&gt;Populate BDCTAB table.&lt;/P&gt;&lt;P&gt;Call transaction &amp;lt;tr.code&amp;gt; using &amp;lt;Bdctab&amp;gt;&lt;/P&gt;&lt;P&gt;Mode &amp;lt;A/N/E&amp;gt;&lt;/P&gt;&lt;P&gt;Update &amp;lt;S/A&amp;gt;&lt;/P&gt;&lt;P&gt;Messages &amp;lt;BDCMSG&amp;gt;.&lt;/P&gt;&lt;P&gt;Perform check.&lt;/P&gt;&lt;P&gt;Refresh BDCTAB.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;7 Form check.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0. (Call transaction returns the sy-subrc if updating is not successful).&lt;/P&gt;&lt;P&gt;Call function Format_message.&lt;/P&gt;&lt;P&gt;(This function is called to store the message given by system and to display it along with record)&lt;/P&gt;&lt;P&gt;Append itab2.&lt;/P&gt;&lt;P&gt;Display the record and message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this program for session method using multiple transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have one BDC_OPEN_GROUP, multiple BDC_INSERT s and one BDC_CLOSE_GROUP.&lt;/P&gt;&lt;P&gt;You should have multiple BDC_INSERT s for multiple transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function BDC_OPENGROUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build BDC data and cal lBDC_INSERT for transaction 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build BDC data and cal lBDC_INSERT for transaction 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build BDC data and cal lBDC_INSERT for transaction 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function BDC_CLOSE_GROUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this sample program&lt;/P&gt;&lt;P&gt;REPORT  ztest_report&lt;/P&gt;&lt;P&gt; NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;                        LINE-SIZE 255&lt;/P&gt;&lt;P&gt;                        MESSAGE-ID ZRASH.&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;                Internal Table Declarations                          *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*--Internal Table for Data Uploading.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_FFCUST OCCURS 0,&lt;/P&gt;&lt;P&gt;         KUNNR(10),&lt;/P&gt;&lt;P&gt;         BUKRS(4),&lt;/P&gt;&lt;P&gt;         KTOKD(4),&lt;/P&gt;&lt;P&gt;         ANRED(15),&lt;/P&gt;&lt;P&gt;         NAME1(35),&lt;/P&gt;&lt;P&gt;         SORTL(10),&lt;/P&gt;&lt;P&gt;         STRAS(35),&lt;/P&gt;&lt;P&gt;         ORT01(35),&lt;/P&gt;&lt;P&gt;         PSTLZ(10),&lt;/P&gt;&lt;P&gt;         LAND1(3),&lt;/P&gt;&lt;P&gt;         SPRAS(2),&lt;/P&gt;&lt;P&gt;         AKONT(10),&lt;/P&gt;&lt;P&gt;       END OF IT_FFCUST.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Internal Table to Store Error Records.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_ERRCUST OCCURS 0,&lt;/P&gt;&lt;P&gt;         KUNNR(10),&lt;/P&gt;&lt;P&gt;         EMSG(255),&lt;/P&gt;&lt;P&gt;       END OF IT_ERRCUST.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Internal Table to Store Successful Records.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_SUCCUST OCCURS 0,&lt;/P&gt;&lt;P&gt;         KUNNR(10),&lt;/P&gt;&lt;P&gt;         SMSG(255),&lt;/P&gt;&lt;P&gt;       END OF IT_SUCCUST.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Internal Table for Storing the BDC data.&lt;/P&gt;&lt;P&gt;DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Internal Table for storing the messages.&lt;/P&gt;&lt;P&gt;DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA : V_FLAG1(1) VALUE ' ',&lt;/P&gt;&lt;P&gt;"Flag used for opening session.&lt;/P&gt;&lt;P&gt;       V_TLINES LIKE SY-TABIX,&lt;/P&gt;&lt;P&gt;       "For storing total records processed.&lt;/P&gt;&lt;P&gt;       V_ELINES LIKE SY-TABIX,&lt;/P&gt;&lt;P&gt;       "For storing the no of error records.&lt;/P&gt;&lt;P&gt;       V_SLINES LIKE SY-TABIX.&lt;/P&gt;&lt;P&gt;       "For storing the no of success records.&lt;/P&gt;&lt;P&gt; &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;         Selection screen                                            *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1.&lt;/P&gt;&lt;P&gt;PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,&lt;/P&gt;&lt;P&gt;             V_SESNAM  LIKE RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&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;         Start-of-selection                                          *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*-- Form to upload flatfile data into the internal table.&lt;/P&gt;&lt;P&gt;  PERFORM FORM_UPLOADFF.&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;       TOP-OF-PAGE                                                   *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;  WRITE:/ 'Details of the error and success records for the transaction'&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;  ULINE.&lt;/P&gt;&lt;P&gt;  SKIP.&lt;/P&gt;&lt;P&gt; &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;         End of Selection                                            *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*-- Form to Generate a BDC from the Uploaded Internal table&lt;/P&gt;&lt;P&gt;  PERFORM FORM_BDCGENERATE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--To write the totals and the session name.&lt;/P&gt;&lt;P&gt;  PERFORM FORM_WRITEOP.&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;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  form_uploadff&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Form to upload flatfile data into the internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_UPLOADFF .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Variable to change the type of the parameter file name.&lt;/P&gt;&lt;P&gt;  DATA : LV_FILE TYPE STRING.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LV_FILE = V_FNAME.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Function to upload the flat file to the internal table.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME                      =  LV_FILE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILETYPE                      = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      HAS_FIELD_SEPARATOR           = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DAT_MODE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DATA_TAB                      = IT_FFCUST&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;P&gt;      FILE_READ_ERROR               = 2&lt;/P&gt;&lt;P&gt;      NO_BATCH                      = 3&lt;/P&gt;&lt;P&gt;      GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;P&gt;      INVALID_TYPE                  = 5&lt;/P&gt;&lt;P&gt;      NO_AUTHORITY                  = 6&lt;/P&gt;&lt;P&gt;      UNKNOWN_ERROR                 = 7&lt;/P&gt;&lt;P&gt;      BAD_DATA_FORMAT               = 8&lt;/P&gt;&lt;P&gt;      HEADER_NOT_ALLOWED            = 9&lt;/P&gt;&lt;P&gt;      SEPARATOR_NOT_ALLOWED         = 10&lt;/P&gt;&lt;P&gt;      HEADER_TOO_LONG               = 11&lt;/P&gt;&lt;P&gt;      UNKNOWN_DP_ERROR              = 12&lt;/P&gt;&lt;P&gt;      ACCESS_DENIED                 = 13&lt;/P&gt;&lt;P&gt;      DP_OUT_OF_MEMORY              = 14&lt;/P&gt;&lt;P&gt;      DISK_FULL                     = 15&lt;/P&gt;&lt;P&gt;      DP_TIMEOUT                    = 16&lt;/P&gt;&lt;P&gt;      OTHERS                        = 17&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;*--Deleting the headings from the internal table.&lt;/P&gt;&lt;P&gt;    DELETE IT_FFCUST INDEX 1.&lt;/P&gt;&lt;P&gt;*--Getting the total number of records uploaded.&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE IT_FFCUST LINES V_TLINES.&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; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " form_uploadff&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  Form_bdcgenerate&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Form to Generate a BDC from the Uploaded Internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_BDCGENERATE .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Generating the BDC table for the fields of the internal table.&lt;/P&gt;&lt;P&gt;  LOOP AT IT_FFCUST.&lt;/P&gt;&lt;P&gt;    PERFORM POPULATEBDC USING :&lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0105',&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '/00' ,&lt;/P&gt;&lt;P&gt;                                ' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,&lt;/P&gt;&lt;P&gt;                                ' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,&lt;/P&gt;&lt;P&gt;                                ' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,&lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0110' ,&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '/00',&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-ANRED'  IT_FFCUST-ANRED,&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-NAME1' IT_FFCUST-NAME1,&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-SORTL'  IT_FFCUST-SORTL,&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-STRAS' IT_FFCUST-STRAS,&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-ORT01' IT_FFCUST-ORT01,&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-LAND1' IT_FFCUST-LAND1,&lt;/P&gt;&lt;P&gt;                                ' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMFO2D' '0120',	&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '/00',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0125',	&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '/00',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0130',	&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '=ENTR',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0340',	&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '=ENTR',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0360',&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '=ENTR',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0210',	&lt;/P&gt;&lt;P&gt;                                ' ' 'KNB1-AKONT'  IT_FFCUST-AKONT,&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '/00',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0215',&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '/00',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0220',	&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '/00',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                'X' 'SAPMF02D' '0230',	&lt;/P&gt;&lt;P&gt;                                ' ' 'BDC_OKCODE'  '=UPDA'.&lt;/P&gt;&lt;P&gt;*--Calling the transaction 'fd01'.&lt;/P&gt;&lt;P&gt;    CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'&lt;/P&gt;&lt;P&gt;    MESSAGES INTO IT_CUSTMSG.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--Populating the error records internal table.&lt;/P&gt;&lt;P&gt;      IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.&lt;/P&gt;&lt;P&gt;      APPEND IT_ERRCUST.&lt;/P&gt;&lt;P&gt;      CLEAR IT_ERRCUST.&lt;/P&gt;&lt;P&gt;*--Opening a session if there is an error record.&lt;/P&gt;&lt;P&gt;      IF V_FLAG1 = ' '.&lt;/P&gt;&lt;P&gt;        PERFORM FORM_OPENSESSION.&lt;/P&gt;&lt;P&gt;        V_FLAG1 = 'X'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*--Inserting the error records into already open session.&lt;/P&gt;&lt;P&gt;      IF V_FLAG1 = 'X'.&lt;/P&gt;&lt;P&gt;        PERFORM FORM_INSERT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*--Populating the Success records internal table.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.&lt;/P&gt;&lt;P&gt;      APPEND IT_SUCCUST.&lt;/P&gt;&lt;P&gt;      CLEAR IT_SUCCUST.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;*--Displaying the messages.&lt;/P&gt;&lt;P&gt;    IF NOT IT_CUSTMSG[] IS INITIAL.&lt;/P&gt;&lt;P&gt;      PERFORM FORM_FORMATMSG.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;*--Clearing the message and bdc tables.&lt;/P&gt;&lt;P&gt;    CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Getting the total no of error records.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Getting the total no of successful records.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Closing the session only if it is open.&lt;/P&gt;&lt;P&gt;  IF V_FLAG1 = 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM FORM_CLOSESESS.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " Form_bdcgenerate&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  populatebdc&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FOrm to Populate the BDC table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM POPULATEBDC  USING    VALUE(P_0178)&lt;/P&gt;&lt;P&gt;                           VALUE(P_0179)&lt;/P&gt;&lt;P&gt;                           VALUE(P_0180).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  IF P_0178 = 'X'.&lt;/P&gt;&lt;P&gt;    IT_CUSTBDC-PROGRAM = P_0179.&lt;/P&gt;&lt;P&gt;    IT_CUSTBDC-DYNPRO = P_0180.&lt;/P&gt;&lt;P&gt;    IT_CUSTBDC-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    IT_CUSTBDC-FNAM = P_0179.&lt;/P&gt;&lt;P&gt;    IT_CUSTBDC-FVAL = P_0180.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  APPEND IT_CUSTBDC.&lt;/P&gt;&lt;P&gt;  CLEAR IT_CUSTBDC.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " populatebdc&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  FORM_OPENSESSION&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Form to Open a session.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_OPENSESSION .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Variable to convert the given session name into reqd type.&lt;/P&gt;&lt;P&gt;  DATA : LV_SESNAM(12).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LV_SESNAM = V_SESNAM.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Opening a session.&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                     = LV_SESNAM&lt;/P&gt;&lt;P&gt;     HOLDDATE                  = '20040805'&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   QID                       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     CLIENT_INVALID            = 1&lt;/P&gt;&lt;P&gt;     DESTINATION_INVALID       = 2&lt;/P&gt;&lt;P&gt;     GROUP_INVALID             = 3&lt;/P&gt;&lt;P&gt;     GROUP_IS_LOCKED           = 4&lt;/P&gt;&lt;P&gt;     HOLDDATE_INVALID          = 5&lt;/P&gt;&lt;P&gt;     INTERNAL_ERROR            = 6&lt;/P&gt;&lt;P&gt;     QUEUE_ERROR               = 7&lt;/P&gt;&lt;P&gt;     RUNNING                   = 8&lt;/P&gt;&lt;P&gt;     SYSTEM_LOCK_ERROR         = 9&lt;/P&gt;&lt;P&gt;     USER_INVALID              = 10&lt;/P&gt;&lt;P&gt;     OTHERS                    = 11&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Session not open'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " FORM_OPENSESSION&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  FORM_INSERT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      fORM TO INSERT ERROR RECOED INTO A SESSION.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_INSERT .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Inserting the record into session.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      TCODE                  = 'FD01'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    POST_LOCAL             = NOVBLOCAL&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PRINTING               = NOPRINT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    SIMUBATCH              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CTUPARAMS              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DYNPROTAB              = IT_CUSTBDC&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      INTERNAL_ERROR         = 1&lt;/P&gt;&lt;P&gt;      NOT_OPEN               = 2&lt;/P&gt;&lt;P&gt;      QUEUE_ERROR            = 3&lt;/P&gt;&lt;P&gt;      TCODE_INVALID          = 4&lt;/P&gt;&lt;P&gt;      PRINTING_INVALID       = 5&lt;/P&gt;&lt;P&gt;      POSTING_INVALID        = 6&lt;/P&gt;&lt;P&gt;      OTHERS                 = 7&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Unable to insert the record'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " FORM_INSERT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  FORM_CLOSESESS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Form to Close the Open Session.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_CLOSESESS .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BDC_CLOSE_GROUP'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      NOT_OPEN    = 1&lt;/P&gt;&lt;P&gt;      QUEUE_ERROR = 2&lt;/P&gt;&lt;P&gt;      OTHERS      = 3.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " FORM_CLOSESESS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  FORM_FORMATMSG&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Form to format messages.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_FORMATMSG .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*--Var to store the formatted msg.&lt;/P&gt;&lt;P&gt;  DATA : LV_MSG(255).&lt;/P&gt;&lt;P&gt; &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        = SY-MSGID&lt;/P&gt;&lt;P&gt;      LANG      = SY-LANGU&lt;/P&gt;&lt;P&gt;      NO        = SY-MSGNO&lt;/P&gt;&lt;P&gt;      V1        = SY-MSGV1&lt;/P&gt;&lt;P&gt;      V2        = SY-MSGV2&lt;/P&gt;&lt;P&gt;      V3        = SY-MSGV3&lt;/P&gt;&lt;P&gt;      V4        = SY-MSGV4&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      MSG       = LV_MSG&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;      OTHERS    = 2.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; LV_MSG.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  ULINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " FORM_FORMATMSG&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  form_writeop&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      To write the totals and the session name.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_WRITEOP .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Total Records Uploaded :',V_TLINES,&lt;/P&gt;&lt;P&gt;           / 'No of Error Records :',V_ELINES,&lt;/P&gt;&lt;P&gt;           / 'No of Success Records :',V_SLINES,&lt;/P&gt;&lt;P&gt;           / 'Name of the Session :',V_SESNAM.&lt;/P&gt;&lt;P&gt;  ULINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    " form_writeop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this resolves your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all the helpful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 05:49:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-call-transaction-and-session-method/m-p/2155912#M455514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T05:49:10Z</dc:date>
    </item>
  </channel>
</rss>

