09-16-2008 2:20 PM
Hi Experts,
I have requirement like, in a internal table 5 fileds, with that 1,2 4 are having the values, and 3, 5 are constants of 2 and 5 spaces blank.
For download the internal table am using GUI_DOWNLOAD function module,
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = gv_file
TABLES
data_tab = it_out_d
EXCEPTIONS
file_write_error = 1.
the file name and path is gv_file and the down load file is ' it_out_d' internal table.
After downloding the file, the third(3rd) filed is displying space, but the fifth(5th) filed is not showing..
could you help on this..
Regards,
Nagaraju.
09-16-2008 2:30 PM
Hi Nag,
The problem u r facing would be relevant with the data type
u declared.
Supposing u r having 5 fields..
data : begin of it occurs 0,
a(10) type c,
b(10) type c,
c type i,
d(10) type p,
e(10) type c,
end of it.
If there is value ,the value will be downloaded.Else the initial
value will be downloaded.
The initial value for character data type is space ( In our internal table fields : A, B,E)
The initial value for integer data type is zero.( In our internal table
field : C )
So declare u'r fields based on u'r requirement accordingly..U can download the value u expected.
I hope it will solve u'r problem.
Regards.
siva
09-16-2008 2:38 PM
Hi...
> but the fifth(5th) filed is not showing
You given it as space...!
Maintain field seperator..
--Naveen.I
09-16-2008 2:50 PM
Hi,
Try using filetype = 'DBF'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = gv_file
FILETYPE = 'DBF'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
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'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
SHOW_TRANSFER_STATUS = ABAP_TRUE
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = i_vbak
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.
Regards,
Jyothi