on 10-16-2008 7:06 AM
i want to export the data to .txt file, now i have do the things ,but the data format have some questions.
you konw ,the itab data format is :
a b c;
a1 b1 c1;
a2 b2 c2;
but now the data format of export file is like this:
a b c; a1 b1
c1;a2 b2 c2;
code:
××××××××××××××××××××××××××××××××××××××××××××××
data: l_rbetr type string.
loop at LT_ZREUGH_D into LS_ZREUGH.
if ls_zreugh-zfkzt ne 'X'.
l_rbetr = LS_ZREUGH-rbetr.
concatenate TEXT LS_ZREUGH-zbukr into TEXT.
concatenate TEXT
LS_ZREUGH-prctr
LS_ZREUGH-laufi
LS_ZREUGH-laufd
LS_ZREUGH-lifnr
LS_ZREUGH-name1
LS_ZREUGH-zbnkn
LS_ZREUGH-zbnkl
l_rbetr
LS_ZREUGH-rzawe
LS_ZREUGH-hktid
LS_ZREUGH-hbkid
LS_ZREUGH-bankn
LS_ZREUGH-text1
LS_ZREUGH-zfkzt
CL_ABAP_CHAR_UTILITIES=>NEWLINE
into TEXT separated by
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
endif.
endloop.
call function 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = TEXT
ENCODING = '8400'"8400
IMPORTING
BUFFER = XTEXT.
WDR_TASK=>CLIENT_WINDOW->CLIENT->ATTACH_FILE_TO_RESPONSE(
**path to the word file
I_FILENAME = 'FuKuan.TXT'
String Variable
I_CONTENT = XTEXT
File Type
I_MIME_TYPE = 'NOTEPAD' )."
××××××××××××××××××××××××××××××××××××××××××××××××
what i can do to solve the question,?i will wait for answer on line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have solved the question,thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,Lekha
thank you for your question,and now i just use the way you have adviese,but still have the question .
maybe i should describe my question again.
you know when you export the data of intertal table to excel, the data will have the correct format.every row will still be a row, such as ,
-
row1. | a | b | c |
row2. | a1 | b1 | c1 |
row3. | a2 | b2 | c2 |
but now the data can't keep the format correctly.such as
-
row1. | a | b | c | | a1 | b1 | c1 | | a2 |
row2. b2 | c2 |
-
i don't know how to slove the quesion.help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.