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 field in a table

Former Member
0 Likes
4,631

I have a table in SAP(PLM) where I need to change the existing 255 CHAR fields to 1250 CHAR long. There are six fields in the table that I need to change. All the BAPIs using the table are all created and so using LCHAR data type is not going to be very easy. I have changed the data types of these fields to STRING. But it seems like SAP would allow only three fields in a table to have STRING data type. All the three fields that I changed to STRING type are working good. Is there any other data type that I can use to fit 1250 characters?

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,912

Have you tried RAWSTRING?

Regards,

RIch Heilman

Read only

0 Likes
1,912

Just tried RAWSTRING. It gives activation warnings and leaves the table Partly active. Following is the warning..

Table contains more than 3 long string fields

Field ZZPERFDET: Type change

ALTER TABLE is not possible

Read only

0 Likes
1,912

How about storing as long text using text objects and ids. You can use the SAVE_TEXT and READ_TEXT function modules and create your custom objects/ids via transaction SE75.

You can create one object with 3 ids to represent your 3 different long text fields.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
1,912

just try place the<b> remaining 3 fields in the new structure</b> and activate the structure ...

then <b>include the structure in the same table </b> it would work i think...

Girish

Read only

0 Likes
1,912

Hi ,

i think any table can have maximum of 4000 char as its length( check for the exact no..)

If it crosses that it wont be activated.

and also see the following from sap help.

STRING

Character string of variable length. This type may not be used in database tables. In ABAP this type is implemented as a reference to a storage area of variable size.

RAWSTRING

Uninterpreted byte string of variable length. This type may not be used in database tables. In ABAP this type is implemented as a referece to a storage area of variable size.

so i think its better to display as char and required length.

Cheers,

Vasant..

Read only

0 Likes
1,912

i thinkk u cant decalre a char not max than 255 ..