Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module to upload multiple files at a time

Former Member
0 Likes
2,424

hi all,

Im doing a report in which i need to upload multiple pdf or tesx or excel files at a time frmo my machine. i am looking for the function module for this i have tried it using parameter in the selection screen but it can upload only one file at a time. so kindly suggest me to perform the same.

thanks & regards.

6 REPLIES 6
Read only

Former Member
0 Likes
1,384

Hi,

Why dont you declare a select-option on the screen for file names. And upload all the names present in it.

Read only

Kiran_Valluru
Active Contributor
0 Likes
1,384

Hi.,

First take a parameter p_nooffiles.

Enter the number of files..

do p_nooffiles times.

call popup screen to select file to upload

call function module to upload file

enddo.

hope this helps u.,

Thanks & Regards,

Kiran

Read only

Former Member
0 Likes
1,384

Hi,

Please make sure the file you are currently uploading is a text file and it has all the file names with path.

Loop at the above internal table and try to upload your files present in the above note pad.

Regards,

Srini.

Read only

Former Member
0 Likes
1,384

Hi,

first take a parameter for how many files to upload to SAP. then do the logic

do times." how many times.

call popup screen to select file to upload

use IF or case what file format are you going to upload . take offset of last 4 character and use case statement to upload the data to sap.

or use if st like it .

if path like '%.txt'.

call function module to upload text file format

else path like '%.CSV'.

call function module to upload CSV file format

.

.

.

.

endif.

enddo.

Hope it will help full.

Regards,

Dhina..

Read only

sridhar_meesala
Active Contributor
0 Likes
1,384

Hi,

Use FILE_OPEN_DIALOG method of CL_GUI_FRONTEND_SERVICES class to get the file open dialog box. In that you have option for Multiple selections possible. You make it as 'X' and that will allow to select more than one file at a time.

Thanks,

Sri.

Read only

0 Likes
1,384

Hi,

Please check the demo provided in the below link. Hope this helps.

http://help.sap.com/saphelp_nw2004s/helpdata/en/71/9f893f17493c17e10000000a114084/content.htm

Best Regards,

Sailaja.