<?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: confirm code with Enterprise Call method GUI_UPLOAD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/confirm-code-with-enterprise-call-method-gui-upload/m-p/840556#M44167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai &lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;let me try out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chandra kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jan 2005 03:03:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-01-25T03:03:58Z</dc:date>
    <item>
      <title>confirm code with Enterprise Call method GUI_UPLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/confirm-code-with-enterprise-call-method-gui-upload/m-p/840554#M44165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey&lt;/P&gt;&lt;P&gt;i used below code to upload csv tab seperated file into internal table.&lt;/P&gt;&lt;P&gt;I want to check whether below code works perfectly in Enterprise.&lt;/P&gt;&lt;P&gt;Could you please verify my loop structure and Data declaration part&lt;/P&gt;&lt;P&gt;and tell me it will work or not.&lt;/P&gt;&lt;P&gt;In 4.6b i worked it works fine. only last parameter "MEMO" gets&lt;/P&gt;&lt;P&gt;added with junk of "00000000" before the text. other wise things are stored&lt;/P&gt;&lt;P&gt;properly. could you pls confirm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this is my internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ETAB occurs 0,&lt;/P&gt;&lt;P&gt;         TRKORRNUM LIKE ZMW0001-TRKORRNUM,&lt;/P&gt;&lt;P&gt;         CLIENT LIKE ZMW0001-CLIENT,&lt;/P&gt;&lt;P&gt;         IMPORTDAY LIKE ZMW0001-IMPORTDAY,&lt;/P&gt;&lt;P&gt;         CONVERTFILENAME LIKE ZMW0001-CONVERTFILENAME,&lt;/P&gt;&lt;P&gt;         TRANSNO LIKE ZMW0001-TRANSNO,&lt;/P&gt;&lt;P&gt;         EXETIMING LIKE ZMW0001-EXETIMING,&lt;/P&gt;&lt;P&gt;         PRETRKORRNUM LIKE ZMW0001-PRETRKORRNUM,&lt;/P&gt;&lt;P&gt;         IMPRETURNCODE LIKE ZMW0001-IMPRETURNCODE,&lt;/P&gt;&lt;P&gt;         STATUS LIKE ZMW0001-STATUS,&lt;/P&gt;&lt;P&gt;         HOLD LIKE ZMW0001-HOLD,&lt;/P&gt;&lt;P&gt;         JOBNAME LIKE ZMW0001-JOBNAME,&lt;/P&gt;&lt;P&gt;         JOBCOUNT LIKE ZMW0001-JOBCOUNT,&lt;/P&gt;&lt;P&gt;         UDATE LIKE ZMW0001-UDATE,&lt;/P&gt;&lt;P&gt;         UTIME LIKE ZMW0001-UTIME,&lt;/P&gt;&lt;P&gt;         MEMO LIKE ZMW0001-MEMO,&lt;/P&gt;&lt;P&gt;       END OF ETAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;my csv tab file storing internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES:  BEGIN OF TTAB,&lt;/P&gt;&lt;P&gt;          TRKORRNUM LIKE ZMW0001-TRKORRNUM,&lt;/P&gt;&lt;P&gt;          CLIENT LIKE ZMW0001-CLIENT,&lt;/P&gt;&lt;P&gt;          IMPORTDAY(10) TYPE C,&lt;/P&gt;&lt;P&gt;          CONVERTFILENAME LIKE ZMW0001-CONVERTFILENAME,&lt;/P&gt;&lt;P&gt;          TRANSNO LIKE ZMW0001-TRANSNO,&lt;/P&gt;&lt;P&gt;          EXETIMING LIKE ZMW0001-EXETIMING,&lt;/P&gt;&lt;P&gt;          PRETRKORRNUM LIKE ZMW0001-PRETRKORRNUM,&lt;/P&gt;&lt;P&gt;          MEMO LIKE ZMW0001-MEMO,&lt;/P&gt;&lt;P&gt;       END OF TTAB.&lt;/P&gt;&lt;P&gt;DATA: ITAB TYPE STANDARD TABLE OF TTAB INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;      ITABWA TYPE TTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/ Aim is only csv fields should store in real table,other fields must be empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UPLOAD_FILE.&lt;/P&gt;&lt;P&gt;Concatenate DIR FILENAME into SOURCEPATH.&lt;/P&gt;&lt;P&gt;CALL METHOD FILEREAD-&amp;gt;GUI_UPLOAD&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                      = Sourcepath&lt;/P&gt;&lt;P&gt;    FILETYPE                      = 'ASC'&lt;/P&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;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;changing&lt;/P&gt;&lt;P&gt;    data_tab                     = itab&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SYST FIELDS ARE NOT SET BY THIS FUNCTION SO DISPLAY THE ERROR CODE *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID 'ZMW' TYPE 'I' NUMBER '000'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO ITABWA.&lt;/P&gt;&lt;P&gt;	MOVE-CORRESPONDING ITABWA TO ETAB.&lt;/P&gt;&lt;P&gt;	SPLIT ITABwa-importday AT '/' INTO etab-importday+0(4)&lt;/P&gt;&lt;P&gt;                                  etab-importday+4(2)&lt;/P&gt;&lt;P&gt;                                  etab-importday+6(2).&lt;/P&gt;&lt;P&gt;	APPEND ETAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;CLEAR ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ETAB.&lt;/P&gt;&lt;P&gt;INSERT INTO ZMW0001 VALUES ETAB.&lt;/P&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2005 03:00:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/confirm-code-with-enterprise-call-method-gui-upload/m-p/840554#M44165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-21T03:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: confirm code with Enterprise Call method GUI_UPLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/confirm-code-with-enterprise-call-method-gui-upload/m-p/840555#M44166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe it will work on Enterprise also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your field MEMO. Probably this is related to a RAW datafield. One attribute of these fields is, that they need a size parameter in front of them (if type INTEGER).&lt;/P&gt;&lt;P&gt;Because you read the datafile in ASC type mode, the GUI_UPLOAD method assumes NO value is present and will add room for a number in front of the text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could change the last MEMO field in such a way, that it has a fixed length (long enough to hold whatever it might contain).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2005 16:00:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/confirm-code-with-enterprise-call-method-gui-upload/m-p/840555#M44166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-24T16:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: confirm code with Enterprise Call method GUI_UPLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/confirm-code-with-enterprise-call-method-gui-upload/m-p/840556#M44167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai &lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;let me try out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chandra kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jan 2005 03:03:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/confirm-code-with-enterprise-call-method-gui-upload/m-p/840556#M44167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-01-25T03:03:58Z</dc:date>
    </item>
  </channel>
</rss>

