2006 Jun 14 5:53 PM
Hello,
I have an internal table like this.
DATA BEGIN OF IT_TEST OCCURS O,
FLD(20) TYPE C,
FLD2(20) TYPE C,
END OF IT_TEST.
I need to download the it_test´s data to a file, but i need that the fld2 with white spaces. When I check the file on notepad the fld has info, but the fld2 doesn´t have blank spaces, how can i fill this field in order to have it on the downloaded file?
Im filling the internal table like this:
...
it_test-fld = 'DATA 1 DATA 1'
WHILE num lt 20.
CONCATENATE it_test-fld2 ' ' into it_test-fld2.
add 1 to num.
ENDWHILE.
APPEND IT_TEST.
....
Then I download it with GUI_DOWNLOAD using ASC mode.
Thanks for helpingme, points will be rewarded!!
Gabriel P.
2006 Jun 14 5:57 PM
Unfortunately, GUI_DOWNLOAD does not support fixed length files. It will automatically eliminates any trailing spaces. You can control it when downloading to the server side using TRANSFER with the LENGTH option.
One way around this problem is to have just another field of one character and always default it to 'X' to indicate record end.
DATA BEGIN OF IT_TEST OCCURS O,
FLD(20) TYPE C,
FLD2(20) TYPE C,
<b>end_of_rec type c,<--</b>
END OF IT_TEST.
Hello,
I have an internal table like this.
DATA BEGIN OF IT_TEST OCCURS O,
FLD(20) TYPE C,
FLD2(20) TYPE C,
END OF IT_TEST.
I need to download the it_test´s data to a file, but i need that the fld2 with white spaces. When I check the file on notepad the fld has info, but the fld2 doesn´t have blank spaces, how can i fill this field in order to have it on the downloaded file?
Im filling the internal table like this:
...
it_test-fld = 'DATA 1 DATA 1'
WHILE num lt 20.
CONCATENATE it_test-fld2 ' ' into it_test-fld2.
add 1 to num.
ENDWHILE.
APPEND IT_TEST.
....
Then I download it with GUI_DOWNLOAD using ASC mode.
Thanks for helpingme, points will be rewarded!!
Gabriel P.
2006 Jun 14 5:55 PM
constants: c_20(20)
value ' '. "place 20 blanks here in the VALUE clause
MOVE c_20 to it_test-fld2.
2006 Jun 14 5:59 PM
do this way,
constants : var(30) value ' '.
it_test-fld2 = var.
Regards,
Santosh
2006 Jun 14 6:34 PM
Gabriel,
Has your issue been resolved?
If so, please reward points accordingly and close the thread.
If not, plz provide more detail.
2006 Jun 14 5:57 PM
Unfortunately, GUI_DOWNLOAD does not support fixed length files. It will automatically eliminates any trailing spaces. You can control it when downloading to the server side using TRANSFER with the LENGTH option.
One way around this problem is to have just another field of one character and always default it to 'X' to indicate record end.
DATA BEGIN OF IT_TEST OCCURS O,
FLD(20) TYPE C,
FLD2(20) TYPE C,
<b>end_of_rec type c,<--</b>
END OF IT_TEST.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |