‎2007 Oct 17 6:48 AM
hi ,
while i am down loading the internal table data into application server .
for the last field in the internal table the value is blank .
after downloading the data into flat file .the blank value for the last field is igoring.
i want the row ending with the blank data(spaces) in each line in file.
‎2007 Oct 17 6:57 AM
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
FILENAME = 'C:\Documents and Settings\999999\Desktop\demo.xls'
FILETYPE = 'DBF'
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
<b>TRUNC_TRAILING_BLANKS = SPACE</b>
WRITE_LF = 'X'
CHANGING
DATA_TAB = lt_datatab.
‎2007 Oct 17 7:01 AM
Hi..
This is the Simple way you can download the ITAB with Tab delimiter: Check the Last field now...
DATA : V_REC(200).
OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT ITAB INTO WA.
Concatenate WA-FIELD1 WA-FIELD2
INTO V_REC
SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
TRANSFER V_REC TO P_FILE.
ENDLOOP.
CLOSE DATASET P_FILE.
Note: if there are any Numeric fields ( Type I, P, F) In your ITAB then before CONCATENATE you have to Move them to Char fields ..
<b>Reward if Helpful.</b>