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: 

Save Long String to Database

former_member209197
Active Participant
0 Kudos

Hi fellows.

So, I want to save a long text, a memo field, to a database table.

This field has to be able to save a text like this, with empty lines, paragraphs, almost unlimited space, ...

Which data type can I use to declare the field in the Transparent Table?

Do I need to call any special routine or just the usual INSERT, UPDATE calls?

Thanks and regards

André

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Why not use the text FMs in FM group STXD?

Rob

4 REPLIES 4

Former Member
0 Kudos

Why not use the text FMs in FM group STXD?

Rob

0 Kudos

Hi, thanks for the reply.

It might be I misunderstood your tipu2026

But Iu2019m not planning to print this information in SAPScript.

I want to insert and update it in a Screen and save the info somewhere (probably in the database, but I read that some types, like raw_string is actually saved outside the database, but the field is present in the transparent table).

I tried to create fields with types STRING and RAW_STRING, but when saving the information was not stored in the table, the record was created with other fields but the text fields were empty.

Do you usually store free text, related to transactional or master data, using the function group you have mentioned?

Thanks and regards

André

0 Kudos

Ops, now I got it.

I can also save this u201Cfree textu201D using the function group you have mentioned.

I use the FMs to save and retrieve the texts.

This will work for my requirement.

I will keep the topic open if someone else have a different idea, meanwhile I will do some tests with function group STXD.

Thanks and regards

André

0 Kudos

Hi,

if you want to save text as free text..

u can declare u r table field as type LCHR. (e.g. u can store 2000 char long field to...)

above that field u also needs to declare one more field with type INT2 (to store the No. of char u store in that raw)

in this case u can use simple INSERT and SELECT query to maintane it..

For display i suggest u to use container with TEXT EDITOR .which will give u a big space to enter ur long text.