Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are the character fields of a transparent table in SAP 3 times bigger on the database level (DB2)?

I work with an SAP system with an IBM DB2 database attached to it. I created a transparent table in SAP system and then I checked how it looked like on the database level. It turned out that the character fields (CHAR, DATS, CUKY, NUMC) are three times bigger than their length specified in SE11. For example CLIENT field of type MANDT has the type VARCHAR(9).

I could understand multiplication of the length by 2 because of the fact that SAP is a Unicode system. But the multiplication by 3? Is anybody able to explain it to me?

like image 834
Jagger Avatar asked Dec 07 '25 02:12

Jagger


1 Answers

This effect does not depend on the DBMS used (I'm seeing the same effect on Oracle-based systems). It really is a unicode/NUC issue: On a NUC system, the client field is a VARCHAR2(3), on a unicode system of otherwise identical software components, it's a VARCHAR2(9). I can only guess that this is due to the usage of some CESU-8 variant.

like image 141
vwegert Avatar answered Dec 09 '25 05:12

vwegert