‎2008 Apr 29 8:59 AM
Hi all,
I've created a structure with few variables, for instance :
v_1 c lenght 3,
v_2 c lenght 5,
v_3 c lenght 5.
I want to insert those values in a txt flat file.
The fields will have to be separated by a star '*'.
As far as I can see, there's no way to force the field separator to be a * using GUI_DOWNLOAD function.
But I've found a workaround.
But my issue now is that I can't find a way to have an "empty" field.
Here is an example of what my file should look like if v_2 is empty :
aaa bbbbb
And here is how it is created :
aaa* bbbbb*
Do you know if there is a way to have my v_2 fill with blanks or spaces in my output file ?
Thanks in advance for your help.
Regards
Pierre
‎2008 Apr 29 9:06 AM
try to use offsets to write the field values ...
itab-v_file+0(3) = v_1.
itab-v_file+3(1) = '*'.
itab-v_file+4(5) = v_2.
itab-v_file+9(1) = '*'.
itab-v_file+10(5) = v_3.
itab-v_file+15(1) = '*'.
append itab.
Now download this table ...
‎2008 Apr 29 9:03 AM
Sorry, in my previous post my exemple appears in bold...
Here is an example of what my file should look like if v_2 is empty :
\*aaa\* \*bbbbb\*
And here is how it is created :
aaa* bbbbb*
Pierre
‎2008 Apr 29 9:06 AM
try to use offsets to write the field values ...
itab-v_file+0(3) = v_1.
itab-v_file+3(1) = '*'.
itab-v_file+4(5) = v_2.
itab-v_file+9(1) = '*'.
itab-v_file+10(5) = v_3.
itab-v_file+15(1) = '*'.
append itab.
Now download this table ...