<?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: Replacement for Upload FM. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323795#M166331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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="1620126"&gt;&lt;/A&gt;&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;&lt;/P&gt;&lt;P&gt;tables : mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_mara occurs 0,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;mbrsh like mara-mbrsh,&lt;/P&gt;&lt;P&gt;mtart like mara-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;end of it_mara.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form upload_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM upload_data .&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 = 'c:\mat_bdc.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;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = it_mara.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;SORT IT_MARA BY MATNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " upload_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flat file structure is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRANIT_011;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_012;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_013;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_014;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_015;C;COUP;This is Testing material;kg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jun 2006 04:35:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-09T04:35:18Z</dc:date>
    <item>
      <title>Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323793#M166329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;   Kindly tell me what is the replacement for the UPLOAD Func. Module.&lt;/P&gt;&lt;P&gt;If it is GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;Then what is the replacement code for this&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            filename            = p_xtract&lt;/P&gt;&lt;P&gt;            filetype            = 'DAT'&lt;/P&gt;&lt;P&gt;            item                = 'Upload SBA Input File'(005)&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            act_filename        = p_xtract1&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            data_tab            = itab_data&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_table_width = 4&lt;/P&gt;&lt;P&gt;            invalid_type        = 5&lt;/P&gt;&lt;P&gt;            no_batch            = 6&lt;/P&gt;&lt;P&gt;            unknown_error       = 7&lt;/P&gt;&lt;P&gt;            OTHERS              = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Especially for the Export parameter 'ITEM' and the Importing parameter 'act_filename'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly guide me on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Rajesh P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 04:30:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323793#M166329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T04:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323794#M166330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Use FM GUI_UPLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wasim Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 04:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323794#M166330</guid>
      <dc:creator>dani_mn</dc:creator>
      <dc:date>2006-06-09T04:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323795#M166331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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="1620126"&gt;&lt;/A&gt;&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;&lt;/P&gt;&lt;P&gt;tables : mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_mara occurs 0,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;mbrsh like mara-mbrsh,&lt;/P&gt;&lt;P&gt;mtart like mara-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;end of it_mara.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form upload_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM upload_data .&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 = 'c:\mat_bdc.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;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = it_mara.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;SORT IT_MARA BY MATNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " upload_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flat file structure is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRANIT_011;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_012;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_013;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_014;C;COUP;This is Testing material;kg &lt;/P&gt;&lt;P&gt;PRANIT_015;C;COUP;This is Testing material;kg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 04:35:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323795#M166331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T04:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323796#M166332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be sure that it will be in line with the new OO concepts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the method CL_GUI_FRONTEND_SERVICES-&amp;gt;FILE_OPEN_DIALOG and the item that you were referring, I guess is nothing but a title of the open file window, which can be WINDOW_TITLE in the the case of the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the user selects the file, you can call the GUI_UPLOAD method of the same class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 04:35:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323796#M166332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T04:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323797#M166333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;      Can u guide me exactly what to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Rajesh P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 04:51:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323797#M166333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T04:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323798#M166334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Especially for the Export parameter 'ITEM' and the Importing parameter 'act_filename'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote one INDEPENDENT subroutine (FORM)&lt;/P&gt;&lt;P&gt;in which we pass the&lt;/P&gt;&lt;P&gt;internal table, and &lt;/P&gt;&lt;P&gt;one changing variable for &amp;lt;b&amp;gt;ACTUAL FILENAME&amp;lt;/b&amp;gt; (act_Filename)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. It will show the file open dialog,&lt;/P&gt;&lt;P&gt;   and upload that file in the &lt;/P&gt;&lt;P&gt;   specified internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. It will also return the selected file name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Especially for the Export parameter 'ITEM' &lt;/P&gt;&lt;P&gt;But, this parameter for ITEM,&lt;/P&gt;&lt;P&gt; (for displaying the text in the file open dialog box)&lt;/P&gt;&lt;P&gt;is not available in this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Just copy paste in new program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  (u can use the INDEPENDENT form in your program,&lt;/P&gt;&lt;P&gt;  and modify if u require)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------" /&gt;&lt;P&gt;data : filename like IBIPPARMS-PATH.&lt;/P&gt;&lt;P&gt;data : t001 like table of t001 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform myupload tables t001 changing filename.&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;HR originaltext="------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MYUPLOAD&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form myupload tables itab changing pfilename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data : filename like IBIPPARMS-PATH.&lt;/P&gt;&lt;P&gt;  data : fname type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     FILE_NAME           = filename.&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;HR originaltext="-------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fname = filename.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME = fname&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DATA_TAB = itab.&lt;/P&gt;&lt;P&gt;endform.                    "myupload&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 04:58:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323798#M166334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T04:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323799#M166335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where exactly were you using the UPLOAD function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the same place, you will have to call two methods now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. To get the file selected by the user, call the FILE_OPEN_DIALOG, the user will select a file which will be the output of the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use the file selected and pass that to the parameter as the GUI_UPLOAD METHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_OPEN_DIALOG
*  EXPORTING
*    WINDOW_TITLE            =
*    DEFAULT_EXTENSION       =
*    DEFAULT_FILENAME        =
*    FILE_FILTER             =
*    INITIAL_DIRECTORY       =
*    MULTISELECTION          =
*    WITH_ENCODING           =
  CHANGING
    FILE_TABLE              =
    RC                      =
*    USER_ACTION             =
*    FILE_ENCODING           =
*  EXCEPTIONS
*    FILE_OPEN_DIALOG_FAILED = 1
*    CNTL_ERROR              = 2
*    ERROR_NO_GUI            = 3
*    NOT_SUPPORTED_BY_GUI    = 4
*    others                  = 5
        .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

READ TABLE FILE_TABLE INDEX 1.
W_FILE = FILE_TABLE-FILENAME.

CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_UPLOAD
  EXPORTING
     FILENAME                = W_FILE
*    FILETYPE                = 'ASC'
*    HAS_FIELD_SEPARATOR     = SPACE
*    HEADER_LENGTH           = 0
*    DAT_MODE                = SPACE
*    CODEPAGE                = SPACE
*    IGNORE_CERR             = ABAP_TRUE
*    REPLACEMENT             = '#'
*    READ_BY_LINE            = 'X'
*  IMPORTING
*    FILELENGTH              =
*    HEADER                  =
  CHANGING
    DATA_TAB                =
*  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
*    NOT_SUPPORTED_BY_GUI    = 17
*    ERROR_NO_GUI            = 18
*    others                  = 19
        .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
&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;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravikumar Allampallam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 04:59:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323799#M166335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T04:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323800#M166336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;   Then what to do for this&lt;/P&gt;&lt;P&gt;The Export parameter 'ITEM' and the Importing parameter 'act_filename'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 05:18:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323800#M166336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T05:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement for Upload FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323801#M166337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Rajesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ld_transdir(255),&lt;/P&gt;&lt;P&gt;      ld_file(255),&lt;/P&gt;&lt;P&gt;      ld_transfile like e070-trkorr,&lt;/P&gt;&lt;P&gt;      ld_filelen like sy-tabix,&lt;/P&gt;&lt;P&gt;      ld_len like sy-tabix,&lt;/P&gt;&lt;P&gt;      begin of ld_line,&lt;/P&gt;&lt;P&gt;      nam(16),&lt;/P&gt;&lt;P&gt;      cont(1024) type x,&lt;/P&gt;&lt;P&gt;      end of ld_line,&lt;/P&gt;&lt;P&gt;      lt_tab like ld_line occurs 0,&lt;/P&gt;&lt;P&gt;      ld_fil type string,&lt;/P&gt;&lt;P&gt;      ld_path type string,&lt;/P&gt;&lt;P&gt;      ld_full type string,&lt;/P&gt;&lt;P&gt;      ld_idx like sy-index,&lt;/P&gt;&lt;P&gt;      ld_tmp(255),&lt;/P&gt;&lt;P&gt;      lt_fil type filetable,&lt;/P&gt;&lt;P&gt;      ld_rc like sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: ld_no like sy-subrc.&lt;/P&gt;&lt;P&gt;  if sy-index = 1.&lt;/P&gt;&lt;P&gt;    ld_fil = ld_transfile.&lt;/P&gt;&lt;P&gt;    call method cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        window_title      = 'woher'&lt;/P&gt;&lt;P&gt;        default_extension = ''&lt;/P&gt;&lt;P&gt;        default_filename  = ld_fil&lt;/P&gt;&lt;P&gt;        file_filter       = '&lt;STRONG&gt;.&lt;/STRONG&gt;'&lt;/P&gt;&lt;P&gt;        initial_directory = 'c:\xxx'&lt;/P&gt;&lt;P&gt;        multiselection    = 'N'&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        file_table        = lt_fil&lt;/P&gt;&lt;P&gt;        user_action       = ld_rc&lt;/P&gt;&lt;P&gt;        rc                = ld_no.&lt;/P&gt;&lt;P&gt;    if ld_no &amp;lt;&amp;gt; 1. ld_rc = 1. endif.&lt;/P&gt;&lt;P&gt;    if ld_rc &amp;lt;&amp;gt; 0. exit. endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  read table lt_fil index 1 into ld_full.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0. ld_rc = 1. exit. endif.&lt;/P&gt;&lt;P&gt;  ld_tmp = ld_full.&lt;/P&gt;&lt;P&gt;  search ld_tmp for '...'.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    ld_idx = sy-fdpos - 7.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  if sy-index = 1. move 'K' to ld_tmp+ld_idx(1). endif.&lt;/P&gt;&lt;P&gt;  if sy-index = 2. move 'R' to ld_tmp+ld_idx(1). endif.&lt;/P&gt;&lt;P&gt;  if sy-index = 3. move 'D' to ld_tmp+ld_idx(1). endif.&lt;/P&gt;&lt;P&gt;  ld_full = ld_tmp.&lt;/P&gt;&lt;P&gt;  if not ld_tmp cs ld_transfile.&lt;/P&gt;&lt;P&gt;    write: / ld_tmp.&lt;/P&gt;&lt;P&gt;    write: /5 'file will be renamed to', ld_transfile.&lt;/P&gt;&lt;P&gt;  endif.&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        = ld_full&lt;/P&gt;&lt;P&gt;      filetype        = 'BIN'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      filelength      = ld_filelen&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      data_tab        = lt_tab&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_error = 1.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 1. ld_rc = 1. endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; reagrds&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 08:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacement-for-upload-fm/m-p/1323801#M166337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T08:18:34Z</dc:date>
    </item>
  </channel>
</rss>

