Application Development 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: 

Formatting

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Try this..

CONCATENATE it_out-ort01 IT_OUT-REGIO

into it_outfile separated by space.

Thanks,

Naren

4 REPLIES 4

Former Member
0 Kudos

Hi,

Try this..

CONCATENATE it_out-ort01 IT_OUT-REGIO

into it_outfile separated by space.

Thanks,

Naren

0 Kudos

Thanks Naren and Rich.

Shejal.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

Former Member
0 Kudos
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.