<?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: BAD DATA FORMAT using cl_gui_frontend_services=&amp;gt;gui_upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894215#M373885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : mara.&lt;/P&gt;&lt;P&gt;types : begin of t_mara,&lt;/P&gt;&lt;P&gt;         matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;         sno type I,&lt;/P&gt;&lt;P&gt;         meins type mara-meins,&lt;/P&gt;&lt;P&gt;        end of t_mara.&lt;/P&gt;&lt;P&gt;data : it_mara type standard table of t_mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                = 'C:\Documents and Settings\sreenivasulup\Desktop\file.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;    DAT_MODE                = 'X'&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    data_tab                = it_mara[]&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;    NOT_SUPPORTED_BY_GUI    = 17&lt;/P&gt;&lt;P&gt;    ERROR_NO_GUI            = 18&lt;/P&gt;&lt;P&gt;    others                  = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  loop at it_mara.&lt;/P&gt;&lt;P&gt;    write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; it_mara-matnr,&lt;/P&gt;&lt;P&gt;             it_mara-sno,&lt;/P&gt;&lt;P&gt;             it_mara-meins.&lt;/P&gt;&lt;P&gt;  endloop.&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;Flat file structure like the following way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SREE_MAT014	1	KG&lt;/P&gt;&lt;P&gt;SREE_MAT015	2	KG&lt;/P&gt;&lt;P&gt;SREE_MAT016	3	KG&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jan 2007 19:48:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-17T19:48:16Z</dc:date>
    <item>
      <title>BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894208#M373878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAPients!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the method cl_gui_frontend_services=&amp;gt;gui_upload to upload a file to my program like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = lvs_input_f1&lt;/P&gt;&lt;P&gt;      filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      data_tab                = in_rec[]&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;      not_supported_by_gui    = 17&lt;/P&gt;&lt;P&gt;      error_no_gui            = 18&lt;/P&gt;&lt;P&gt;      OTHERS                  = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SY-.SUBRC field always returns with a value of 8 (Bad data format?). The thing is that the last field of the structure IN_REC is of type i (integer) and I think this is the problem. I modified the file with a text editor and set the last field with 2, 4, 8 and 16 chars but I always receive the same error. I can't change the last field to char. Does any one have an idea of what is the problem? How can I ensure that the last field have an integer value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 18:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894208#M373878</guid>
      <dc:creator>ricardo_fernndezvzquez3</dc:creator>
      <dc:date>2007-01-17T18:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894209#M373879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want, you can send me a copy of the file and the program code and I can test it out here.  See my email address on my business card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 18:50:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894209#M373879</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-17T18:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894210#M373880</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 encountered a similar problem. It looks like only the key fields of a structure can be integers when working with alv. We also had a date field, and when the end users tried to sort on this field it gave them some weird result since the systems considers the dates as chars. I solved this by entering the date as yyyymmdd. This way the sorting works eg 2001 01 01 then 2001 01 12 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope to see if there is another way of solving this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kevin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 19:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894210#M373880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T19:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894211#M373881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry read to quick. My answer isn't really related.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 19:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894211#M373881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T19:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894212#M373882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : mara.&lt;/P&gt;&lt;P&gt;types : begin of t_mara,&lt;/P&gt;&lt;P&gt;         matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;         meins type mara-meins,&lt;/P&gt;&lt;P&gt;        end of t_mara.&lt;/P&gt;&lt;P&gt;data : it_mara type standard table of t_mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                = 'C:\Documents and Settings\sreenivasulup\Desktop\mat_file.txt'&lt;/P&gt;&lt;P&gt;    FILETYPE                = 'ASC'&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    data_tab                = it_mara[]&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;    NOT_SUPPORTED_BY_GUI    = 17&lt;/P&gt;&lt;P&gt;    ERROR_NO_GUI            = 18&lt;/P&gt;&lt;P&gt;    others                  = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  loop at it_mara.&lt;/P&gt;&lt;P&gt;    write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; it_mara-matnr,&lt;/P&gt;&lt;P&gt;             it_mara-meins.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The flat file Structure as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SREE_MAT011       KG&lt;/P&gt;&lt;P&gt;SREE_MAT012       KG&lt;/P&gt;&lt;P&gt;SREE_MAT013       KG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 19:12:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894212#M373882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T19:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894213#M373883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I have modified the code a bit,  you might want to try it.  First upload to a table of type STRING, then move the values to the other internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data: begin of in_rec occurs 0,
         matnr(18),        "Material Number
         bwkey like mbew-bwkey,         " For Plant
         werks like mbew-bwkey,         " Add Plant
         type(2) type c,                " TYPE.
         cname(50) type c,              " Changble Name
         bom(1) type c,                 " BOM Usage
         task(2) type c,                " task type
         verid_nd like ckmlmv001-verid_nd,  "Production Version
         perc(16) type c,               " Percent for Plant1
* above are user inputs ; below are program flag.
         flag(1) type c,                " Program flag.
         kalnr like ckmlmv001-kalnr,     "
         mix_flag(1) type c,                " Program flag.
         cnt type i,
      end of in_rec.

data: istr type table of string with header line.

parameters: p_file type localfile.


at selection-screen on value-request for p_file.

  data retfiletable type filetable.
  data retrc type sysubrc.
  data retuseraction type i.

  call method cl_gui_frontend_services=&amp;gt;file_open_dialog
    exporting
      multiselection    = abap_false
    changing
      file_table        = retfiletable
      rc                = retrc
      user_action       = retuseraction.
  read table retfiletable into p_file index 1.

start-of-selection.

  perform open_file.




*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  OPEN_FILE
*&amp;amp;---------------------------------------------------------------------*
form open_file.
*------------------------ Begin Change - UN001 ------------------------*
*  CALL FUNCTION 'WS_UPLOAD'
*    EXPORTING
*      filename = input_f1
*      filetype = 'DAT'
*    TABLES
*      data_tab = in_rec.
  data:
    lvs_input_f1 type string.              " To store filename
*    lit_mat_tbl  TYPE TABLE OF lt_raw_tab, " To store file lines
*    lwa_mat_tbl  TYPE lt_raw_tab.          " Work area
*
  lvs_input_f1 = p_file.
*    lvs_input_f1 = input_f1.

  call method cl_gui_frontend_services=&amp;gt;gui_upload
    exporting
      filename                = lvs_input_f1
      filetype                = 'ASC'
    changing
      data_tab                = istr[]
    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                  = 19.


  if sy-subrc ne 0.
*    WRITE / text-e01.
    message e000(fb) with text-e01.
  endif.


  loop at istr.
    in_rec = istr.
    append in_rec.
  endloop.

  loop at in_rec.
    write:/ in_rec.
  endloop.

*------------------------ End Change   - UN001 ------------------------*

*SKD 08/02/06---------DEVK980441-----------v
  delete in_rec where perc = 0.
*SKD 08/02/06---------DEVK980441-----------^

endform.                    "OPEN_FILE

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 19:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894213#M373883</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-17T19:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894214#M373884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sreeni, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate you take the time to answer, but I don't have problems when all the fields are of type Char, the problem occurs because the last field is of type I. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the structure where I'm trying to load the data from the file:&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF in_rec OCCURS 0,&lt;/P&gt;&lt;P&gt;         matnr(18),        "Material Number&lt;/P&gt;&lt;P&gt;         bwkey LIKE mbew-bwkey,         " For Plant&lt;/P&gt;&lt;P&gt;         werks LIKE mbew-bwkey,         " Add Plant&lt;/P&gt;&lt;P&gt;         type(2) TYPE c,                " TYPE.&lt;/P&gt;&lt;P&gt;         cname(50) TYPE c,              " Changble Name&lt;/P&gt;&lt;P&gt;         bom(1) TYPE c,                 " BOM Usage&lt;/P&gt;&lt;P&gt;         task(2) TYPE c,                " task type&lt;/P&gt;&lt;P&gt;         verid_nd LIKE ckmlmv001-verid_nd,  "Production Version&lt;/P&gt;&lt;P&gt;         perc(16) TYPE c,               " Percent for Plant1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;above are user inputs ; below are program flag.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         flag(1) TYPE c,                " Program flag.&lt;/P&gt;&lt;P&gt;         kalnr LIKE ckmlmv001-kalnr,     "&lt;/P&gt;&lt;P&gt;         mix_flag(1) TYPE c,                " Program flag.&lt;/P&gt;&lt;P&gt;         cnt TYPE i, &lt;/P&gt;&lt;P&gt;      END OF in_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see the CNT field is of type i (integer) and for some reason the system can't interpret that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 19:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894214#M373884</guid>
      <dc:creator>ricardo_fernndezvzquez3</dc:creator>
      <dc:date>2007-01-17T19:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894215#M373885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : mara.&lt;/P&gt;&lt;P&gt;types : begin of t_mara,&lt;/P&gt;&lt;P&gt;         matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;         sno type I,&lt;/P&gt;&lt;P&gt;         meins type mara-meins,&lt;/P&gt;&lt;P&gt;        end of t_mara.&lt;/P&gt;&lt;P&gt;data : it_mara type standard table of t_mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                = 'C:\Documents and Settings\sreenivasulup\Desktop\file.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;    DAT_MODE                = 'X'&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    data_tab                = it_mara[]&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;    NOT_SUPPORTED_BY_GUI    = 17&lt;/P&gt;&lt;P&gt;    ERROR_NO_GUI            = 18&lt;/P&gt;&lt;P&gt;    others                  = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  loop at it_mara.&lt;/P&gt;&lt;P&gt;    write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; it_mara-matnr,&lt;/P&gt;&lt;P&gt;             it_mara-sno,&lt;/P&gt;&lt;P&gt;             it_mara-meins.&lt;/P&gt;&lt;P&gt;  endloop.&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;Flat file structure like the following way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SREE_MAT014	1	KG&lt;/P&gt;&lt;P&gt;SREE_MAT015	2	KG&lt;/P&gt;&lt;P&gt;SREE_MAT016	3	KG&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 19:48:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894215#M373885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T19:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894216#M373886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your solution and get the error ""IN_REC" and "ISTR" are not mutually convertible in a Unicode program". I forgot to mention that we are converting everything to be Unicode enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried to move the fields based on the offset, one by one but when I get to the integer field, it fails.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 20:27:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894216#M373886</guid>
      <dc:creator>ricardo_fernndezvzquez3</dc:creator>
      <dc:date>2007-01-17T20:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894217#M373887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you get rid of the || at the end of each line?  If so, do so, because this is causing your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 20:28:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894217#M373887</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-17T20:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: BAD DATA FORMAT using cl_gui_frontend_services=&gt;gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894218#M373888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you fix your problem; I have similar problem uploading files to a structure with INT4 data type&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 22:11:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bad-data-format-using-cl-gui-frontend-services-gt-gui-upload/m-p/1894218#M373888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T22:11:01Z</dc:date>
    </item>
  </channel>
</rss>

