cancel
Showing results for 
Search instead for 
Did you mean: 

Tab in ABAP

former_member220801
Participant
0 Kudos

How to add tab between two string?

e.g.

DATA: part1(2) TYPE C.

DATA: part2(3) TYPE C.

DATA: combine(100) TYPE C.

part1 = 'aa'.

part2 = 'bb'.

I would like to add tab as the delimiter between part1 and part2.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try:

DATA: part1(2) TYPE C.

DATA: part2(3) TYPE C.

DATA: combine(100) TYPE C.

DATA: lv_ctab(1) TYPE c.

FIELD-SYMBOLS <f_hex> TYPE x.

ASSIGN lv_ctab TO <f_hex> CASTING.

<f_hex> = '09'.

part1 = 'aa'.

part2 = 'bb'.

concatenate part1 part2 into combine separated by lv_ctab.

write combine.

Regards,

Mireia

Answers (5)

Answers (5)

andreas_mann3
Active Contributor
0 Kudos

hi,

or look here:

Andreas

Former Member
0 Kudos

Hi

It is not possible to display the data with the tab delimited.

I am trying it out,if i got any solution i will let you know.

Thanks

Mrutyunjaya Tripathy

former_member188685
Active Contributor
0 Kudos

REPORT ZTEST_AC .

hi,

you can try this ...

DATA: part1(2) TYPE C.
DATA: part2(3) TYPE C.
DATA: combine(100) TYPE C.
part1 = 'aa'.
part2 = 'bb'.

concatenate part1 part2 into combine separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

write combine.

regards

vijay

Former Member
0 Kudos

CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

former_member188685
Active Contributor
0 Kudos
DATA: part1(2) TYPE C.
DATA: part2(3) TYPE C.
DATA: combine(100) TYPE C.
part1 = 'aa'.
part2 = 'bb'.

conactenate part1 CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB part2 into combine.

regards

Vijay