<?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: Re:BDC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086873#M732095</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;the BDC program should be in this format &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transaction Recorder (SHDB) &lt;/P&gt;&lt;P&gt;How to Upload Presentation Server Flat file to SAP R/3 system???&lt;/P&gt;&lt;P&gt;How to upload application server file to R/3 system?&lt;/P&gt;&lt;P&gt;Definition&lt;/P&gt;&lt;P&gt;Example - Call Transaction Method &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transaction Recorder (SHDB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before you work with the Batch Input methods, you should know the purpose of the tool&lt;/P&gt;&lt;P&gt;Transaction Recorder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;P&gt;You can use the transaction recorder to record a series of transactions and their screens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Features:&lt;/P&gt;&lt;P&gt;You can use the recording to create&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data transfer programs that use batch input or CALL TRANSACTION &lt;/P&gt;&lt;P&gt;Batch input sessions &lt;/P&gt;&lt;P&gt;Test data &lt;/P&gt;&lt;P&gt;Function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: It doesn&amp;#146;t record F1, F4 and Scrollbar movements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload Flat file from Presentation Server to SAP R/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &amp;#145;GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CODEPAGE = &amp;#145;IBM'&lt;/P&gt;&lt;P&gt;FILENAME = P_UFILE&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = INT_TAB&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 NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE E999(FR) WITH 'ERROR IN FILE UPLOAD'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload file from application server to SAP R/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open the the application server file &lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;dsn&amp;gt; FOR INPUT &amp;lt;mode&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the data from application server file&lt;/P&gt;&lt;P&gt;READ DATASET &amp;lt;dsn&amp;gt; INTO &amp;lt;wa&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then close the application server file&lt;/P&gt;&lt;P&gt;CLOSE DATASET &amp;lt;dsn&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition- Declaring BDC Table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BDC_TAB LIKE STANDARD TABLE OF &lt;/P&gt;&lt;P&gt;BDCDATA INITIAL SIZE 6 &lt;/P&gt;&lt;P&gt;WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table used to collect the transaction&amp;#146;s information must be declared &amp;#147;LIKE BDCDATA&amp;#148;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filling BDC Table &amp;#150; Method #1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = &amp;#145;SAPMF02K&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = &amp;#145;01016&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;RF02K-LIFNR&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;TEST1&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;RF02K-D0010&amp;#146;. &lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = &amp;#145;SAPMF02K&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = &amp;#145;0110&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;LFA1-STRAS&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;123 Main St.&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;BDC_OKCODE&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;/11&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filling BDC Table &amp;#150; Method #2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM POPULATE_BDC_TAB&lt;/P&gt;&lt;P&gt;USING:&lt;/P&gt;&lt;P&gt;&amp;#145;1&amp;#146; &amp;#145;SAPMF02K&amp;#146; &amp;#145;0106&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;RF02K-LIFNR&amp;#146; &amp;#145;TEST1&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;RF02K-D0010&amp;#146; &amp;#145;X&amp;#146;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;1&amp;#146; &amp;#145;SAPMF02K&amp;#146; &amp;#145;0110&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;LFA1-STRAS&amp;#146;, &amp;#145;123 Main St.&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;BDC_OKCODE&amp;#146;, &amp;#145;/11&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM POPULATE_BDC_TAB USING FLAG VAR1 VAR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;IF FLAG = &amp;#145;1&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = VAR1.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = VAR2..&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = VAR1.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = VAR2.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This two subroutine method to fill the BDC table is preferable because the &amp;#147;POPULATE_BDC_TABLE&amp;#148; subroutine is reusable throughout all batch input programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example #1 - Change Vendor (Call Transaction Method)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example #1- Declaration Section&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Y180DM10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BDC_TAB LIKE STANDARD TABLE OF&lt;/P&gt;&lt;P&gt;BDCDATA INITIAL SIZE 6 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;INFILE(20) VALUE &amp;#145;/tmp/bc180_file4&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF INREC.&lt;/P&gt;&lt;P&gt;VENDNUM LIKE LFA1-LIFNR.&lt;/P&gt;&lt;P&gt;STREET LIKE LFA1-STRAS.&lt;/P&gt;&lt;P&gt;END OF INREC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: DISPMODE DEFAULT &amp;#145;A&amp;#146;,&lt;/P&gt;&lt;P&gt;UPDAMODE DEFAULT &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;OPEN DATASET INFILE&lt;/P&gt;&lt;P&gt;FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET INFILE INTO INREC.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;PERFORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146;&lt;/P&gt;&lt;P&gt;USING BDC_TAB&lt;/P&gt;&lt;P&gt;MODE DISPMODE&lt;/P&gt;&lt;P&gt;UPDATE UPDAMODE.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE: /&amp;#145;ERROR&amp;#146;. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;CLOSE DATASET INFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;synchronous updating&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&amp;#133;&amp;#133;&amp;#133;&lt;/P&gt;&lt;P&gt;PERFORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146;&lt;/P&gt;&lt;P&gt;USING BDC_TAB&lt;/P&gt;&lt;P&gt;MODE &amp;#145;N&amp;#146;&lt;/P&gt;&lt;P&gt;UPDATE &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE: /&amp;#145;ERROR&amp;#146;. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asynchronous updating&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&amp;#133;&amp;#133;&amp;#133;&lt;/P&gt;&lt;P&gt;PERFORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146;&lt;/P&gt;&lt;P&gt;USING BDC_TAB&lt;/P&gt;&lt;P&gt;MODE &amp;#145;N&amp;#146;&lt;/P&gt;&lt;P&gt;UPDATE &amp;#145;A&amp;#146;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE: /&amp;#145;ERROR&amp;#146;. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error Handling&lt;/P&gt;&lt;P&gt;Write an error report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send the record(s) in error to an error file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a batch input session with the record(s) in error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To store error messages ( CALL TRANSACTION )&lt;/P&gt;&lt;P&gt;data: begin of Tab_Mess occurs 0.&lt;/P&gt;&lt;P&gt;include structure bdcmsgcoll.&lt;/P&gt;&lt;P&gt;data : end of Tab_Mess,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146; USING BDC_TAB MODE &amp;#145;N&amp;#146; UPDATE &amp;#145;S&amp;#146; &lt;/P&gt;&lt;P&gt;MESSAGES INTO TAB_MESS.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;WRITE: / Tab_MESS-TCODE, Tab_MESS-DYNUMB, Tab_MESS-MSGTYP , &lt;/P&gt;&lt;P&gt;Tab_MESS-MSGID.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am giving you example for Change Vendor you practice for ur tcode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For our example, we will use the &amp;#147;Change Vendor&amp;#148; transaction (&amp;#147;FK02&amp;#148;) to add a street address to an already existing vendor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step #1&lt;/P&gt;&lt;P&gt;Use &amp;#147;System&amp;amp;#61664;Status&amp;#148; menu path to determine online program name (SAPMF02K), screen number (0110)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step #2&lt;/P&gt;&lt;P&gt;Use &amp;#147;F1&amp;#148; key and &amp;#147;Technical Info&amp;#148; pushbutton in each screen field to be filled to determine the field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step #3 &lt;/P&gt;&lt;P&gt;Determine how to proceed in the transaction&lt;/P&gt;&lt;P&gt;(save the record by clicking on the &amp;#145;Save&amp;#146; pushbutton or pressing the &amp;#145;F11&amp;#146; key).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC Table Contents&lt;/P&gt;&lt;P&gt;After researching the transaction we can determine the contents of the BDC table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM DYNPRO DYNBEGIN FNAM FVAL&lt;/P&gt;&lt;P&gt;SAMPF02K 0106 X &lt;/P&gt;&lt;P&gt;RF02K-LIFNR TEST1&lt;/P&gt;&lt;P&gt;RF02K-D0110 X&lt;/P&gt;&lt;P&gt;SAMPF02K 0110 X &lt;/P&gt;&lt;P&gt;LFA1-STRAS 123 Main St.&lt;/P&gt;&lt;P&gt;BDC_OKCODE /11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Batch Input Methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;CALL TRANSACTION USING&amp;#148;&lt;/P&gt;&lt;P&gt;STATEMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call transaction - for data transfer&lt;/P&gt;&lt;P&gt;Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program. &lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;lt;tcode&amp;gt;&lt;/P&gt;&lt;P&gt;USING &amp;lt;bdc_tab&amp;gt;&lt;/P&gt;&lt;P&gt;MODE &amp;lt;mode&amp;gt;&lt;/P&gt;&lt;P&gt;UPDATE &amp;lt;update&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Display all&lt;/P&gt;&lt;P&gt;E Display errors only&lt;/P&gt;&lt;P&gt;N No display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S Synchronous&lt;/P&gt;&lt;P&gt;A Asynchronous&lt;/P&gt;&lt;P&gt;L Local update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The process flow of CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A program that uses CALL TRANSACTION USING to process legacy data should execute thefollowing steps:&lt;/P&gt;&lt;P&gt;Prepare a BDCDATA structure for the transaction that you wish to run. &lt;/P&gt;&lt;P&gt;Prepare a internal table to store error messages Tab_Mess like structure of BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;MM01' USING BDCDATA MODE 'A' UPDATE 'S'. MESSAGES INTO TAB_MESS.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&amp;lt;Error_handling&amp;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;Overview of Batch Input Session&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first batch input method is to create a batch input session. It is the processing of this batch input session that updates the database, not the execution of the batch input program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the below links also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fa/097022543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fa/097022543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this pdf file&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bdcconcept.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bdcconcept.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this for FAQs on BDC&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/question-about-bdc-program.htm" target="test_blank"&gt;http://www.sap-img.com/abap/question-about-bdc-program.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code for call transaction method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this for BDC recording with screen shots&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/bdc.htm" target="test_blank"&gt;http://www.sap-img.com/bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table control in BDC&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check these..&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://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://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="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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;rEWARD IF USEFULL&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Nov 2007 11:12:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-16T11:12:17Z</dc:date>
    <item>
      <title>Re:BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086869#M732091</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;            Iam thankful if any one could help me in telling BDC's , i need one complete example , flatfile, abap prg and steps, iam very much confused , i will execute the given prg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 10:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086869#M732091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T10:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Re:BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086870#M732092</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;BDC Document Links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go thur these&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&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;&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.sap-img.com/bdc.htm" target="test_blank"&gt;http://www.sap-img.com/bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&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.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;Table Control in BDC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The concept is easy: it has to indicate the index of the table control in the field name, so if you have to populate the first record of table control:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC-FIELDNAME = &amp;lt;FIELDNAME&amp;gt;(01).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you fill the second row:&lt;/P&gt;&lt;P&gt;BDC-FIELDNAME = &amp;lt;FIELDNAME&amp;gt;(02).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is usually on how many records you have to load, because u can fill only the rows of table control available in the screen, If you have more records than it can be displayed yuo have to simulate the command to go next page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of recod can be displayed can depend on pc resolution and many program haven't command to go to next page (in this case it could be impossible create a BDC program9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A way to create a bdc program resolution indipendent is to work on the first and second row.&lt;/P&gt;&lt;P&gt;- Place the first hit in the first row of bdc;&lt;/P&gt;&lt;P&gt;- Place the second insert in the second row of bdc;&lt;/P&gt;&lt;P&gt;- Place the last hit to the top of table control;&lt;/P&gt;&lt;P&gt;- Place the next hit in the second row;&lt;/P&gt;&lt;P&gt;- Place the last hit to the top of table control;&lt;/P&gt;&lt;P&gt;- Place the next hit in the second row;&lt;/P&gt;&lt;P&gt;- .... and so&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more info: Search in SDN with TABLE CONTROL IN BDC.&lt;/P&gt;&lt;P&gt;Will get a lot of related links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if this Helps.&lt;/P&gt;&lt;P&gt;Manish&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;How would I Automtacally have my BDC session to process in the background and complete it without going through SM35 to process in the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT rsbdcsub AND RETURN&lt;/P&gt;&lt;P&gt;         EXPORTING LIST TO MEMORY&lt;/P&gt;&lt;P&gt;         WITH mappe = p_sessionnanme&lt;/P&gt;&lt;P&gt;         WITH von   = w_datum&lt;/P&gt;&lt;P&gt;         WITH bis   = sy-datum&lt;/P&gt;&lt;P&gt;         WITH z_verarb = c_true&lt;/P&gt;&lt;P&gt;         WITH fehler = c_false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if this helps.&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**----Parameter for runtime of CALL TRANSACTION.&lt;/P&gt;&lt;P&gt;  DATA: st_opt LIKE ctu_params.&lt;/P&gt;&lt;P&gt;  st_opt-dismode = c_mode.      " Processing mode for CALL TRANSACTION&lt;/P&gt;&lt;P&gt;  st_opt-updmode = ''.          " Update mode for CALL TRANSACTION&lt;/P&gt;&lt;P&gt;  st_opt-defsize = ''.          " Default screen size for CALL TRANS&lt;/P&gt;&lt;P&gt;  st_opt-nobiend = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----Call transaction&lt;/P&gt;&lt;P&gt;      CALL TRANSACTION c_tcode USING it_bdcdata&lt;/P&gt;&lt;P&gt;                               OPTIONS FROM st_opt&lt;/P&gt;&lt;P&gt;                               MESSAGES INTO it_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the Difference between both: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-	The most important aspects of the Batch session interface are:&lt;/P&gt;&lt;P&gt;1) Asynchronous processing&lt;/P&gt;&lt;P&gt;2) Transfers data for multiple transactions&lt;/P&gt;&lt;P&gt;3)Synchronous database update&lt;/P&gt;&lt;P&gt;    During processing, no transaction is started until the previous transaction  &lt;/P&gt;&lt;P&gt;    has been written to the database.&lt;/P&gt;&lt;P&gt;4)	A batch input processing log is generated for each session            &lt;/P&gt;&lt;P&gt;5)	Sessions cannot be generated in parallel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most important aspects of the CALL TRANSACTION USING interface are:&lt;/P&gt;&lt;P&gt;1) Synchronous processing&lt;/P&gt;&lt;P&gt;2) Transfers data for a single transaction&lt;/P&gt;&lt;P&gt;3) Synchronous and asynchronous database updating both possible&lt;/P&gt;&lt;P&gt; The program specifies which kind of updating is desired.&lt;/P&gt;&lt;P&gt;4) Separate LUW for the transaction : The system performs a database commit immediately before and after the CALL TRANSACTION USING statement. &lt;/P&gt;&lt;P&gt;   5) No batch input processing log is generated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the below article, which will show which is one is better&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;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if this helps.&lt;/P&gt;&lt;P&gt;Manish&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 10:43:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086870#M732092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T10:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re:BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086871#M732093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is BDC? &lt;/P&gt;&lt;P&gt;Batch Data Communication or BDC is a batch interfacing technique that SAP developed.  It is mainly used for uploading data into the SAP R/3 system.   BDC works by simulating the user input from transactional screen via an ABAP program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data input data file will come in the form of a flat file which the user save as file type txt file or prn file from the Microsoft Excel program.  An Abaper will create a program to read the text file and upload into the SAP system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally, the tcode SHDB will be used to record the transaction code the user used.  After, the simulation, the Abaper can generate a sample program and modify from there.  It makes the programming easier and faster.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Reference Books &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; want to learn how to upload data using BDC. If I have a excel data file how will upload it using BDC. I don't know the full process of doing it, if someone help me in this. I want it using BDC session process and processing that session. I was trying to upload material master other day. But could not follow the process of uploading using BDC though I know LSMW.  Please explain me the BDC process in details with examples. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a BDC upload you need to write a program which created BDC sessions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps: &lt;/P&gt;&lt;P&gt;1. Work out the transaction you would use to create the data manually. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use transaction SHDB to record the creation of one material master data. &lt;/P&gt;&lt;P&gt;    Click the New recording button or the Menu - Recording - Create &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Save the recording, and then go back a screen and go to the overview. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Select the recording and click on Edit - Create Program. Give the program a Z name, and select transfer from recording. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Edit the program. You will see that all the data you entered is hard-coded into the program. You need to make the following changes: &lt;/P&gt;&lt;P&gt;5.1 After the start-of-selection, Call ws_upload to upload the file (the excel file needs to be saved as TAB separated). &lt;/P&gt;&lt;P&gt;5.2 After the open-group, Loop on the uploaded data. For each line, perform validation checks on the data, then modify the perform bdc_field commands to use the file data. &lt;/P&gt;&lt;P&gt;5.3. After perform bdc_transaction, add the endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute the program. It will have options to create a batch session or to process directly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are all my finds . Might be it will be useful to you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct call of transactions, session handling: &lt;/P&gt;&lt;P&gt;/nxxxx This terminates the current transaction, and starts transaction xxxx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/n This terminates the transaction. This generally corresponds to pressing F15 to go back. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/nend This termiantes all separate sessions and logs off (corresponds to System - Logoff). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/nex This terminates all separate sessions and logs off immediately (without any warning!). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/oxxxx This opens a new session and starts transaction xxxx in This session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/o This lists existing sessions and allows deletion or opening of a new session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/i This terminates the current session (corresponds to System End &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/i1, /i2,... This terminates the session with the number given. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.xyzw Fast path: 'xyzw' refers to the underlined letters in the menus. This type of navigation is uncommon and is provided more for emergencies (such as a defective mouse). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Batch &lt;/P&gt;&lt;P&gt;The following commands can be entered in correction mode ('Process in foreground' or 'Display errors only') when processing a batch input session: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/n This terminates the current batch input transaction and characterizes it as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bdel This deletes the current batch input transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bend This terminates batch input processing and sets the session to Failed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bda This switches from Display errors only to Process in foreground &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bde This switches from Process in foreground to Display errors only &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;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;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;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdc_call.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdc_call.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 10:47:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086871#M732093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T10:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Re:BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086872#M732094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSTEST_044                              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;        F1(4)  TYPE  C,&lt;/P&gt;&lt;P&gt;        F2(4)  TYPE  C,&lt;/P&gt;&lt;P&gt;        F3(4)  TYPE  C,&lt;/P&gt;&lt;P&gt;        F4(10) TYPE  C,&lt;/P&gt;&lt;P&gt;        F5(35) TYPE  C,&lt;/P&gt;&lt;P&gt;        F6(10) TYPE  C,&lt;/P&gt;&lt;P&gt;        F7(3)  TYPE  C,&lt;/P&gt;&lt;P&gt;        F8(10) TYPE  C,&lt;/P&gt;&lt;P&gt;        F9(10) TYPE  C,&lt;/P&gt;&lt;P&gt;        F10(3) TYPE  C,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;DATA FILE TYPE  STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER P_FILE LIKE  IBIPPARMS-PATH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      PROGRAM_NAME  = SYST-CPROG&lt;/P&gt;&lt;P&gt;      DYNPRO_NUMBER = SYST-DYNNR&lt;/P&gt;&lt;P&gt;      FIELD_NAME    = 'P_FILE'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      FILE_NAME     = P_FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  FILE = P_FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME                      = FILE&lt;/P&gt;&lt;P&gt;      FILETYPE                      = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HAS_FIELD_SEPARATOR           = ' '&lt;/P&gt;&lt;/LI&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                      = ITAB&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_READ_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_BATCH                      = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_TYPE                  = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_AUTHORITY                  = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNKNOWN_ERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BAD_DATA_FORMAT               = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER_NOT_ALLOWED            = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SEPARATOR_NOT_ALLOWED         = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER_TOO_LONG               = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNKNOWN_DP_ERROR              = 12&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ACCESS_DENIED                 = 13&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DP_OUT_OF_MEMORY              = 14&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DISK_FULL                     = 15&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DP_TIMEOUT                    = 16&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                        = 17&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;    WRITE:/ ITAB.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flat file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0000005249000100010001Company   Vendor 513                         V513      DE 31000     A1        EUR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 10:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086872#M732094</guid>
      <dc:creator>mahaboob_pathan</dc:creator>
      <dc:date>2007-11-16T10:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re:BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086873#M732095</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;the BDC program should be in this format &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transaction Recorder (SHDB) &lt;/P&gt;&lt;P&gt;How to Upload Presentation Server Flat file to SAP R/3 system???&lt;/P&gt;&lt;P&gt;How to upload application server file to R/3 system?&lt;/P&gt;&lt;P&gt;Definition&lt;/P&gt;&lt;P&gt;Example - Call Transaction Method &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transaction Recorder (SHDB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before you work with the Batch Input methods, you should know the purpose of the tool&lt;/P&gt;&lt;P&gt;Transaction Recorder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;P&gt;You can use the transaction recorder to record a series of transactions and their screens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Features:&lt;/P&gt;&lt;P&gt;You can use the recording to create&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data transfer programs that use batch input or CALL TRANSACTION &lt;/P&gt;&lt;P&gt;Batch input sessions &lt;/P&gt;&lt;P&gt;Test data &lt;/P&gt;&lt;P&gt;Function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: It doesn&amp;#146;t record F1, F4 and Scrollbar movements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload Flat file from Presentation Server to SAP R/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &amp;#145;GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CODEPAGE = &amp;#145;IBM'&lt;/P&gt;&lt;P&gt;FILENAME = P_UFILE&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = INT_TAB&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 NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE E999(FR) WITH 'ERROR IN FILE UPLOAD'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload file from application server to SAP R/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open the the application server file &lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;dsn&amp;gt; FOR INPUT &amp;lt;mode&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the data from application server file&lt;/P&gt;&lt;P&gt;READ DATASET &amp;lt;dsn&amp;gt; INTO &amp;lt;wa&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then close the application server file&lt;/P&gt;&lt;P&gt;CLOSE DATASET &amp;lt;dsn&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition- Declaring BDC Table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BDC_TAB LIKE STANDARD TABLE OF &lt;/P&gt;&lt;P&gt;BDCDATA INITIAL SIZE 6 &lt;/P&gt;&lt;P&gt;WITH HEADER LINE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table used to collect the transaction&amp;#146;s information must be declared &amp;#147;LIKE BDCDATA&amp;#148;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filling BDC Table &amp;#150; Method #1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = &amp;#145;SAPMF02K&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = &amp;#145;01016&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;RF02K-LIFNR&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;TEST1&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;RF02K-D0010&amp;#146;. &lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = &amp;#145;SAPMF02K&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = &amp;#145;0110&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;LFA1-STRAS&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;123 Main St.&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = &amp;#145;BDC_OKCODE&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = &amp;#145;/11&amp;#146;.&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filling BDC Table &amp;#150; Method #2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM POPULATE_BDC_TAB&lt;/P&gt;&lt;P&gt;USING:&lt;/P&gt;&lt;P&gt;&amp;#145;1&amp;#146; &amp;#145;SAPMF02K&amp;#146; &amp;#145;0106&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;RF02K-LIFNR&amp;#146; &amp;#145;TEST1&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;RF02K-D0010&amp;#146; &amp;#145;X&amp;#146;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#145;1&amp;#146; &amp;#145;SAPMF02K&amp;#146; &amp;#145;0110&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;LFA1-STRAS&amp;#146;, &amp;#145;123 Main St.&amp;#146;,&lt;/P&gt;&lt;P&gt;&amp;#145; &amp;#145; &amp;#145;BDC_OKCODE&amp;#146;, &amp;#145;/11&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM POPULATE_BDC_TAB USING FLAG VAR1 VAR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR BDC_TAB.&lt;/P&gt;&lt;P&gt;IF FLAG = &amp;#145;1&amp;#146;.&lt;/P&gt;&lt;P&gt;BDC_TAB-PROGRAM = VAR1.&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNPRO = VAR2..&lt;/P&gt;&lt;P&gt;BDC_TAB-DYNBEGIN = &amp;#145;X&amp;#146;.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;BDC_TAB-FNAM = VAR1.&lt;/P&gt;&lt;P&gt;BDC_TAB-FVAL = VAR2.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND BDC_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This two subroutine method to fill the BDC table is preferable because the &amp;#147;POPULATE_BDC_TABLE&amp;#148; subroutine is reusable throughout all batch input programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example #1 - Change Vendor (Call Transaction Method)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example #1- Declaration Section&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Y180DM10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BDC_TAB LIKE STANDARD TABLE OF&lt;/P&gt;&lt;P&gt;BDCDATA INITIAL SIZE 6 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;INFILE(20) VALUE &amp;#145;/tmp/bc180_file4&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF INREC.&lt;/P&gt;&lt;P&gt;VENDNUM LIKE LFA1-LIFNR.&lt;/P&gt;&lt;P&gt;STREET LIKE LFA1-STRAS.&lt;/P&gt;&lt;P&gt;END OF INREC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: DISPMODE DEFAULT &amp;#145;A&amp;#146;,&lt;/P&gt;&lt;P&gt;UPDAMODE DEFAULT &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;OPEN DATASET INFILE&lt;/P&gt;&lt;P&gt;FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET INFILE INTO INREC.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;PERFORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146;&lt;/P&gt;&lt;P&gt;USING BDC_TAB&lt;/P&gt;&lt;P&gt;MODE DISPMODE&lt;/P&gt;&lt;P&gt;UPDATE UPDAMODE.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE: /&amp;#145;ERROR&amp;#146;. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;CLOSE DATASET INFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;synchronous updating&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&amp;#133;&amp;#133;&amp;#133;&lt;/P&gt;&lt;P&gt;PERFORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146;&lt;/P&gt;&lt;P&gt;USING BDC_TAB&lt;/P&gt;&lt;P&gt;MODE &amp;#145;N&amp;#146;&lt;/P&gt;&lt;P&gt;UPDATE &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE: /&amp;#145;ERROR&amp;#146;. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asynchronous updating&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&amp;#133;&amp;#133;&amp;#133;&lt;/P&gt;&lt;P&gt;PERFORM FILL_BDC_TAB.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146;&lt;/P&gt;&lt;P&gt;USING BDC_TAB&lt;/P&gt;&lt;P&gt;MODE &amp;#145;N&amp;#146;&lt;/P&gt;&lt;P&gt;UPDATE &amp;#145;A&amp;#146;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt; &amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE: /&amp;#145;ERROR&amp;#146;. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error Handling&lt;/P&gt;&lt;P&gt;Write an error report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send the record(s) in error to an error file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a batch input session with the record(s) in error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To store error messages ( CALL TRANSACTION )&lt;/P&gt;&lt;P&gt;data: begin of Tab_Mess occurs 0.&lt;/P&gt;&lt;P&gt;include structure bdcmsgcoll.&lt;/P&gt;&lt;P&gt;data : end of Tab_Mess,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;FK02&amp;#146; USING BDC_TAB MODE &amp;#145;N&amp;#146; UPDATE &amp;#145;S&amp;#146; &lt;/P&gt;&lt;P&gt;MESSAGES INTO TAB_MESS.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;WRITE: / Tab_MESS-TCODE, Tab_MESS-DYNUMB, Tab_MESS-MSGTYP , &lt;/P&gt;&lt;P&gt;Tab_MESS-MSGID.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am giving you example for Change Vendor you practice for ur tcode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For our example, we will use the &amp;#147;Change Vendor&amp;#148; transaction (&amp;#147;FK02&amp;#148;) to add a street address to an already existing vendor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step #1&lt;/P&gt;&lt;P&gt;Use &amp;#147;System&amp;amp;#61664;Status&amp;#148; menu path to determine online program name (SAPMF02K), screen number (0110)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step #2&lt;/P&gt;&lt;P&gt;Use &amp;#147;F1&amp;#148; key and &amp;#147;Technical Info&amp;#148; pushbutton in each screen field to be filled to determine the field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step #3 &lt;/P&gt;&lt;P&gt;Determine how to proceed in the transaction&lt;/P&gt;&lt;P&gt;(save the record by clicking on the &amp;#145;Save&amp;#146; pushbutton or pressing the &amp;#145;F11&amp;#146; key).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC Table Contents&lt;/P&gt;&lt;P&gt;After researching the transaction we can determine the contents of the BDC table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM DYNPRO DYNBEGIN FNAM FVAL&lt;/P&gt;&lt;P&gt;SAMPF02K 0106 X &lt;/P&gt;&lt;P&gt;RF02K-LIFNR TEST1&lt;/P&gt;&lt;P&gt;RF02K-D0110 X&lt;/P&gt;&lt;P&gt;SAMPF02K 0110 X &lt;/P&gt;&lt;P&gt;LFA1-STRAS 123 Main St.&lt;/P&gt;&lt;P&gt;BDC_OKCODE /11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Batch Input Methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;CALL TRANSACTION USING&amp;#148;&lt;/P&gt;&lt;P&gt;STATEMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call transaction - for data transfer&lt;/P&gt;&lt;P&gt;Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program. &lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;lt;tcode&amp;gt;&lt;/P&gt;&lt;P&gt;USING &amp;lt;bdc_tab&amp;gt;&lt;/P&gt;&lt;P&gt;MODE &amp;lt;mode&amp;gt;&lt;/P&gt;&lt;P&gt;UPDATE &amp;lt;update&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Display all&lt;/P&gt;&lt;P&gt;E Display errors only&lt;/P&gt;&lt;P&gt;N No display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S Synchronous&lt;/P&gt;&lt;P&gt;A Asynchronous&lt;/P&gt;&lt;P&gt;L Local update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The process flow of CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A program that uses CALL TRANSACTION USING to process legacy data should execute thefollowing steps:&lt;/P&gt;&lt;P&gt;Prepare a BDCDATA structure for the transaction that you wish to run. &lt;/P&gt;&lt;P&gt;Prepare a internal table to store error messages Tab_Mess like structure of BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &amp;#145;MM01' USING BDCDATA MODE 'A' UPDATE 'S'. MESSAGES INTO TAB_MESS.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&amp;lt;Error_handling&amp;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;Overview of Batch Input Session&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first batch input method is to create a batch input session. It is the processing of this batch input session that updates the database, not the execution of the batch input program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the below links also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fa/097022543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fa/097022543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this pdf file&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bdcconcept.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bdcconcept.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this for FAQs on BDC&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/question-about-bdc-program.htm" target="test_blank"&gt;http://www.sap-img.com/abap/question-about-bdc-program.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code for call transaction method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this for BDC recording with screen shots&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/bdc.htm" target="test_blank"&gt;http://www.sap-img.com/bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table control in BDC&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check these..&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://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://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="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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;rEWARD IF USEFULL&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 11:12:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-bdc/m-p/3086873#M732095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T11:12:17Z</dc:date>
    </item>
  </channel>
</rss>

