SAP Data Formats
Note
The information in this section does only apply when using the communication module.
Only ASCII characters are sent via the RFC interface. Therefore, all data from the SAP system that exists in a format other than character (Char) must be converted to ASCII.
The data types converted to CHAR are as follows:
Data Type |
Length (Fixed) |
Format in CHAR |
|---|---|---|
DATE |
8 |
YYYYMMDD |
TIME |
6 |
HHMMSS |
DECn |
n |
n+2-digit |
CHARn |
n |
unchanged |
NUMCn |
n |
unchanged |
Decimal numbers can be represented using data type DEC. At conversion to CHAR, a decimal point (“.”) is inserted in the respective position. With this data type, the sign always follows the value. For this reason the number of decimal places in CHAR has to be increased by two. Places that have not been filled are filled with zeros.
Example
DEC 10.3 means: 10 digits before the decimal point, 1 decimal point, 3 digits after the decimal point, and a subsequent sign; that is, the respective IDOC field must have length CHAR 15.
Exception: DEC x.0
As no digits exist after the decimal point, no decimal point is set. However, you must still increase the number of digits in CHAR by two digits: CHAR (x+2).
For example, DEC 5.0 means: one preceding blank character, five digits before the decimal point, and a subsequent sign.
For data type NUMC, only numbers (ASCII characters 30 hex to 39 hex) are allowed. The numbers are shown right-justified, spaces that are not required are filled with zeros. For data type CHAR, the information is left-justified. Spaces that are not required are filled with blanks. By default, data types DATE and TIME are filled with blanks.
Each data record must end with “CR” (0D hex) and “LF” (0A hex).
In the SAP system, special characters in character format are dealt with according to the “ISO 8859-1” standard.
Caution
Order number, operation sequence, operation number, and sub-operation number must appear with leading zeros in the confirmations.