2009 Dec 15 11:31 AM
Hi All,
We have upgraded from 4.6C to ECC6.0.
When I use GUI_DOWNLOAD function module in binary (BIN) mode with the filename without any extension, the data will be downloaded with the SPACE inbetween charecters.
EX: We have data 'bangalore is garden city' to be downloaded, the data after downloading will apear as 'b a n g a l o r e i s g a r d e n c i t y '.
Kindly provide input to solve the issue
Regards,
Prabhu.
Hi All,
We have upgraded from 4.6C to ECC6.0.
When I use GUI_DOWNLOAD function module in binary (BIN) mode with the filename without any extension, the data will be downloaded with the SPACE inbetween charecters.
EX: We have data 'bangalore is garden city' to be downloaded, the data after downloading will apear as 'b a n g a l o r e i s g a r d e n c i t y '.
Kindly provide input to solve the issue
Regards,
Prabhu.
2009 Dec 15 12:19 PM
in GUI_DOWNLOAD function module set trunc_trailing_blanks = 'X'.
or
use file type DBF
Edited by: kalandar on Dec 15, 2009 1:27 PM
Edited by: kalandar on Dec 15, 2009 1:27 PM
2009 Dec 15 12:34 PM
Hi,
Please do the following.
1. replace CRLF(2) TYPE X with CRLF TYPE char2 in declarations " CRLF adjustment on unicode
2. For internal data declarations (for ex. tab1) replace tab1-crlf = '0D0A' with tab1-crlf = CL_ABAP_CHAR_UTILITIES=>CR_LF
and for all other similar data types.
3. Consider putting explicitely codepage CODEPAGE = 'XXXX' in export function.
This will resolve your problem.
Regrads,
Nihad
Edited by: nihad omerbegovic on Dec 15, 2009 1:37 PM
2009 Dec 15 12:46 PM
2009 Dec 15 12:53 PM
HI
Take reference of below code.
TYPE-POOLS: ABAP.
* Binary download table
DATA: BEGIN OF line_bin,
data(1024) TYPE X,
END OF line_bin.
DATA: data_tab_bin LIKE STANDARD TABLE OF line_bin.
* Ascii download table
DATA: BEGIN OF line_asc,
text(1024) TYPE C,
END OF line_asc.
DATA: data_tab_asc LIKE STANDARD TABLE OF line_asc.
* DAT download table
DATA: BEGIN OF line_dat,
Packed TYPE P,
Text(10) TYPE C,
Number TYPE I,
Date TYPE D,
Time TYPE T,
Float TYPE F,
Hex(3) TYPE X,
String TYPE String,
END OF line_dat.
DATA: data_tab_dat LIKE STANDARD TABLE OF line_dat.
* Get filename
DATA: fullpath TYPE String,
filename TYPE String,
path TYPE String,
user_action TYPE I,
encoding TYPE ABAP_ENCODING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Gui_Download Demo'
WITH_ENCODING = 'X'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILENAME = filename
PATH = path
FULLPATH = fullpath
USER_ACTION = user_action
FILE_ENCODING = encoding
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
Regards,
Pravin
Edited by: pravin s. on Dec 15, 2009 1:55 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |