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: 

Problem with long text field.

former_member211905
Participant
0 Kudos
163

Hi all,

I have a problem when I try to concatenate two fields.

It seems the new field only is 254 characters long?

Here is my syntax:

data: w_long_text(1000).

clear w_long_text.

loop at iline.

concatenate w_long_text iline-tdline into w_long_text separated by space.

endloop.

I'm sure the text is longer then 254 becuase I can see the text in an Activity in the Sap Crm system.

Best Regards

Frode

1 ACCEPTED SOLUTION

Former Member
0 Kudos
93

Hi thomas

wat i would suggest you is better take an internal table with long_text(255) field .

data : begin of it_text occurs 0,

long_text(255),

end of it_text.

clear : w_long_text,it_text.

loop at iline.

concatenate w_long_text iline-tdline into w_long_text separated by space.

<b>it_text-long_text = iline-tdline.</b>

append it_text.

clear it_text.

endloop.

and when displaying the text keep that in a loop and print it.

This way u can display the whole text irrespective of the char length.

Reward points if helpful

Regards

Zarina

5 REPLIES 5

Former Member
0 Kudos
93

Hi,

Probably last record in the internal table doesn have the required length as ur saying.

Reward if it was helpful.

Thanks and Regards

Manish

Former Member
0 Kudos
93

Hi,

All Long Texts in SAP are retrived/fecthed using the fun Module READ_TEXT by passing OBJECT, OBJECTNAME, ID and lang as 4 paramters and the text is fetched into an internal table and read line by line .

Regards,

Anji

0 Kudos
93

You can't display 1000 char in a single Line anywhere as output.

Max length allowed is 255 char only.

u can split line into diffrent -2 line and use it .

0 Kudos
93

Hi Kishan,

How do I do that?

Regards Frode

Former Member
0 Kudos
94

Hi thomas

wat i would suggest you is better take an internal table with long_text(255) field .

data : begin of it_text occurs 0,

long_text(255),

end of it_text.

clear : w_long_text,it_text.

loop at iline.

concatenate w_long_text iline-tdline into w_long_text separated by space.

<b>it_text-long_text = iline-tdline.</b>

append it_text.

clear it_text.

endloop.

and when displaying the text keep that in a loop and print it.

This way u can display the whole text irrespective of the char length.

Reward points if helpful

Regards

Zarina