Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TAB Delimiter !??

Former Member
0 Likes
2,485

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.

8 REPLIES 8
Read only

Former Member
0 Likes
1,308

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

Read only

Francis417
Participant
0 Likes
1,308

Hi Ramesh

You can try defining the following and use it as the tab delimiter.

data: tab(1) type x value '09'.

Regards,

Francis

Read only

0 Likes
1,308

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

Read only

andreas_mann3
Active Contributor
0 Likes
1,308

Hi Ramesh,

look

and replace download with

the commands for appl-srver:

open dataset and transfer

Andreas

Read only

Former Member
0 Likes
1,308

Hi Ramesh,

Did you get your program to work using Tab delimiter to Appl Serve. I am having the same problem.

thanks

Camboo

Read only

0 Likes
1,308

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

Read only

rahulkavuri
Active Contributor
0 Likes
1,308

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.

Read only

Former Member
0 Likes
1,308

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.