Show TOC コンテンツエリア開始

Code Attribute Locate the document in its SAP Library structure

For column values with the following data types, a code attribute can also be entered, if required: CHAR[ACTER], VARCHAR, LONG[VARCHAR].

A code attribute defines the sort sequence to be used for comparing values.

Code Attribute

Column Values

No code attribute

The column values have the code attribute defined in the database system.


The column values are stored in ASCII code.


The column values are stored in a code, that is, the column values are not converted by the database system.


The application data in a table column is stored in UNICODE.

Defining a Code Attribute

It is also possible to specify a code attribute in the column definition for column values with data types CHAR[ACTER], VARCHAR und LONG[VARCHAR].

     If you do not specify a code attribute, the code defined in the database system is used. The code can be defined for specific users or globally using the following options:

The code can be defined for specific database users using appropriate SQL statements (for more information, see: CREATE/ALTER USER Statement or CREATE/ALTER USERGROUP Statement).

The code can be defined globally during the installation of the database system using the special database parameterDEFAULT_CODE.

The code defined for a database user overrides the code specified globally in the database system.

Changing a Code Attribute

You can change a code attribute.

If you change the code attribute from ASCII to UNICODE, you should note that the column value cannot exceed the length of the column.

You can only change the code attribute from UNICODE to ASCII if all the data can be converted into ASCII values.

See also:

Data Type (data_type)

ALTER TABLE Statement (alter_table_statement)