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: 

Reg:LCHR 2000

Former Member
0 Kudos

Hi All,

I have created one table.I want to store more than 255 character,thats the reason i changed the table in the follwing formate

MANDT

INT4

LCHR 2000

Table is not storing the value in LCHR 2000.But values is stored correctly in my old table.

My old table

MANDT

CHAR 255

Please Give me a solution....

Thanks & regards

Mathi

3 REPLIES 3

Former Member
0 Kudos

If u are creating a data element, or domain,

make it

CHAR 255[ DO NOT USE LCHR, STRING ETC ]

It will give message on activation.

(But don't worry,it is just a warning (YELLOW COLOUR MESSAGE)

The message only tells that

the field will be visible on screen

for less characters, however, it will store

all characters.

0 Kudos

Hi,

Thanks for ur reply...

I want to use more than 255 characters.So only i am using LCHR..... but it is not storing

Thanks & Regards

Mathi s

0 Kudos

Hi,

I know it is too late to answer to this question, but I couldn't find its answer anywhere on the net or on SDN(when I needed it). Now finally I found the answer and posting on this forum...may it help my friends in future.

For saving value into LCHR type field you need to have the field before it of type INT2. So when you want to save the value, calculate the field length by using "strlen" keyword. Now when saving also save the value of this field length into the INT2 type field.

Hope it will help.

Thanks,

Barjinder Singh.,