2013 Jul 29 10:49 AM
Hello ABAP Guru's
I am trying to create table Fields With giving the Data type as LCHAR or LRAW in se11..It is giving error like ' Z<Field> does not have a preceding length field of type INT4'
and when I created another field (above to LCHAR or LRAW field ) with data type with INT4 is not showing error.
Please let me know what is the reason behind of this....
Thanks In Advance,
Sekhar
2013 Jul 29 11:40 AM
Those data type were created (back to the 45b version, or 4.0 ?) to replace the now disabled VARC type.
One of those fields can only be the last field of a table, and must be preceded by a INT2 field which contains the actual length required. (Depending on the actual DB those fields are not actually in the DB table so cannot be used in a WHERE clause)
Regards,
Raymond
2013 Jul 29 11:25 AM
Hi,
When create table Fields With giving the Data type as LCHAR or LRAW you need to create the preceeding length field, this field will contain the length of the data contained in the LChar or Lraw datatype field.
For example, if field xyz of type lchar has contents : 'hello people how are you'
the preceeding length field should have the length of the data contained in field XYZ.
Additionally:this LCHAR field has to be the last field in the table and there can be only one fiel of LCHAR in one database table.
Such fields cannot be used in where clause of a select query!
2013 Jul 29 11:31 AM
Hi,
The data type LCHR should be used for character strings of arbitrary length, but with at least 256 characters.
Unlike binary data (LRAW), character data (LCHR) is converted automatically in heterogeneous environments, providing the database system used supports ASCII-EBCDIC or code page conversion in heterogeneous networks. Type LCHR is therefore suitable for long texts that are to be stored. Fields of type LCHR can occur in structures and tables. Fields of this type must be placed at the end in tables and have a preceding length field of the type INT2. When using INSERT or UPDATE in ABAP/4 programs, the preceding length field must be filled with the length actually required. LCHR fields cannot be used in WHERE conditions.
2013 Jul 29 11:40 AM
Those data type were created (back to the 45b version, or 4.0 ?) to replace the now disabled VARC type.
One of those fields can only be the last field of a table, and must be preceded by a INT2 field which contains the actual length required. (Depending on the actual DB those fields are not actually in the DB table so cannot be used in a WHERE clause)
Regards,
Raymond