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: 

how to save a text of 300 characters into database table

Former Member
0 Kudos
717

we have a requirement in which we have to save a text of 300 characters entered in a custom control into database tablebut in the data elements max length which we can store is 255 characters also we don't have to use 'create_text and read_text' and save it in table stxh.

please help me out

6 REPLIES 6

Former Member
0 Kudos
236

u can use user defined field.

i just saw a field with a length of 3000.

its CHAR3000 - Character 3000 check it out in data type.

reward points plz

Former Member
0 Kudos
236

hi

even i have got the same requirement, which i solved it by using a userdefined field

Former Member
0 Kudos
236

if u r not ok with userdefined fields and only want to store in DB table field then break into 2 parts and store in two fields. concord it when you want it use it or print it .

give points if usefull.

Former Member
0 Kudos
236

Hi

Please use the type STRING (from Direct type) with out specifying any length.

Regards

Geogy

Former Member
0 Kudos
236

Hi

no need for any FM

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)

<b>Reward points</b>

Regards

0 Kudos
236

hi Kiran,

is it mandatory to put INT4 before inserting the field with type LCHAR or LRAW.

plz clarify on it.