‎2006 Dec 05 8:11 AM
Hi all,
Suppose i have very large DAT file. My requirement is to Splitt the DAT file into n number of smaller dat files. How to do this . Send me if you have any code which performs the above task .
Thanks in Advance
Krish...
‎2006 Dec 05 8:14 AM
‎2006 Dec 05 8:24 AM
Hi Krish
I guess you are referring to file on application server.
Below are the assumptions:
1. Upload data to an internal table say itab.
2. Original filename is fname.
3. No. of records to be in a file: 10.
Below code might give you some idea:
data: rec type i value 10,
count type i value 1,
file_ext type i value 1.
data: fname type rlgrap-filename,
fname_ext type rlgrap-filename.
loop at itab.
if count = rec or count = 1.
close dataset fname_ext.
fname_ext = file_ext.
concatenate fname fname_ext into fname_ext.
open dataset fname_ext for output in text mode encoding default.
count = 1.
endif.
transfer itab to fname_ext.
count = count + 1.
endloop.Kind Regards
Eswar