<?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: BDC Batch input session method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187338#M759115</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;Please reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1)	 Typical Uses of Batch Input&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Transferring data from another system while installing SAP System&lt;/P&gt;&lt;P&gt;&amp;#149;	Regularly transferring data that is captured into Non-SAP system into   SAP system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2).	Overview of Batch Input Procedure&lt;/P&gt;&lt;P&gt;&amp;#149;	 Data Analysis&lt;/P&gt;&lt;P&gt;&amp;#149;	  Create Data file&lt;/P&gt;&lt;P&gt;&amp;#149;	  Write Batch Input Program&lt;/P&gt;&lt;P&gt;&amp;#149;	  Process Batch Input data&lt;/P&gt;&lt;P&gt;&amp;#149;	  Analyze results&lt;/P&gt;&lt;P&gt;&amp;#149;	 Aalyze error session&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(3 )   Data Analysis&lt;/P&gt;&lt;P&gt;&amp;#149;	 Find the transaction code&lt;/P&gt;&lt;P&gt;&amp;#149;	Fields that are required / mandatory&lt;/P&gt;&lt;P&gt;&amp;#149;	Fields that can be allowed to default to standard values&lt;/P&gt;&lt;P&gt;&amp;#149;	The names, types, and lengths of the fields that are to be updated&lt;/P&gt;&lt;P&gt;&amp;#149;	The identifiers of the functions that need to be called to have the transaction process the batch input data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(4)	Collecting Transaction &amp;amp; Field Info&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&amp;#149;	Determine the transaction name by choosing System -&amp;gt; Status.&lt;/P&gt;&lt;P&gt;&amp;#149;	Step through the transaction, entering the data and performing the functions that are  required&lt;/P&gt;&lt;P&gt;&amp;#149;	On each screen, note the program name and screen no. Display these by choosing System -&amp;gt; Status. &lt;/P&gt;&lt;P&gt;&amp;#149;	For field, check box, and radio button, press F1 and then choose Technical info. Note the field name for batch input&lt;/P&gt;&lt;P&gt;&amp;#149;	The length and data type of field is available by double-clicking on the Data element field.&lt;/P&gt;&lt;P&gt;&amp;#149;	Find identification code for each function (button or menu) that is to be executed to process the batch input data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(5)	Collecting Transaction &amp;amp; Field Info&lt;/P&gt;&lt;P&gt;   Other Methods :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. Using Screen Painter and Menu Painter to Get Field and  Function Info&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b. Recording transaction runs using transaction SHDB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6	Create Data File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Data File must be TEXT ONLY file (preferably TAB delimited)&lt;/P&gt;&lt;P&gt;&amp;#149;	Sequence of field values must be same as in program&lt;/P&gt;&lt;P&gt;&amp;#149;	All data should be in character format.&lt;/P&gt;&lt;P&gt;&amp;#149;	Date fields must be in format set in user profile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7	Writing Batch Input Program&lt;/P&gt;&lt;P&gt;a.  Reading data from the text file.&lt;/P&gt;&lt;P&gt;b.  Perform data conversions or error-checking.&lt;/P&gt;&lt;P&gt;c.  Prepare the data for batch input processing by storing the data in the batch input   data structure, BDCDATA.&lt;/P&gt;&lt;P&gt;d. generate a batch input session for classical batch input, or process the data directly with CALL TRANSACTION USING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8    Batch Input Method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A  Create Session in Batch Input Queue&lt;/P&gt;&lt;P&gt;b. Call Transaction Using&lt;/P&gt;&lt;P&gt;c. Call Dialog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the difference between batch input and call transaction in BDC? &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;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2007 12:01:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-13T12:01:22Z</dc:date>
    <item>
      <title>BDC Batch input session method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187335#M759112</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;           I am new to SAP progamming. Pls let me know the basics of BDC Batch Input session method and Call transaction method. I want to know the pros and cons of both methods with justification. Please help me in this regarding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 11:44:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187335#M759112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T11:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: BDC Batch input session method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187336#M759113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BDC:&lt;/P&gt;&lt;P&gt;Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types of methods :&lt;/P&gt;&lt;P&gt;1 .Session Method&lt;/P&gt;&lt;P&gt;2 . CALL TRANSACTION &lt;/P&gt;&lt;P&gt;3. DIRECT INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Session method : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Features:&lt;/P&gt;&lt;P&gt;Asynchronous processing. &lt;/P&gt;&lt;P&gt;Synchronous Processing in database update.&lt;/P&gt;&lt;P&gt;Transfer data for more than one transaction.&lt;/P&gt;&lt;P&gt;Batch input processing log will be generated.&lt;/P&gt;&lt;P&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;CALL TRANSACTION METHOD :&lt;/P&gt;&lt;P&gt;This is another method to transfer data from the legacy system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Features:&lt;/P&gt;&lt;P&gt;Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.&lt;/P&gt;&lt;P&gt;Updating the database can be either synchronous or asynchronous. The program specifies the update type.&lt;/P&gt;&lt;P&gt;Transfer data for a single transaction.&lt;/P&gt;&lt;P&gt;Transfers data for a sequence of dialog screens.&lt;/P&gt;&lt;P&gt;No batch input processing log is generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For BDC:&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;P&gt;&lt;/P&gt;&lt;P&gt;see this link&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3233824"&gt;&lt;/A&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;&lt;P&gt;session method is preferable if amount of records are more as it takes more time &lt;/P&gt;&lt;P&gt;call transaction takes less time directly uploading into database used when records are less&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever we transfer Large amount of data we will Prefer using the Session method: bcoz&lt;/P&gt;&lt;P&gt;1. Process is divided into two steps Generate session and process session.&lt;/P&gt;&lt;P&gt;2. Error log is generated.&lt;/P&gt;&lt;P&gt;3. Only processing transactions can be run in Background using RSBDCSUB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you want to process a transaction and based on the Result you want to process another transaction we must use Call transaction method. Bcoz&lt;/P&gt;&lt;P&gt;1. It will return SY-SUBRC after each Call transaction unlike session method.&lt;/P&gt;&lt;P&gt;2. We can handle the messages using BDCMSGCOLL&lt;/P&gt;&lt;P&gt;3. Supports asynchronous proecessing.&lt;/P&gt;&lt;P&gt;4. Errors can be handled using Session method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;p498863&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 11:47:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187336#M759113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T11:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: BDC Batch input session method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187337#M759114</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;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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these link:&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://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;A href="http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/" target="test_blank"&gt;http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.planetsap.com/bdc_main_page.htm" target="test_blank"&gt;http://www.planetsap.com/bdc_main_page.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Session method:&lt;/P&gt;&lt;P&gt;1. Data migration is done in two steps .. Generate session and Process session.&lt;/P&gt;&lt;P&gt;So resouces can be used efficiently. good for bulkdata migration.&lt;/P&gt;&lt;P&gt;2. Session method generates error log when u process a session.&lt;/P&gt;&lt;P&gt;3. No SY-SUBRC can be returned after each transaction is called.&lt;/P&gt;&lt;P&gt;4. Provides synchronous Updation only...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call transaction method:&lt;/P&gt;&lt;P&gt;1. Data migration is done in single steps ..bcoz Transactions are called immediately after filling BDCDATA table. So good for small amount of data.&lt;/P&gt;&lt;P&gt;2. We have to collect error messages using BDCMSGCOLL Table&lt;/P&gt;&lt;P&gt;3. Returns SY-SUBRC and Messages ..after each Call Transaction..very useful feature for further processing based on the Status and Messages..&lt;/P&gt;&lt;P&gt;4. Supports Asynch or Synch Updation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code for session method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the porgram for Purchase order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zmm0069 NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;                                  MESSAGE-ID z0&lt;/P&gt;&lt;P&gt;                                  LINE-SIZE  132&lt;/P&gt;&lt;P&gt;                                  LINE-COUNT 65(2).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;                     Internal Tables                                 *&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; &lt;/P&gt;&lt;P&gt;*Internal table for the purchasing info records fields.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF i_inforecord OCCURS 0,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        matnr(18),&lt;/P&gt;&lt;P&gt;        lifnr(10),&lt;/P&gt;&lt;P&gt;        uom(3),&lt;/P&gt;&lt;P&gt;        ekgrp(3),&lt;/P&gt;&lt;P&gt;        planned_time(3),&lt;/P&gt;&lt;P&gt;        under_tol(3),&lt;/P&gt;&lt;P&gt;        over_tol(3),&lt;/P&gt;&lt;P&gt;        qty(10),&lt;/P&gt;&lt;P&gt;        price_cat(5),&lt;/P&gt;&lt;P&gt;        inco(3),&lt;/P&gt;&lt;P&gt;        designation(28),&lt;/P&gt;&lt;P&gt;        netpr(13),&lt;/P&gt;&lt;P&gt;        scale_qty1(10),&lt;/P&gt;&lt;P&gt;        scale_pr1(13),&lt;/P&gt;&lt;P&gt;        scale_qty2(10),&lt;/P&gt;&lt;P&gt;        scale_pr2(13),&lt;/P&gt;&lt;P&gt;        scale_qty3(13),&lt;/P&gt;&lt;P&gt;        scale_pr3(10),&lt;/P&gt;&lt;P&gt;        scale_qty4(13),&lt;/P&gt;&lt;P&gt;        scale_pr4(10),&lt;/P&gt;&lt;P&gt;        scale_qty5(13),&lt;/P&gt;&lt;P&gt;        scale_pr5(10),&lt;/P&gt;&lt;P&gt;        scale_qty6(13),&lt;/P&gt;&lt;P&gt;        scale_pr6(10),&lt;/P&gt;&lt;P&gt;        scale_qty7(13),&lt;/P&gt;&lt;P&gt;        scale_pr7(10),&lt;/P&gt;&lt;P&gt;        scale_qty8(13),&lt;/P&gt;&lt;P&gt;        scale_pr8(10),&lt;/P&gt;&lt;P&gt;        scale_qty9(13),&lt;/P&gt;&lt;P&gt;        scale_pr9(10),&lt;/P&gt;&lt;P&gt;        scale_qty10(13),&lt;/P&gt;&lt;P&gt;        scale_pr10(10),&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        END OF i_inforecord.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Internal table for Old and New Vendor number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  DATA : BEGIN OF i_lfb1 OCCURS 1,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;         lifnr(10),&lt;/P&gt;&lt;P&gt;         altkn(10),&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;         END   OF i_lfb1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Declare internal table for Call Transaction and BDC Session&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  DATA: i_bdc_table LIKE bdcdata OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;                     Global Variables                                *&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; &lt;/P&gt;&lt;P&gt;  DATA: g_counter(2) TYPE n,&lt;/P&gt;&lt;P&gt;        g_field_name(18) TYPE c,&lt;/P&gt;&lt;P&gt;        zc_yes  TYPE syftype VALUE 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;                     Selection Screen                                *&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; &lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  PARAMETERS: p_fname1 TYPE localfile .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN SKIP 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.&lt;/P&gt;&lt;P&gt;  PARAMETERS: p_rloc1 AS CHECKBOX  DEFAULT 'X'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-003.&lt;/P&gt;&lt;P&gt;  PARAMETERS p_group(12) OBLIGATORY DEFAULT 'ZPURCHINFO'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN END OF BLOCK c.&lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN END OF BLOCK b.&lt;/P&gt;&lt;P&gt;  SELECTION-SCREEN END OF BLOCK a.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;**WRITE the report header&lt;/P&gt;&lt;P&gt;  TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;    INCLUDE zheading.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;                     Start of selection                              *&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; &lt;/P&gt;&lt;P&gt;  START-OF-SELECTION.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Load Input file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM f_load_input_file.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create BDC records.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM create_bdc_records .&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  Create_BDC_records&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;      Perform the BDC for the records in 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; &lt;/P&gt;&lt;P&gt;  FORM create_bdc_records .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    IF NOT i_inforecord[] IS INITIAL.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Open BDC session&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM open_bdc_session.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      SELECT lifnr altkn FROM lfb1 INTO TABLE i_lfb1&lt;/P&gt;&lt;P&gt;                          FOR ALL ENTRIES IN i_inforecord&lt;/P&gt;&lt;P&gt;                          WHERE altkn = i_inforecord-lifnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sorting the Internal table for better performance&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      SORT i_lfb1 BY altkn.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      LOOP AT i_inforecord.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;***Mapping Old Vendor number to the new Vendor number&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        READ TABLE i_lfb1 WITH KEY altkn = i_inforecord-lifnr BINARY&lt;/P&gt;&lt;P&gt;                                                              SEARCH.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;          i_inforecord-lifnr = i_lfb1-lifnr.&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;        CLEAR i_bdc_table[].&lt;/P&gt;&lt;P&gt;        PERFORM insert_screen_header.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     call transaction 'ME11' using i_bdc_table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   mode 'A'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     CLEAR i_bdc_table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;      CLEAR i_inforecord[].&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM close_bdc_session.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Release the BDC sessions created&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;      PERFORM release_bdc.&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.                    " open_group&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  bdc_dynpro_start&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;      Start the screen for the transfer of fields&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; &lt;/P&gt;&lt;P&gt;  FORM bdc_dynpro_start  USING    p_g_program_1&lt;/P&gt;&lt;P&gt;                                  p_g_screen.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    CLEAR i_bdc_table.&lt;/P&gt;&lt;P&gt;    i_bdc_table-program  = p_g_program_1.&lt;/P&gt;&lt;P&gt;    i_bdc_table-dynpro   = p_g_screen.&lt;/P&gt;&lt;P&gt;    i_bdc_table-dynbegin = 'X'.&lt;/P&gt;&lt;P&gt;    APPEND i_bdc_table.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDFORM.                    " bdc_dynpro_start_start&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  bdc_insert_field&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;       Insert field                                                  *&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 bdc_insert_field USING f_name f_value.&lt;/P&gt;&lt;P&gt;    IF f_value &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;      CLEAR i_bdc_table.&lt;/P&gt;&lt;P&gt;      i_bdc_table-fnam = f_name.&lt;/P&gt;&lt;P&gt;      i_bdc_table-fval = f_value.&lt;/P&gt;&lt;P&gt;      APPEND i_bdc_table.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDFORM.                    "bdc_insert_field&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  open_bdc_session&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;      Open a BDC 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 open_bdc_session .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Open BDC session and create and update records&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt; &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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      DEST                      = FILLER8&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        group                     = p_group&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;        keep                      = 'X'&lt;/P&gt;&lt;P&gt;        user                      = sy-uname&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      RECORD                    = FILLER1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      PROG                      = SY-CPROG&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;      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;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDFORM.                    " create_bdc_session&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  insert_screen_header&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;      Screen flow for the transfer of fields&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; &lt;/P&gt;&lt;P&gt;  FORM insert_screen_header .&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;First Screen 100&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_dynpro_start USING 'SAPMM06I' '0100'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_insert_field USING:'BDC_CURSOR' 'EINA-LIFNR',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINA-LIFNR' i_inforecord-lifnr,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINA-MATNR' i_inforecord-matnr,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINE-EKORG' '1000',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'RM06I-NORMB' zc_yes.&lt;/P&gt;&lt;P&gt; &lt;/P&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; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Next Screen 101&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_dynpro_start USING 'SAPMM06I' '0101'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'EINA-MAHN1',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                     'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                     'EINA-MEINS' i_inforecord-uom.&lt;/P&gt;&lt;P&gt; &lt;/P&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;*Next Screen 102&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_dynpro_start USING 'SAPMM06I' '0102'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'EINE-INCO2',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                 'EINE-APLFZ' i_inforecord-planned_time,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                 'EINE-EKGRP' i_inforecord-ekgrp,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                 'EINE-NORBM' i_inforecord-qty.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_insert USING  'EINE-UEBTK' ' '.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    PERFORM bdc_insert_field USING:'EINE-PEINH' i_inforecord-scale_qty1,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINE-BPRME' i_inforecord-uom,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINE-UNTTO' '5',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINE-UEBTO' '25',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINE-MEPRF' i_inforecord-price_cat,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINE-NETPR' i_inforecord-netpr,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                   'EINE-INCO1' i_inforecord-inco,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                  'EINE-INCO2' i_inforecord-designation.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Checking for Scale quantities&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    IF i_inforecord-scale_qty2 = space.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_insert_field  USING 'BDC_OKCODE' '=BU'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM insert_bdc_new.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_insert_field  USING 'BDC_OKCODE' '=KO'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;****&lt;STRONG&gt;----&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;Next Screen 201&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_dynpro_start USING 'SAPMV13A' '0201'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'RV13A-DATAB',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                        'BDC_OKCODE' '=PSTF'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;****&lt;STRONG&gt;----&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;Next Screen 201&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_dynpro_start USING 'SAPMV13A' '0201'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'KONP-KSCHL(01)',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                       'BDC_OKCODE' '=PSTF',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                       'RV130-SELKZ(01)' zc_yes.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;****&lt;STRONG&gt;----&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;LAST SCREEN 303&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_dynpro_start USING 'SAPMV13A' '0303'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_insert_field USING : 'BDC_CURSOR' 'KONM-KBETR(03)',&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                                       'BDC_OKCODE' '=SICH'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Counter to Loop the Item level entry&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      g_counter = 0.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty2&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty3&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr3.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty4&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr4.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty5&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr5.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty6&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr6.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty7&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr7.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty8&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr8.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING i_inforecord-scale_qty9&lt;/P&gt;&lt;P&gt;                                i_inforecord-scale_pr9.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM scale_entry USING  i_inforecord-scale_qty10&lt;/P&gt;&lt;P&gt;                                 i_inforecord-scale_pr10.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM insert_bdc_new.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDFORM.                    " insert_screen_header&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  insert_bdc&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;      Insert BDC&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; &lt;/P&gt;&lt;P&gt;  FORM insert_bdc_new .&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                  = 'ME11'&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              = i_bdc_table&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; &lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;    CLEAR i_bdc_table[].&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDFORM.                    " insert_bdc&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  close_bdc_session&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;     Close the BDC 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; &lt;/P&gt;&lt;P&gt;  FORM close_bdc_session .&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; &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;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;  ENDFORM.                    " close_bdc_session&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  f_load_input_file&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;      Upload the file&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; &lt;/P&gt;&lt;P&gt;  FORM f_load_input_file.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check always Local file for upload&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    IF p_rloc1 = zc_yes.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                filename                = p_fname1&lt;/P&gt;&lt;P&gt;                filetype                = 'DAT'&lt;/P&gt;&lt;P&gt;           TABLES&lt;/P&gt;&lt;P&gt;                data_tab                = i_inforecord&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                conversion_error        = 1&lt;/P&gt;&lt;P&gt;                file_open_error         = 2&lt;/P&gt;&lt;P&gt;                file_read_error         = 3&lt;/P&gt;&lt;P&gt;                invalid_type            = 4&lt;/P&gt;&lt;P&gt;                no_batch                = 5&lt;/P&gt;&lt;P&gt;                unknown_error           = 6&lt;/P&gt;&lt;P&gt;                invalid_table_width     = 7&lt;/P&gt;&lt;P&gt;                gui_refuse_filetransfer = 8&lt;/P&gt;&lt;P&gt;                customer_error          = 9&lt;/P&gt;&lt;P&gt;                OTHERS                  = 10.&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; &lt;/P&gt;&lt;P&gt;        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        STOP.&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;    ENDIF.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  ENDFORM.                    " f_load_input_file&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  release_bdc&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;     Release the 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; &lt;/P&gt;&lt;P&gt;  FORM release_bdc.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    SUBMIT rsbdcsub WITH mappe EQ p_group&lt;/P&gt;&lt;P&gt;                    WITH von EQ sy-datum&lt;/P&gt;&lt;P&gt;                    WITH bis EQ sy-datum&lt;/P&gt;&lt;P&gt;                    WITH fehler EQ '.'&lt;/P&gt;&lt;P&gt;                    EXPORTING LIST TO MEMORY&lt;/P&gt;&lt;P&gt;                    AND RETURN.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDFORM.                    " release_bdc&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  scale_entry&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;      Populate the Scale quantities&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_SCALE_QTY&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_SCALE_PRICE&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 scale_entry USING    p_scale_qty&lt;/P&gt;&lt;P&gt;                            p_scale_price.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Increment the Counter&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    g_counter = g_counter + 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    IF p_scale_qty &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      CONCATENATE 'KONM-KSTBM('  g_counter  ')' INTO g_field_name.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_insert_field USING g_field_name p_scale_qty.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      CONCATENATE 'KONM-KBETR('  g_counter  ')' INTO g_field_name.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      PERFORM bdc_insert_field USING g_field_name p_scale_price.&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;  ENDFORM.&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  bdc_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;      To uncheck the Unlimited (UEBTK)&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; &lt;/P&gt;&lt;P&gt;  FORM bdc_insert USING  f_name f_value.&lt;/P&gt;&lt;P&gt;    CLEAR i_bdc_table.&lt;/P&gt;&lt;P&gt;    i_bdc_table-fnam = f_name.&lt;/P&gt;&lt;P&gt;    i_bdc_table-fval = f_value.&lt;/P&gt;&lt;P&gt;    APPEND i_bdc_table.&lt;/P&gt;&lt;P&gt;  ENDFORM.                    " bdc_insert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it is usefull ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chandra Sekhar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 11:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187337#M759114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T11:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: BDC Batch input session method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187338#M759115</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;Please reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1)	 Typical Uses of Batch Input&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Transferring data from another system while installing SAP System&lt;/P&gt;&lt;P&gt;&amp;#149;	Regularly transferring data that is captured into Non-SAP system into   SAP system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2).	Overview of Batch Input Procedure&lt;/P&gt;&lt;P&gt;&amp;#149;	 Data Analysis&lt;/P&gt;&lt;P&gt;&amp;#149;	  Create Data file&lt;/P&gt;&lt;P&gt;&amp;#149;	  Write Batch Input Program&lt;/P&gt;&lt;P&gt;&amp;#149;	  Process Batch Input data&lt;/P&gt;&lt;P&gt;&amp;#149;	  Analyze results&lt;/P&gt;&lt;P&gt;&amp;#149;	 Aalyze error session&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(3 )   Data Analysis&lt;/P&gt;&lt;P&gt;&amp;#149;	 Find the transaction code&lt;/P&gt;&lt;P&gt;&amp;#149;	Fields that are required / mandatory&lt;/P&gt;&lt;P&gt;&amp;#149;	Fields that can be allowed to default to standard values&lt;/P&gt;&lt;P&gt;&amp;#149;	The names, types, and lengths of the fields that are to be updated&lt;/P&gt;&lt;P&gt;&amp;#149;	The identifiers of the functions that need to be called to have the transaction process the batch input data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(4)	Collecting Transaction &amp;amp; Field Info&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&amp;#149;	Determine the transaction name by choosing System -&amp;gt; Status.&lt;/P&gt;&lt;P&gt;&amp;#149;	Step through the transaction, entering the data and performing the functions that are  required&lt;/P&gt;&lt;P&gt;&amp;#149;	On each screen, note the program name and screen no. Display these by choosing System -&amp;gt; Status. &lt;/P&gt;&lt;P&gt;&amp;#149;	For field, check box, and radio button, press F1 and then choose Technical info. Note the field name for batch input&lt;/P&gt;&lt;P&gt;&amp;#149;	The length and data type of field is available by double-clicking on the Data element field.&lt;/P&gt;&lt;P&gt;&amp;#149;	Find identification code for each function (button or menu) that is to be executed to process the batch input data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(5)	Collecting Transaction &amp;amp; Field Info&lt;/P&gt;&lt;P&gt;   Other Methods :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. Using Screen Painter and Menu Painter to Get Field and  Function Info&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b. Recording transaction runs using transaction SHDB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6	Create Data File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Data File must be TEXT ONLY file (preferably TAB delimited)&lt;/P&gt;&lt;P&gt;&amp;#149;	Sequence of field values must be same as in program&lt;/P&gt;&lt;P&gt;&amp;#149;	All data should be in character format.&lt;/P&gt;&lt;P&gt;&amp;#149;	Date fields must be in format set in user profile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7	Writing Batch Input Program&lt;/P&gt;&lt;P&gt;a.  Reading data from the text file.&lt;/P&gt;&lt;P&gt;b.  Perform data conversions or error-checking.&lt;/P&gt;&lt;P&gt;c.  Prepare the data for batch input processing by storing the data in the batch input   data structure, BDCDATA.&lt;/P&gt;&lt;P&gt;d. generate a batch input session for classical batch input, or process the data directly with CALL TRANSACTION USING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8    Batch Input Method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A  Create Session in Batch Input Queue&lt;/P&gt;&lt;P&gt;b. Call Transaction Using&lt;/P&gt;&lt;P&gt;c. Call Dialog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the difference between batch input and call transaction in BDC? &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;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Sivaparvathi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 12:01:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187338#M759115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T12:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: BDC Batch input session method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187339#M759116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the following thread for most of the details of bdc methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4526534"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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>Thu, 13 Dec 2007 12:08:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-batch-input-session-method/m-p/3187339#M759116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T12:08:32Z</dc:date>
    </item>
  </channel>
</rss>

