<?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 file interfaces in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297813#M789248</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 ABAP. i have some queries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a comma delimited file with me(6 fields).&lt;/P&gt;&lt;P&gt;i want to read this file and then update a database table in sap using file interfaces.also can you please explain how to read the data correctly from the flat file for each field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My email id Is anandkk99@gmail.com if you hav any good example codes or good tutorials or materials related to file interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will reward points for each reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2008 05:31:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-24T05:31:09Z</dc:date>
    <item>
      <title>file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297813#M789248</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 ABAP. i have some queries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a comma delimited file with me(6 fields).&lt;/P&gt;&lt;P&gt;i want to read this file and then update a database table in sap using file interfaces.also can you please explain how to read the data correctly from the flat file for each field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My email id Is anandkk99@gmail.com if you hav any good example codes or good tutorials or materials related to file interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will reward points for each reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 05:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297813#M789248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297814#M789249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;USE the BDC or LSMW. These are used to update the master data or transactional data from flat file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fa/097140543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fa/097140543b11d1898e0000e8322d00/frameset.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;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;LSMW&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/sap-data-migration.htm" target="test_blank"&gt;http://www.sap-img.com/sap-data-migration.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/saptech/lsmw.htm" target="test_blank"&gt;http://www.sapgenie.com/saptech/lsmw.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf" target="test_blank"&gt;http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary" target="test_blank"&gt;http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the two links which contains lots of PDFS:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.consolut.de/saphelp/sap_online_help.html" target="test_blank"&gt;http://www.consolut.de/saphelp/sap_online_help.html&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, 24 Jan 2008 05:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297814#M789249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297815#M789250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Batch Data Communication (BDC) is the oldest one. BDC is not bi-directional; it is an integration tool in its typical form. It can only be used for uploading data into RJ3. BDC works through an ABAP program and works on the principle of simulating user input for transactional screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose of the Batch Data Communication is to transfer data. The BDC can transfer data from one SAP System to another SAP System or can transfer data from non-SAP System to SAP System too. To transfer data BDC uses normal transaction codes. Two methods are provided to BDC to do this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP has provided two different types of methods for BDC to do its work. Among these, the first one is called the classical method or session method. Through this method the data can be read by the BDC program from a sequential dataset file. This sequential dataset file is stored in batch-input session. In order to .run the transaction in this session, what one needs is to execute the session. For this, follow these few steps: you can start and subsequently monitor the session firstly from &amp;#150; System à Services à Batch Input or have the session run in the background. In this method to generate the required session, you have to use the function module BDC _ NSERT and BDC _CLOSE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second method the BDC has to use the ABAP statement CALL TRANSACTION USING statement to run a transaction. In the second method, unlike in the first type, you do not need BDC to create a session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During the process of data transfer, data is transferred into the SAP R/3 System. This transfer is from an external system to SAP R/3 system. Whenever you transfer data from an external system into an R/3 System, you can use data transfer because it is installed and regularly transfers data from an external system into an R/3 System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct Input: In this method the SAP function modules execute the consistency checks. However, there are other means of checking with the help of screens. The Direct Input Method has considerable performance advantages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Transaction: In this method you can check the data consistency with the help of screen logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Batch Input Session: In this method data consistency is checked with the help of screen logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please refer the following site,it will be very helpful.&lt;/P&gt;&lt;P&gt;&lt;A href="http://aspalliance.com/1130_Batch_Data_Communication_BDC_in_SAP_R3.7" target="test_blank"&gt;http://aspalliance.com/1130_Batch_Data_Communication_BDC_in_SAP_R3.7&lt;/A&gt;&lt;/P&gt;&lt;P&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;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html" target="test_blank"&gt;http://sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html&lt;/A&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;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;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;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;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;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 05:36:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297815#M789250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297816#M789251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your replies but could you please send me according to file interfaces(i.i.opendataset,closedataset etc.) and not BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 05:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297816#M789251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297817#M789252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your replies but could you please send me according to file interfaces(i.i.opendataset,closedataset etc.) and not BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 05:43:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297817#M789252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297818#M789253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First i will explain the procedure step by step and will send a sample code plz check it once ok..And also i will attach a flat file at the end of SAMPLE CODE CHECK IT ONCE OK..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;1.Bulid an internal table first according to ur flat file fields.&lt;/P&gt;&lt;P&gt;2.select the flat file by using PARAMETER.&lt;/P&gt;&lt;P&gt;3.And assign that file path to GUI_UPLOAD function module.&lt;/P&gt;&lt;P&gt;4.Call BDC_OPEN_GROUP is used to open the session.&lt;/P&gt;&lt;P&gt;5.loop that flat file data and palce BDC_INSERT funtion module in that loop for uploading data into database table&lt;/P&gt;&lt;P&gt;6.After loop call BDC_CLOSE_GROUP to close the session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAMPLE CODE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ybdc_session_mm01 NO STANDARD PAGE HEADING LINE-SIZE 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Global Structure for BDC Data &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;DATA: it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal Table &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mbrsh LIKE rmmg1-mbrsh,&lt;/P&gt;&lt;P&gt;mtart LIKE rmmg1-mtart,&lt;/P&gt;&lt;P&gt;maktx LIKE makt-maktx,&lt;/P&gt;&lt;P&gt;meins LIKE mara-meins,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload the flat file &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&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 =&lt;/P&gt;&lt;P&gt;'C:\Documents and Settings\Compaq_Owner\Desktop\satish\mm01.txt'&lt;/P&gt;&lt;P&gt;filetype = 'ASC'&lt;/P&gt;&lt;P&gt;has_field_separator = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HEADER_LENGTH = 0 &lt;/P&gt;&lt;P&gt;READ_BY_LINE = 'X' &lt;/P&gt;&lt;P&gt;DAT_MODE = ' ' &lt;/P&gt;&lt;P&gt;IMPORTING &lt;/P&gt;&lt;P&gt;FILELENGTH = &lt;/P&gt;&lt;P&gt;HEADER = &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1 &lt;/P&gt;&lt;P&gt;FILE_READ_ERROR = 2 &lt;/P&gt;&lt;P&gt;NO_BATCH = 3 &lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 4 &lt;/P&gt;&lt;P&gt;INVALID_TYPE = 5 &lt;/P&gt;&lt;P&gt;NO_AUTHORITY = 6 &lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 7 &lt;/P&gt;&lt;P&gt;BAD_DATA_FORMAT = 8 &lt;/P&gt;&lt;P&gt;HEADER_NOT_ALLOWED = 9 &lt;/P&gt;&lt;P&gt;SEPARATOR_NOT_ALLOWED = 10 &lt;/P&gt;&lt;P&gt;HEADER_TOO_LONG = 11 &lt;/P&gt;&lt;P&gt;UNKNOWN_DP_ERROR = 12 &lt;/P&gt;&lt;P&gt;ACCESS_DENIED = 13 &lt;/P&gt;&lt;P&gt;DP_OUT_OF_MEMORY = 14 &lt;/P&gt;&lt;P&gt;DISK_FULL = 15 &lt;/P&gt;&lt;P&gt;DP_TIMEOUT = 16 &lt;/P&gt;&lt;P&gt;OTHERS = 17 &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&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;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Session Method Starts &lt;/P&gt;&lt;P&gt;BDC_OPEN_GROUP &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEST = FILLER8 &lt;/P&gt;&lt;P&gt;GROUP = 'ychinnu'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOLDDATE = FILLER8 &lt;/P&gt;&lt;P&gt;KEEP = 'X'&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RECORD = FILLER1 &lt;/P&gt;&lt;P&gt;PROG = SY-CPROG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING &lt;/P&gt;&lt;P&gt;QID = &lt;/P&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 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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create BDCDATA Structure &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*include bdcrecx1.&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;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM open_group. &lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RMMG1-MTART'.&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'RMMG1-MBRSH'&lt;/P&gt;&lt;P&gt;itab-mbrsh.&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'RMMG1-MTART'&lt;/P&gt;&lt;P&gt;itab-mtart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After enterning MBRSH,MTART we press enter &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'. "press Enter&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MSICHTAUSW-DYTXT(01)'.&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;View selection (Basic data1) &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'"view selection&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select Tick Mark (ok) &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=BU'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;itab-maktx.&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MARA-MEINS'.&lt;/P&gt;&lt;P&gt;PERFORM bdc_field USING 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;itab-meins.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally after filling the data we save the data. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;PERFORM bdc_field USING 'MARA-MTPOS_MARA' "For saving&lt;/P&gt;&lt;P&gt;'NORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM bdc_transaction USING 'MM01'. &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM close_group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_INSERT &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = 'MM01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POST_LOCAL = NOVBLOCAL &lt;/P&gt;&lt;P&gt;PRINTING = NOPRINT &lt;/P&gt;&lt;P&gt;SIMUBATCH = ' ' &lt;/P&gt;&lt;P&gt;CTUPARAMS = ' ' &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;dynprotab = it_bdcdata&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 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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refresh BDCDATA &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;refresh it_bdcdata.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Closing BDC Group &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&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 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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start new screen * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_dynpro USING program dynpro.&lt;/P&gt;&lt;P&gt;CLEAR it_bdcdata.&lt;/P&gt;&lt;P&gt;it_bdcdata-program = program.&lt;/P&gt;&lt;P&gt;it_bdcdata-dynpro = dynpro.&lt;/P&gt;&lt;P&gt;it_bdcdata-dynbegin = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_bdcdata.&lt;/P&gt;&lt;P&gt;ENDFORM. "BDC_DYNPRO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insert field * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_field USING fnam fval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF FVAL NODATA. &lt;/P&gt;&lt;P&gt;CLEAR it_bdcdata.&lt;/P&gt;&lt;P&gt;it_bdcdata-fnam = fnam.&lt;/P&gt;&lt;P&gt;it_bdcdata-fval = fval.&lt;/P&gt;&lt;P&gt;APPEND it_bdcdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;ENDFORM. "BDC_FIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flat File &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;*M FERT IRON KG&lt;/P&gt;&lt;P&gt;*M ROH STEEL KG&lt;/P&gt;&lt;P&gt;*M HALB IRON KG&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 05:48:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297818#M789253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297819#M789254</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;Features :&lt;/P&gt;&lt;P&gt;BDC is an automatic procedure.&lt;/P&gt;&lt;P&gt;This method is used to transfer large amount of data that is available in electronic medium.&lt;/P&gt;&lt;P&gt;BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).&lt;/P&gt;&lt;P&gt;BDC uses normal transaction codes to transfer data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types of BDC :&lt;/P&gt;&lt;P&gt;CLASSICAL BATCH INPUT (Session Method)&lt;/P&gt;&lt;P&gt;CALL TRANSACTION &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;Reward points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 05:49:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297819#M789254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297820#M789255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the links for SESSION method in BDC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.abapprogramming.blogspot.com/2007/09/bdc-1.html" target="test_blank"&gt;http://www.abapprogramming.blogspot.com/2007/09/bdc-1.html&lt;/A&gt;&lt;/P&gt;&lt;P&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;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4565634"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://aspalliance.com/1130_Batch_Data_Communication_BDC_in_SAP_R3" target="test_blank"&gt;http://aspalliance.com/1130_Batch_Data_Communication_BDC_in_SAP_R3&lt;/A&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>Thu, 24 Jan 2008 05:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297820#M789255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T05:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297821#M789256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your replies but could you please send me according to file interfaces(i.i.opendataset,closedataset etc.) and NOT BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 06:00:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297821#M789256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T06:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: file interfaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297822#M789257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ABAP/4 provides the following statements for handling files on the application server&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OPEN DATASET&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CLOSE DATASET&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DELETE DATASET&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;READ DATASET&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TRANSFER&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To open a sequential file on the application server, use the OPEN DATASET &amp;lt;file name&amp;gt; options statement .&lt;/P&gt;&lt;P&gt;Use the &amp;#147;FOR&amp;#148; options to specify the access mode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR INPUT (default) opens an existing file for reading.&lt;/P&gt;&lt;P&gt;FOR OUTPUT opens a file for writing. If the file does not exist, it is created. If the file already exists, its contents are deleted.&lt;/P&gt;&lt;P&gt;FOR APPENDING opens a file for writing. If the file does not exist, it is created. If the file already exists, the system goes to the end of the file to add to it.&lt;/P&gt;&lt;P&gt;Use the &amp;#147;IN&amp;#148; options to specify the structure of the file:&lt;/P&gt;&lt;P&gt;IN BINARY MODE (default) indicates that the file is not structured in lines (i.e., it is set up byte-by-byte).&lt;/P&gt;&lt;P&gt;IN TEXT MODE indicates that the file is structured in lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the &amp;#147;MESSAGE &amp;lt;field&amp;gt;&amp;#148; addition, a system message issued when opening the file will be placed in the character-type &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;The &amp;#147;AT POSITION &amp;lt;position&amp;gt;&amp;#148; addition opens the file at a specific &amp;lt;position&amp;gt;, indicated in bytes from the beginning of the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To read a sequential file on the application server, use the &amp;#147;READ DATASET&amp;#148; statement. The basic syntax of this statement is:&lt;/P&gt;&lt;P&gt;READ DATASET &amp;lt;file name&amp;gt; INTO &amp;lt;structure&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To write to a sequential file on the application server, use the &amp;#147;TRANSFER&amp;#148; statement. The basic syntax of this statement is:&lt;/P&gt;&lt;P&gt;TRANSFER &amp;lt;structure&amp;gt; TO &amp;lt;file name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To close a sequential file on the application server, use the &amp;#147;CLOSE DATASET&amp;#148; statement. The basic syntax of this statement is:&lt;/P&gt;&lt;P&gt;CLOSE DATASET &amp;lt;file name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To delete a sequential file on the application server, use the &amp;#147;DELETE DATASET&amp;#148; statement. The basic syntax of this statement is:&lt;/P&gt;&lt;P&gt;DELETE DATASET &amp;lt;file name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Y180DM02.&lt;/P&gt;&lt;P&gt;TABLES: KNA1.&lt;/P&gt;&lt;P&gt;PARAMETERS:&lt;/P&gt;&lt;P&gt;OUTFILE(20) DEFAULT &amp;#145;/tmp/bc180_file1&amp;#146;&lt;/P&gt;&lt;P&gt;LOWER CASE,&lt;/P&gt;&lt;P&gt;STATE LIKE KNA1-REGIO DEFAULT &amp;#145;MA&amp;#146;.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF OUTREC,&lt;/P&gt;&lt;P&gt;KUNNR LIKE KNA1-KUNNR,&lt;/P&gt;&lt;P&gt;REGIO LIKE KNA1-REGIO,&lt;/P&gt;&lt;P&gt;TELF1 LIKE KNA1-TELF1,&lt;/P&gt;&lt;P&gt;END OF OUTREC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET OUTFILE FOR OUTPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 WHERE REGIO = STATE.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING KNA1 TO OUTREC.&lt;/P&gt;&lt;P&gt;TRANSFER OUTREC TO OUTFILE.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;CLOSE DATASET OUTFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example above, we are creating a file with customer information. Specifically, we are transferring the customer number, state, and telephone number (for all customers in a particular state) from the KNA1 table to the &amp;#145;/tmp/bc180_file1&amp;#146; file on the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/content.htm&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3d42358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3d42358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 06:03:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-interfaces/m-p/3297822#M789257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T06:03:14Z</dc:date>
    </item>
  </channel>
</rss>

