2007 Sep 20 5:00 AM
I need to transfer a 0 byte file.
for that I am using the following code.
<b><i>begin of i_zero occurs 0,
dummy,
end of i_zero,
move '' to i_zero-dummy.
append i_zero.
open dataset v_file for output in binary mode.
if sy-subrc eq 0.
loop at i_zero.
transfer i_zero-dummy to v_file.
endloop.
close dataset v_file.</i></b>
but the above code is giving me a 1 byte size file. is there anyway around this to be able to transfer a 0 byte file?
I need to transfer a 0 byte file.
for that I am using the following code.
<b><i>begin of i_zero occurs 0,
dummy,
end of i_zero,
move '' to i_zero-dummy.
append i_zero.
open dataset v_file for output in binary mode.
if sy-subrc eq 0.
loop at i_zero.
transfer i_zero-dummy to v_file.
endloop.
close dataset v_file.</i></b>
but the above code is giving me a 1 byte size file. is there anyway around this to be able to transfer a 0 byte file?
2007 Sep 20 5:07 AM
Hi Prasad..
If u want to Get a 0 byte file, then Don't use the Transfer At all.
Just use OPEN Dataset .. and CLOSE Dataset.
Eg:
open dataset v_file for output in binary mode.
if sy-subrc eq 0.
close dataset v_file.
Endif.
Now check the size of the File.
Reward if Helpful.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |