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

Formatting

Former Member
0 Likes
581

Hi friends,

I have to print the results in a Text Format.

For Eg, I have to print the city and state and has to be a space between the two.

I tried usng CONCATENATE but didnt work.

I am using the below code but i guess wouldnt work if the name of the city is very long .

it_outfile+4 = it_out-ort01.

it_outfile+12 = space.

it_outfile+13 = it_out-regio.

Any Advice,

Shejal.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
553

Hi,

Try this..

CONCATENATE it_out-ort01 IT_OUT-REGIO

into it_outfile separated by space.

Thanks,

Naren

4 REPLIES 4
Read only

Former Member
0 Likes
554

Hi,

Try this..

CONCATENATE it_out-ort01 IT_OUT-REGIO

into it_outfile separated by space.

Thanks,

Naren

Read only

0 Likes
553

Thanks Naren and Rich.

Shejal.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
553

Please use the SEPARATED BY SPACE.



report zrich_0002 .

data: city type string.
data: state type string.
data: output type string.

city = 'Las Vegas'.
state = 'Nevada'.

concatenate city state into output separated by space.

write:/ output.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
553
data: v_var(30).

concatenate it_out-ort01 it_out-regio into v_var separated by space.
if sy-subrc = 0.
  it_outfile+4 = v_var.
endif.