10-17-2011 12:05 PM
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.
10-17-2011 8:55 PM
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.
10-17-2011 12:30 PM
Hi,
Length specification is not allowed in fields data type string.
Before move your variable with offset, test the string length.
Rgds,
10-17-2011 8:55 PM
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.
10-17-2011 9:04 PM
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