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

Alternative to String

Former Member
0 Likes
1,053

Hi

Is there any alternative to using string data type in case we need to display more than

255 characters?

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
735

YOu can declare variables with char

data v_char(400) type char.

Read only

Former Member
0 Likes
735

1) make use of LCHR to store the long text in the table, it will allow up to 32000 chars.

OR

2) You need to create a table have a filed longer than 512 char, so you should use a field with a domain with type LRAW or LCHR (it can be longer than 512 char):

see the data element PC03_DSATZ for example.

When you create your table, before this field you have to insert a field type INT4 where you'll indicate the lenght of your text.

So your table should be:

MANDT key

NAME (Text Name) key

ZLENG (Type INT4)

TEXT (type LCHR)