2005 Apr 14 3:21 PM
Hi,
I have been trying to write data from an internal table into a file on Application Server.
But, here in the file i need to give a TAB as delimiter.
How to give a tab as a delimiter while TRANSFERing the data onto a file on App. Server ?
Help in this regard is much appreciated !
Thanks & Regards,
Ramesh
u should not be using hexadecimal chracters for horizontal tabs, its obsolete
check this code and award points if found helpful
CLASS cl_abap_char_utilities DEFINITION LOAD.
DATA: text TYPE string.
REPLACE cl_abap_char_utilites=>horizontal_tab WITH space INTO text.
2005 Apr 14 3:29 PM
Hi Ramesh,
try to define a variable like this:
data: l_var type x default '??'.
I am not sure about the hex-code for TAB that's why the '??'.
Place l_var between each field.
Hope it helps.
regards
Siggi
2005 Apr 14 3:41 PM
Hi Ramesh
You can try defining the following and use it as the tab delimiter.
data: tab(1) type x value '09'.
Regards,
Francis
2005 Apr 14 3:47 PM
Ramesh,
Check out the following link:
http://www.sapdevelopment.co.uk/file/file_ascii.htm
This shows you how its done and provides sample code.
Cheers,
Brad
2005 Apr 14 3:44 PM
2006 Dec 28 6:04 PM
Hi Ramesh,
Did you get your program to work using Tab delimiter to Appl Serve. I am having the same problem.
thanks
Camboo
2006 Dec 28 6:46 PM
In the code above instead of using some variable loaded with hexadecimal value '09' which implies horizontal tab we are loading standard value loaded from class cl_abap_char_utilities
Award points if found helpful, this works perfectly with unicode system too but the former does not in Unicode system
2006 Dec 28 6:44 PM
u should not be using hexadecimal chracters for horizontal tabs, its obsolete
check this code and award points if found helpful
CLASS cl_abap_char_utilities DEFINITION LOAD.
DATA: text TYPE string.
REPLACE cl_abap_char_utilites=>horizontal_tab WITH space INTO text.
2006 Dec 28 7:34 PM
HI,
Please try something like this, this shall create a TAB delimited file.
DATA: SEPARATOR TYPE X VALUE '09'.
LOOP AT ITAB_OUTBOUND INTO WA_ITAB_OUT.
CONCATENATE WA_ITAB_OUT-ZZNWKPF
WA_ITAB_OUT-BISMT
WA_ITAB_OUT-MATNR
WA_ITAB_OUT-ZZBRRID
WA_ITAB_OUT-MSTAE
WA_ITAB_OUT-ZZINSTD
WA_ITAB_OUT-ZZDISCD
INTO TEMP_LINE SEPARATED BY SEPARATOR.
" Transfer records to outbound file.
TRANSFER TEMP_LINE TO OBFILE.
ENDLOOP.
Regards,
-Venkat.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |