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

how to insert tab between two fields...?

Former Member
0 Likes
1,493

hi all,

i am creating a tab-delimited file using Open dataset/Close dataset. I want to insert tab between the fields of output line.

Can anyone help me regarding this.

Regards,

Anil.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,133

Hi,

use:

CONSTANTS: CON_NEWL TYPE ABAP_CHAR1 VALUE CL_ABAP_CHAR_UTILITIES=>NEWLINE,

CON_TAB TYPE ABAP_CHAR1 VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

Insert con_tab betwenn the 2 fields.

Regards, Dieter

6 REPLIES 6
Read only

Former Member
0 Likes
1,133

Hi,

In Tab Delimited tab space is automatically set between two fields.

Reward if usefull

Read only

Former Member
0 Likes
1,133

Hi,

By default it is tab delimited file.

Use binary mode ...

Reward if helpful

jagadish

Read only

prasanth_kasturi
Active Contributor
0 Likes
1,133

use binary mode .....its enough

regards

prasanth

Read only

Former Member
0 Likes
1,134

Hi,

use:

CONSTANTS: CON_NEWL TYPE ABAP_CHAR1 VALUE CL_ABAP_CHAR_UTILITIES=>NEWLINE,

CON_TAB TYPE ABAP_CHAR1 VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

Insert con_tab betwenn the 2 fields.

Regards, Dieter

Read only

0 Likes
1,133

Hi

my requirement is while downloading the report if there is value in the first field and in third field then the display should be as

<first field> <space given for second field> <third field>

but while displaying the space for the second field is not getting displayed. both the first and third fields are getting concatinated.

please give me the solution.

thanks and regards,

chandrika

Read only

Former Member
0 Likes
1,133

try using cl_abap_char_utilities class...

tab = cl_abap_char_utilities=>horizontal_tab.