<?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 Give a BDC example by Direct Input Method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896895#M681032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pl give step by step procedure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks guyz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Oct 2007 11:43:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-12T11:43:02Z</dc:date>
    <item>
      <title>Give a BDC example by Direct Input Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896895#M681032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pl give step by step procedure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks guyz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 11:43:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896895#M681032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T11:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Give a BDC example by Direct Input Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896896#M681033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of rec ,&lt;/P&gt;&lt;P&gt;       name(20) type c,&lt;/P&gt;&lt;P&gt;       design(10) type c,&lt;/P&gt;&lt;P&gt;       end of rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data itab1 like table of rec with header line.&lt;/P&gt;&lt;P&gt;data itab like bdcdata occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data messtab like bdcmsgcoll occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data  fname(38) type c value 'C:\NRD.TXT'.&lt;/P&gt;&lt;P&gt;call function 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    filename                      = 'C:\NRD.TXT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILETYPE                      = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    has_field_separator           = 'x'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DAT_MODE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IGNORE_CERR                   = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  REPLACEMENT                   = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CHECK_BOM                     = ' '&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                      = itab1.&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;&lt;/P&gt;&lt;P&gt;*OPEN DATASET  FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;READ DATASET FNAME INTO REC.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 11:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896896#M681033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T11:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Give a BDC example by Direct Input Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896897#M681034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use DI when u r going upload large amount of data for single application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better example where direct input method will be used is... uploading the data for material master.....it includes lot of views so its very much difficult to capture all the views and record the tcode and map the data in such conditions its better to go with DI methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;advantages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in session method or CT method while uploading the data u do the validation by fallowing the screen sequence and field sequence where as in DI validations can be done set of code so this make the process very fast so its advantageous to upload large amout of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you always use the standard sap provided program for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here in DI method very important thing is structure of flat file... so to know the structure first of all you have to download the data for one record into the internal table with the use of the same program then with the use of that structure u have to desing the flat file and upload the data.&lt;/P&gt;&lt;P&gt;&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="954324"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 11:46:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896897#M681034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T11:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Give a BDC example by Direct Input Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896898#M681035</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;this is the common procedure for all BDc programs &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;the BDC program should be in this format&amp;lt;/b&amp;gt; &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;&amp;lt;b&amp;gt;Transaction Recorder (SHDB)&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Upload Flat file from Presentation Server to SAP R/3&amp;lt;/b&amp;gt;&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;U&amp;lt;b&amp;gt;pload file from application server to SAP R/3&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Definition- Declaring BDC Table&amp;lt;/b&amp;gt; &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;&amp;lt;b&amp;gt;Filling BDC Table &amp;#150; Method #1&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Filling BDC Table &amp;#150; Method #2&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Example #1- Declaration Section&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;synchronous updating&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;asynchronous updating&amp;lt;/b&amp;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;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;&amp;lt;b&amp;gt;Error Handling&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Create a batch input session with the record(s) in error.&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;i am giving you example for Change Vendor you practice for ur tcode&amp;lt;/b&amp;gt; &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;&amp;lt;b&amp;gt;Step #1&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Step #2&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Step #3&amp;lt;/b&amp;gt; &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;&amp;lt;b&amp;gt;BDC Table Contents&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Batch Input Methods&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;The process flow of CALL TRANSACTION&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;Overview of Batch Input Session&amp;lt;/b&amp;gt;&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;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward if usefull&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 11:47:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/give-a-bdc-example-by-direct-input-method/m-p/2896898#M681035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-12T11:47:16Z</dc:date>
    </item>
  </channel>
</rss>

