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: 

A string of 1000 byte llong.

Former Member
0 Kudos

I have a comment field in Z table. I have tried to set the field data type as string but it was not allowed.

I have used four 255 length char fields to hold a 1000 string which is defined in the abap program.

I try to share the 1000 byte length string into 4 255 char fields by code.

len1 = string+0(255).

len2 = string+256(255).

len3 = string+512(255). <----


this line give error that string must be less than 503 length.

len4 = string+768(232).

How can I remedy the problem?

Can't a string be limited length of chars?

Kind Regards.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

The data type would be LRAW or (more likely) LCHR for your table, if I remember correctly, requiring a integer field in front of it, so that SAP can store the length. Look at table STXL or find a table that utilizes LCHR for a long text field.

3 REPLIES 3

renato_parise
Participant
0 Kudos

Hi,

Length specification is not allowed in fields data type string.

Before move your variable with offset, test the string length.

Rgds,

Former Member
0 Kudos

The data type would be LRAW or (more likely) LCHR for your table, if I remember correctly, requiring a integer field in front of it, so that SAP can store the length. Look at table STXL or find a table that utilizes LCHR for a long text field.

Former Member
0 Kudos

Rather than creating a separate filed in a custom table, a better approach would be to create a custom text that is tied to the record in the custom table.

Rob