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

Long String Constant

former_member343107
Participant
0 Likes
3,791

Dear all,

In my ABAP program I need to assign a long string constant to a variable. But there's limit for the length of a line. Can anybody give me a solution other than using CONCATENATE key word?

Thanks, Jerome

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,488

Hi,

In this case it is better to use "TEXTS" in the program starting from text-001 to...

In this text u can assign upto 132 characters.

If ur strign is still longer than create such texts and then concatenate thes texts using

CONCATENATE <TEXT-001> TO <TEXT-002>

SEPERATED BY SPACE.

REWARD PTS IF USEFUL,

REGARDS,

HARSHA

4 REPLIES 4
Read only

Former Member
0 Likes
2,489

Hi,

In this case it is better to use "TEXTS" in the program starting from text-001 to...

In this text u can assign upto 132 characters.

If ur strign is still longer than create such texts and then concatenate thes texts using

CONCATENATE <TEXT-001> TO <TEXT-002>

SEPERATED BY SPACE.

REWARD PTS IF USEFUL,

REGARDS,

HARSHA

Read only

0 Likes
2,488

Thanks a lot for the indication!

Best Regards

Jerome

Read only

Former Member
0 Likes
2,488

i am not sure what is your requirement.

you can do like this.

V_text = strng+0(1200).

write : / v_text.

regards

shiba dutta

Read only

ratty1967uk
Member
0 Likes
2,488

the "&" character allows you to concatenate several lines into a single string literal:

  constants: lc_longstring type string value
             'this is a very, ' &
             'very long string constant that is split ' &
             'over several lines of source'.

  write: / lc_longstring.