2006 Apr 28 10:52 AM
DATA: BEGIN OF t_interface OCCURS 0,
var1(12) type c value '0.00'
sep1 type c value '|',
var2(18),
sep2 type c value '|',
endof t_interface .
im using GUI_DOWNLOAD to download the table t_interface to a .txt file but a have this result:
0.00 | AGUAC/GAS123 |
But i want this, i already use condense ...any help .
0.00 | AGUAC/GAS123 |
regards
2006 Apr 28 10:57 AM
Hi Luis,
Have you set TRUNC_TRAILING_BLANKS as 'X' of GUI_DOWNLOAD?
Cheers,
Patrick
2006 Apr 28 10:57 AM
Hi Luis,
Have you set TRUNC_TRAILING_BLANKS as 'X' of GUI_DOWNLOAD?
Cheers,
Patrick
2006 Apr 28 11:05 AM
2006 Apr 28 10:58 AM
Hi Luis,
Think Condense should work. When are you condensing the values. Try condensing before moving the data to the internal table.
Hope this helps
Cheers
VJ
2006 Apr 28 11:01 AM
Just for the option,
Can you check what is the Data Type of the first column.
If it is TYPE C, you will not get any blank spaces.
RohitPS Do not forget to Reward Points if the solution helps
2006 Apr 28 11:01 AM
Use the TRUNC_TRAILING_BLANKS and TRUNC_TRAILING_BLANKS_EOL options of GUI_DOWNLOAD.
By default, system truncates blanks at the end of the fields. You can use these options to transfer the blanks to the file as well.
2006 Apr 28 11:04 AM
2006 Apr 28 11:09 AM
hi luis,
welcome to SDN,
set TRUNC_TRAILING_BLANKS = 'X'.
hope this helps,
priya.
2006 Apr 28 11:40 AM
Hey Luis,
just copy and run the code.
You will get the output as you have asked.
Start of code
DATA: BEGIN OF t_interface OCCURS 0,
sep TYPE c ,
var1(12) TYPE c ,
sep1 TYPE c ,
var2(18),
sep2 TYPE c ,
END OF t_interface .
t_interface-var1 = '0.00'.
t_interface-sep = '|'.
t_interface-sep1 = '|'.
t_interface-sep2 = '|'.
t_interface-var2 = 'AGUAC/GAS123'.
APPEND t_interface.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'D:\file_test.txt'
filetype = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'I'
HEADER = '00'
trunc_trailing_blanks = 'X'
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
replacement = '*'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH =
TABLES
data_tab = t_interface
FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
End of Code .
Regards,
Kunal.
2006 Apr 28 12:48 PM
try condense t_interface no-gaps.
if it doesn't work , declare an internal table <itab> which can take all the characters of the internal table t_interface.
concatenate all the fields of the internal table into the <itab> and then use condense <itab> no-gaps.