Show TOC

 Conversions in Accordance with the SAP Standard

In the SAP standard in an SAP system without Unicode character sets, data that is displayed using different code pages is converted for the following:

Entering and Outputting Data in the SAP System

When entering and outputting data in the SAP system, data is converted from the format of the front-end code pages to the format of SAP(ISO) code pages used in the SAP system. Data is converted during communication between the SAP GUI and the application server using SAP-internal character numbers. In the SAP system you can see how these numbers are assigned to each character in table TCP01.

In this example, Czech data is entered on a front end with Microsoft NT as the operating system, and then transferred to the SAP system (green arrow). The data originates from Microsoft code page 1250. This code page corresponds with the SAP(front-end) code page 1404 contained in the SAP system. The data must then be converted from the format of SAP(front-end) code page 1404 to the format of SAP(ISO) code page 1401 that is based on ISO code page ISO 8859-2.

In the SAP(front-end) code page 1404 (Microsoft code page 1250) the hex code8Eis assigned to the character entered (Ž). The SAP internal character number291corresponds to this hex code. The system searches for this character number in SAP(ISO) code page 1401 on the application server. Hex codeAEis found, and this is stored on the database.

The diagram also shows how the Czech characterŽ is output on the front end (blue arrow). The hex codeAEis read from the database and converted in the same way. The SAP-internal character number291corresponds with the hex codeAEof SAP(ISO) code page 1401. The system searches for this number in the SAP(front-end) code page 1404 and the hex code8Eis found. This is output on the front end as the characterŽ

The following points ensure that the data is converted correctly:

You must have set the correct locale on the front end that enables data to be entered and output for the language to be entered or output according to the correct operating system code page (Microsoft code page 1250 in the example).

You must have entered the SAP(front-end) code page (SAP(front-end) code page 1404 in the example) in the SAP logon dialog box that corresponds with the operating system code page of the front end.

The code page entered in the SAP logon dialog box of the SAP GUI, or the front end environment parameter SAP_CODEPAGE determines the SAP(front-end) code page used for the conversion. The entry in the SAP logon dialog box overwrites the environment parameter.

By logging on as described you ensure that the corresponding (suitable) SAP(ISO) code page for the SAP(front-end) code page set up is active (14041401 in the example). For examples of code page pairs of this kind, see Languages, Code Pages, and Conversions .

If the SAP(front-end) code page and the SAP(ISO) code page do not correspond, the SAP-internal character number for each character may not be found. The#(number sign) character is then used. The corresponding hex code23is stored in the database for this character, or the#character is output on the front end. The following diagram shows the former:

The data is not converted correctly because the active SAP(ISO) code page on the application server (1100) does not correspond with the SAP(front-end) code page (1404).

Communication Using Remote Function Calls

When using a Remote Function Call (RFC) for communication between a sending and recipient system, the code pages of the sender and recipient and the data format determine the conversion of the transferred data. The following rules apply here:

Data is not converted if, during RFC communication, only data in BINARY mode or data of type X (hexadecimal) is transferred.

Data is not converted if the active code page of the sending system is the same as the active code page of the recipient system. This rule applies regardless of the logon language and the command SET LOCALE <LANGUAGE>.

The type of the code pages involved and the release determine whether conversion takes place if the active code page of the sending system is different from the active code page of the recipient system. Data is usually converted if the code pages correspond. The following rules apply here:

Characters are converted according to the active code pages involved in the recipient and sending systems. The language keys for the data to be transferred have no influence on the conversion.

Data that has to be displayed using a code page that is different from the active code page in the sending system can be converted incorrectly and therefore corrupted.

Characters not contained on the code page in the recipient system are replaced with the number sign (#).

The data cannot be converted record by record in a remote function call if data from several code pages is transferred.

This means that language-dependent data displayed using different code pages is converted as a whole when being transferred in RFC communication. Only the code pages from the sending and recipient systems control the conversion and not the language keys. If data is converted as a whole, it could therefore be incorrectly converted and corrupted.

During communication between an SAP system with Unicode and an SAP system or external system without Unicode, data is converted from Unicode to ASCII (in accordance with the current code page of the non-Unicode system) and vice versa. This conversion is also not performed record by record for data that has to be displayed using several code pages.

Application Link Enabling

Application Link Enabling (ALE) is based on RFC communication between two SAP systems so that when data is transferred, conversions are performed in accordance with the rules of RFC communication.

In ALE, IDocs are always transferred in CHAR format so that conversion is always possible if the active code pages of the sending and recipient systems are different. However, as the data is stored in the format of the SAP(ISO) code pages used in the SAP system in both the sending and recipient system, a conversion does not have to be performed when transferring data via ALE. You can avoid unnecessary conversions if the active code page of the sending system is the same as that of the recipient system. Data is then stored in the recipient system in exactly the same way as in the sending system.

Business Application Programming Interfaces

Business Application Programming Interfaces (BAPIs) are also based on RFC communication. For example, if a BAPI is called in a JAVA application, the code pages of the JAVA front end and the SAP system determine the conversion of the data.