<?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: upload_files FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files-fm/m-p/7229914#M1524747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi, i think you need to upload the files to table 'TAB_FILE' and not in 'FILE_ALL'.&lt;/P&gt;&lt;P&gt;check below code. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data :lt_rlgrap type table of  rlgrap,
         ls_rlgrap type rlgrap.

data : lv_xpc type RF02B-BANKXFPR value 'X'.
DATA : lt_itab TYPE standard table of BUT000.
 
data : asc type  RLGRAP-FILETYPE value 'ASC'.

PARAMETERS : p_file type rlgrap-filename default '&amp;lt;path&amp;gt;'. 
" above is to select the single file. 
" if you want to select multiple files the use select-options.
 
ls_rlgrap-filename = p_file.
append ls_rlgrap to lt_rlgrap.
" lt_rlgrap will hold the all files which you have selected 
 
CALL FUNCTION 'UPLOAD_FILES'
  EXPORTING
*   I_TRUNCLEN       = ' '
    i_filetype       = asc
    i_xpc            = lv_xpc
  tables
    file_all         = lt_itab     "data will be uploaded to this internal table
    tab_file         = lt_rlgrap.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:19 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Aug 2010 12:49:11 GMT</pubDate>
    <dc:creator>kishorekumar_vemula</dc:creator>
    <dc:date>2010-08-20T12:49:11Z</dc:date>
    <item>
      <title>upload_files FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files-fm/m-p/7229913#M1524746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alll,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD_FILES'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_TRUNCLEN       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    I_FILETYPE       =&lt;/P&gt;&lt;P&gt;    I_XPC            =&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    FILE_ALL         =&lt;/P&gt;&lt;P&gt;    TAB_FILE         =&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERROR_FILE       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS           = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what we have to fill in all these parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in file all does I have to provide all the file names using comma or only a space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 09:16:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files-fm/m-p/7229913#M1524746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-20T09:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: upload_files FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files-fm/m-p/7229914#M1524747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi, i think you need to upload the files to table 'TAB_FILE' and not in 'FILE_ALL'.&lt;/P&gt;&lt;P&gt;check below code. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data :lt_rlgrap type table of  rlgrap,
         ls_rlgrap type rlgrap.

data : lv_xpc type RF02B-BANKXFPR value 'X'.
DATA : lt_itab TYPE standard table of BUT000.
 
data : asc type  RLGRAP-FILETYPE value 'ASC'.

PARAMETERS : p_file type rlgrap-filename default '&amp;lt;path&amp;gt;'. 
" above is to select the single file. 
" if you want to select multiple files the use select-options.
 
ls_rlgrap-filename = p_file.
append ls_rlgrap to lt_rlgrap.
" lt_rlgrap will hold the all files which you have selected 
 
CALL FUNCTION 'UPLOAD_FILES'
  EXPORTING
*   I_TRUNCLEN       = ' '
    i_filetype       = asc
    i_xpc            = lv_xpc
  tables
    file_all         = lt_itab     "data will be uploaded to this internal table
    tab_file         = lt_rlgrap.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:19 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 12:49:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files-fm/m-p/7229914#M1524747</guid>
      <dc:creator>kishorekumar_vemula</dc:creator>
      <dc:date>2010-08-20T12:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: upload_files FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files-fm/m-p/7229915#M1524748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kishore,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                            Your answer helped me to solve my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 13:07:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files-fm/m-p/7229915#M1524748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-20T13:07:00Z</dc:date>
    </item>
  </channel>
</rss>

