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

String larger than 255

Former Member
0 Likes
6,272

Hi all. I need to fill a variable with more than 255 characters. I've created a custom domain with 500 length both on number of characters and output length. However, when I fill out the field, it only fills 255 chars, no more than that.

Any ideas?

Thanx.

Jesus

1 ACCEPTED SOLUTION
Read only

former_member183804
Active Contributor
0 Likes
4,445

Hello Jesus,

moving more than 255 chars into a String or c field with apporiate size should be no problem at all.



report test.
  data: txt type string, len type i.
  concatenate sy-ULine sy-ULine into txt. len = strlen( txt ).
  write: / len , txt.

So I guess the problem is located in the fill logic. Could your please provide a small code excerpt?

Thanx

Klaus

10 REPLIES 10
Read only

Former Member
0 Likes
4,445

Hi,

You can use Data type <b>LCHR</b>, it can hold up to 32000 chars.

just see the domain<b> J_2ICHRL</b> here LCHR is used.

Regards

vijay

Read only

0 Likes
4,445

if you are on WAS6.10 or above you can use data type STRING

Regards

Raja

Read only

0 Likes
4,445

Hi all. Thanx for your answer, but i've tryed both with J_2ICHRL data element and STRING, and it's still not working.

Thanx

Jesus

Message was edited by: Jesus Bohorquez

Read only

0 Likes
4,445

when you LCHR data type , your table should also have another field of type i where you have to fill the size of the content.

Regards

Raja

Read only

0 Likes
4,445

what do you mean by still not working? not able to create the field - synatx error ,

not able to fill data?

Regards

Raja

Read only

0 Likes
4,445

It still only fill up to 255 chars

Read only

0 Likes
4,445

if you are looking at the data in debugging , you will only see 255 characters

how do you fill the field?

Regards

Raja

Read only

0 Likes
4,445

I1m looking at the field on debbuging, but I have a routine where I validate the length of the field with STRLEN (field_name) GT 255, and it doesn't work.

Thanx

Jesus

Read only

Former Member
0 Likes
4,445

Hi Jesus,

I think you should use data type STRING instead of CHAR. Because CHAR has a certain limit of 255 even though we declare more than that it won't accept in such cases we have to go for STRING.

Thanks & Regards,

YJR.

Read only

former_member183804
Active Contributor
0 Likes
4,446

Hello Jesus,

moving more than 255 chars into a String or c field with apporiate size should be no problem at all.



report test.
  data: txt type string, len type i.
  concatenate sy-ULine sy-ULine into txt. len = strlen( txt ).
  write: / len , txt.

So I guess the problem is located in the fill logic. Could your please provide a small code excerpt?

Thanx

Klaus