<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: bdc upload file data into internal table problem with gui_upload fm in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780200#M909589</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;Change the field separator to '#' from 'X'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pranav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Apr 2008 16:05:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-30T16:05:14Z</dc:date>
    <item>
      <title>bdc upload file data into internal table problem with gui_upload fm</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780199#M909588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;my coding is like this ..&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0 .&lt;/P&gt;&lt;P&gt;field1 like mara-matnr,&lt;/P&gt;&lt;P&gt;field2......&lt;/P&gt;&lt;P&gt;etc,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;data: file1 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter :file like rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;static = 'X' &lt;/P&gt;&lt;P&gt;mask = space&lt;/P&gt;&lt;P&gt;field_name = 'FILE'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;file_name = file.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;FILE1 = FILE . "HERE I AM PASSING INTO STRING&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 = FILE1&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;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.&lt;/P&gt;&lt;P&gt;file structure is same as the internal table.&lt;/P&gt;&lt;P&gt;I stored the file as .txt( ie in notepad).&lt;/P&gt;&lt;P&gt;my file is like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10000 200 323 sunndarrr.......&lt;/P&gt;&lt;P&gt;i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i am using the ws_upload it is working fine.&lt;/P&gt;&lt;P&gt;please guide me where i have done the mistake.&lt;/P&gt;&lt;P&gt;thank you so much for all the replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 16:01:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780199#M909588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T16:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: bdc upload file data into internal table problem with gui_upload fm</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780200#M909589</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;Change the field separator to '#' from 'X'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pranav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 16:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780200#M909589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T16:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: bdc upload file data into internal table problem with gui_upload fm</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780201#M909590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have a look on the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: kna1.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab1 OCCURS 0,&lt;/P&gt;&lt;P&gt;      str(255),&lt;/P&gt;&lt;P&gt;      END OF itab1.&lt;/P&gt;&lt;P&gt;DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                = 'D:\ABAP EVE\ffile1.txt'&lt;/P&gt;&lt;P&gt;    filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                = itab1&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;    no_authority            = 10&lt;/P&gt;&lt;P&gt;    OTHERS                  = 11.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  WRITE:/ 'sorry'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  LOOP AT itab1.&lt;/P&gt;&lt;P&gt;    SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.&lt;/P&gt;&lt;P&gt;    APPEND itab2.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    LOOP AT itab2.&lt;/P&gt;&lt;P&gt;      WRITE:/ itab2-kunnr,itab2-name1.&lt;/P&gt;&lt;P&gt;      INSERT INTO kna1 VALUES itab2.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      WRITE:/ 'inserted'.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      WRITE:/ 'not inserted'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    WRITE:/ 'fail'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flat file:&lt;/P&gt;&lt;P&gt;10001,Sadney&lt;/P&gt;&lt;P&gt;10003,Yogesh&lt;/P&gt;&lt;P&gt;20005,Madan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.U need to define internal table with one field of max size&lt;/P&gt;&lt;P&gt;2.upload the flat file data into that internal table&lt;/P&gt;&lt;P&gt;3.split that internal table data into another internal table(having fields)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Chandu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 16:05:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780201#M909590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T16:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: bdc upload file data into internal table problem with gui_upload fm</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780202#M909591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shiva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont forget to handle the exceptions..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: i_dwl type standard table of string.

  call function 'GUI_UPLOAD'
    exporting
      filename                = vl_fname
      filetype                = 'ASC'
      has_field_separator     = ' '
    tables
      data_tab                = i_dwl
    exceptions
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      others                  = 17.
  if sy-subrc &amp;lt;&amp;gt; 0.
    message e074(zv).
  endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 17:35:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-file-data-into-internal-table-problem-with-gui-upload-fm/m-p/3780202#M909591</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-04-30T17:35:05Z</dc:date>
    </item>
  </channel>
</rss>

