<?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: Import/export not working as expected in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244456#M1013119</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Plz use FILE_TYPE as 'DAT' in place of  'ASC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2008 07:37:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-07T07:37:52Z</dc:date>
    <item>
      <title>Import/export not working as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244451#M1013114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Z_DEX_SS_CUSTOMER_CREATE.&lt;/P&gt;&lt;P&gt;tables:zcustomer,ztransform.&lt;/P&gt;&lt;P&gt;data:itab_bapiname like ztransform occurs 10 with header line.&lt;/P&gt;&lt;P&gt;data:gs_return like bapireturn1,&lt;/P&gt;&lt;P&gt;     gs_customerno like bapikna103-customer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     gs_bapikna101_1 like table of bapikna101_1 with header line,&lt;/P&gt;&lt;P&gt;     gs_bapikna101_1_gwa like bapikna101_1,&lt;/P&gt;&lt;P&gt;     gs_bapikna105 like table of bapikna105 with header line,&lt;/P&gt;&lt;P&gt;     gs_bapikna105_gwa like bapikna105,&lt;/P&gt;&lt;P&gt;     gs_bapikna106 like table of bapikna106 with header line,&lt;/P&gt;&lt;P&gt;     gs_bapikna106_gwa like bapikna106,&lt;/P&gt;&lt;P&gt;     gs_bapikna102 like table of bapikna102 with header line,&lt;/P&gt;&lt;P&gt;     gs_bapikna102_gwa like bapikna102.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:offset_data(10) value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Dynamic program table definition&lt;/P&gt;&lt;P&gt;data: begin of dyntabl occurs 10,&lt;/P&gt;&lt;P&gt;      line(200),&lt;/P&gt;&lt;P&gt;      end of dyntabl.&lt;/P&gt;&lt;P&gt;data:dynlength(3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Temporary spec table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data:begin of spec_initial occurs 10,&lt;/P&gt;&lt;P&gt;     row(150),&lt;/P&gt;&lt;P&gt;     end of spec_initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Specification table decleration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data:begin of spec occurs 10,&lt;/P&gt;&lt;P&gt;     fieldname(20),&lt;/P&gt;&lt;P&gt;     field_type(20),&lt;/P&gt;&lt;P&gt;     field_length(20),&lt;/P&gt;&lt;P&gt;     field_offset(20),&lt;/P&gt;&lt;P&gt;     sap_fieldname(30),&lt;/P&gt;&lt;P&gt;     end of spec.&lt;/P&gt;&lt;P&gt;data:cust_bapiname(30).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Temporary item data table decleration&lt;/P&gt;&lt;P&gt;data:begin of temp_data_table occurs 10,&lt;/P&gt;&lt;P&gt;     line(3000),&lt;/P&gt;&lt;P&gt;     end of temp_data_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Final item data table decleration&lt;/P&gt;&lt;P&gt;data:data_table like zcustomer occurs 10 with header line.&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;call function 'UPLOAD'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;    filename = 'D:\SAPSWITCH\Customer files\custspec1.TXT'&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;/UL&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;    data_tab = spec_initial&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;    file_open_error               = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at spec_initial.&lt;/P&gt;&lt;P&gt;     split spec_initial-row at ' ' into spec-fieldname spec-field_type spec-field_length spec-field_offset spec-sap_fieldname.&lt;/P&gt;&lt;P&gt;     append spec.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    insert into zspec_CUSTOMER values spec.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Uploading the  Data File.&lt;/P&gt;&lt;P&gt;     call function 'UPLOAD'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;    filename =  'D:\SAPSWITCH\Customer files\customerdata.TXT'&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;/UL&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;    data_tab = temp_data_table&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;    file_open_error               = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Transfering values from the item data flat file to the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    delete from zcustomer.&lt;/P&gt;&lt;P&gt;    loop at temp_data_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at spec.&lt;/P&gt;&lt;P&gt;    data_table&lt;EM&gt;offset_data = temp_data_table&lt;/EM&gt;spec-field_offset(spec-field_length).&lt;/P&gt;&lt;P&gt;    offset_data = offset_data + 40.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append data_table.&lt;/P&gt;&lt;P&gt;    insert into zcustomer values data_table.&lt;/P&gt;&lt;P&gt;    offset_data = 0.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select * from ztransform into table itab_bapiname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Moving values to the Bapi fields dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dyntabl-line = 'program zdynpro.'. append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'tables:zcustomer.'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'Data:itab_data like zcustomer occurs 10 with header line.'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'Data:gs_bapikna101_1 like table of bapikna101_1 with header line,'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'gs_bapikna105 like table of bapikna105 with header line,'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'gs_bapikna106 like table of bapikna106 with header line,'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'gs_bapikna102 like table of bapikna102 with header line,'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'offset_data(10) value 0.'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'select * from zcustomer into table itab_data.'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'LOOP AT ITAB_data.'.append dyntabl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at spec.&lt;/P&gt;&lt;P&gt;loop at itab_bapiname where sap_field = spec-sap_fieldname.&lt;/P&gt;&lt;P&gt;cust_bapiname = itab_bapiname-bapi_field.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;dyntabl-line = cust_bapiname.&lt;/P&gt;&lt;P&gt;dynlength = strlen( dyntabl-line ).&lt;/P&gt;&lt;P&gt;dynlength = dynlength + 1.&lt;/P&gt;&lt;P&gt;dyntabl-line+dynlength = '='.&lt;/P&gt;&lt;P&gt;dynlength = dynlength + 2.&lt;/P&gt;&lt;P&gt;dyntabl-line&lt;EM&gt;dynlength = 'itab_data&lt;/EM&gt;offset_data(40).'.&lt;/P&gt;&lt;P&gt;*dynlength = strlen( dyntabl-line ).&lt;/P&gt;&lt;P&gt;*dyntabl-line+dynlength = '.'.&lt;/P&gt;&lt;P&gt;append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'offset_data = offset_data + 40.'.append dyntabl.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'offset_data = 0.'.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'append gs_bapikna105. append gs_bapikna106. append gs_bapikna102.'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'endloop.'.append dyntabl.&lt;/P&gt;&lt;P&gt;dyntabl-line = 'export gs_bapikna101_1 gs_bapikna105 gs_bapikna106 gs_bapikna102 TO MEMORY ID ''DEX''.'.append dyntabl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert report 'zdynpro' from dyntabl.&lt;/P&gt;&lt;P&gt;submit zdynpro and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*LOOP AT DYNTABL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE DYNTABL.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;&lt;STRONG&gt;import gs_bapikna101_1 gs_bapikna105 gs_bapikna106 gs_bapikna102 from MEMORY ID 'DEX'.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; loop at gs_bapikna101_1 from 1 to 1 into gs_bapikna101_1_gwa.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt; loop at gs_bapikna105 from 1 to 1 into gs_bapikna105_gwa.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt; loop at gs_bapikna102 from 1 to 1 into gs_bapikna102_gwa.&lt;/P&gt;&lt;P&gt; endloop.&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;The section under consideration ive made bold and italised it.&lt;/P&gt;&lt;P&gt;Im calling another program dynamically and in that program im exporting some date to the sap memory.However when i import it from my program im unable to view the values. Why is that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 06:45:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244451#M1013114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T06:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Import/export not working as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244452#M1013115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is an example for successfully using IMPORT and EXPORT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORT ws_samepo TO loc_x FROM MEMORY ID 'SAMEPO'.*&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;STRONG&gt;EXPORT ws_samepo = loc_x TO MEMORY ID 'SAMEPO'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pleaes use same variable name for IMPORT and EXPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishnendu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 06:51:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244452#M1013115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T06:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Import/export not working as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244453#M1013116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ive used the syntax which i mentioned before and it works absolutely fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure in the import statement there is import to?&lt;/P&gt;&lt;P&gt;And does that variable have to be defined?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 07:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244453#M1013116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T07:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import/export not working as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244454#M1013117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dexter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if memory ID is same while EXPORT AND IMPORT.&lt;/P&gt;&lt;P&gt;Also check field types are same and in same order in both EXPORT AND IMPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you check what is sy-subrc before IMPORT.&lt;/P&gt;&lt;P&gt;It will be also good to check if sy-subrc is 0 after EXPORT in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 07:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244454#M1013117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T07:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import/export not working as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244455#M1013118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes &lt;STRONG&gt;to&lt;/STRONG&gt; will be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you have to define those variables.&lt;/P&gt;&lt;P&gt;Hope it will work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishnendu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 07:35:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244455#M1013118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T07:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Import/export not working as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244456#M1013119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Plz use FILE_TYPE as 'DAT' in place of  'ASC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 07:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244456#M1013119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T07:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Import/export not working as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244457#M1013120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry but it was a silly mistake on m,y part and not a syntax error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 07:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/import-export-not-working-as-expected/m-p/4244457#M1013120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T07:43:27Z</dc:date>
    </item>
  </channel>
</rss>

