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

Concatenate

SG141
Active Participant
0 Likes
570

I am using the concatenate statement to place fields of a itab into a single line.

My output is currently.


xxxx      xxxx         xxxxx
xxx      xxx           xxxx
xxxx       xxxx        xxxx

I would like to have the display like


xxxx      xxxx         xxxxx
xxx        xxx           xxxx
xxxx       xxxx        xxxx

How can i do that.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
549

Instead of concatenate, use fixed offsets to get the result you want.

So instead of

concatenate field1 field2 field3 into itab-record.

use

itab-record+0(10) = field1.

itab-record+10(4) = field2.

.....

I am using the concatenate statement to place fields of a itab into a single line.

My output is currently.


xxxx      xxxx         xxxxx
xxx      xxx           xxxx
xxxx       xxxx        xxxx

I would like to have the display like


xxxx      xxxx         xxxxx
xxx        xxx           xxxx
xxxx       xxxx        xxxx

How can i do that.

2 REPLIES 2
Read only

Former Member
0 Likes
550

Instead of concatenate, use fixed offsets to get the result you want.

So instead of

concatenate field1 field2 field3 into itab-record.

use

itab-record+0(10) = field1.

itab-record+10(4) = field2.

.....

Read only

Former Member
0 Likes
549

HI,

If you just want to display it on the screen.. use the left-justified, centered, right-justified options with the write statements.

Thanks.

Mahesh