Application Development 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: 

Split download file into multiple files

Former Member
0 Kudos

Hi all,

I'd like to split my internal table into multiple files when downloading. The split will be determined by contents of a specific field (e.g. create a new file for every unique country, where country is a key field). The number of files to download can only be determined at runtime.

Any ideas on how i can resolve this?

Thanks,

Chris.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

try this...

*declare itab1 same as itab

data : filename(25).

loop at itab.

<b>  move-corresponding itab to itab1.
  append itab1.</b>
  
  at end of BUKRS.

        *use GUI_DOWNLOD    FM here
   *pass itab1 every time here
   *change the filename everytime
     concatenate 'Company_' itab-bukrs into filename.
<b>   refresh itab.</b>
  endat.
  
endloop.

5 REPLIES 5

Former Member
0 Kudos

try this...

*declare itab1 same as itab

data : filename(25).

loop at itab.

<b>  move-corresponding itab to itab1.
  append itab1.</b>
  
  at end of BUKRS.

        *use GUI_DOWNLOD    FM here
   *pass itab1 every time here
   *change the filename everytime
     concatenate 'Company_' itab-bukrs into filename.
<b>   refresh itab.</b>
  endat.
  
endloop.

Former Member
0 Kudos

Hi Chris,

i would do it like Chandrasekhar said,

but you have to <b>refresh itab1</b> not itab.

*

Sorry Chandrasekhar.

regards, Dieter

0 Kudos

Hi Dieter,

thx for pointing that , i meant the samething but mistyped.....

0 Kudos

Hello...

Thannks mil! It works like a charm.

Chris.

former_member391265
Participant
0 Kudos

I am looking for inputs to split data from Open hub into Multiple files based on (Ex- Company Code). I have checked all threads before but did not get concrete answer.

1.For example, I have 20 Company code, need to create 20 Open hub for each company code, So it is possible if we can do it dynamically with one Open hub, we can split multiple files based on company code.(Means 20 files should get generated)

2. Also, Would like to change the AL11 files name dynamically based on Company code.

Thanks,

KRSRCM