Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Connector for SAP R/3 >
Data Types Used in BAPIs and IDOCs
This appendix covers data types used in BAPIs and IDOCs.
Each data field in a BAPI or IDOC Integration Object contains information on its external data type and its Siebel data type. The following information is kept for each field:
- Data Type - This is the Siebel Data type. It can have the following values:
- DTYPE_TEXT - text string
- DTYPE_DATETIME - date and time string
- DTYPE_NUMBER - numeric value
- Length - Siebel Data type length of a DTYPE_TEXT field
- Precision and Scale - Siebel data type precision and scale values
- External Data Type - SAP data type
- External Length - SAP length in bytes
- External Scale - number of decimal places
The SAP data types CHAR, LCHR, LANG, CUKY, UNIT, CLNT and VARC have a Siebel type of DTYPE_TEXT. The Length and External Length columns are populated with the length of the field in SAP. These field types are used both in BAPI and IDOC Integration Objects. When a field of these types is being sent to SAP, the data in the field is left-justified and blank filled. When a field of these types is received from SAP, trailing blanks on the field are truncated, except in the case of the LCHR field. The LCHR field is passed exactly as it is received from SAP.
The SAP data types DATS and TIMS have a Siebel type of DTYPE_DATETIME. The Siebel type is a 19 character string that includes both date and time, in
MM/DD/YYYY HH:MM:SS format. DATS is the 8 character SAP date in YYYYMMDD format. TIMS is the 6 character SAP time in HHMMSS format.When a DATS field is sent to SAP, the SAP adapters extract the date portion of the Siebel DTYPE_DATETIME field and construct an 8 character DATS field in the correct format. When a TIMS field is sent to SAP, the SAP adapters extract the time portion of the Siebel DTYPE_DATETIME field and construct a 6 character TIMS field in the correct format.
When a DATS field is received from SAP, a Siebel DTYPE_DATETIME field is constructed with a time of 00:00:00. When a TIMS field is received from SAP, a Siebel DTYPE_DATETIME field is constructed with a date of 01/01/1980. Example, if a DATS field for November 7, 2000 is received from SAP, it looks like this: 20001107. When converted to a Siebel DTYPE_DATETIME field, it looks like this:
11/07/2000 00:00:00.The SAP data types DEC, CURR, and QUAN are packed decimal fields in SAP. These will have a Siebel type of DTYPE_NUMBER. Both precision and scale values are kept for these fields. Precision is the character length of the number and scale is the number of decimal places after the decimal point. In some cases, this information can be incorrect in the SAP data dictionary and may need to be corrected in the integration object after it is captured from SAP. These types are supported for BAPI and RFC calls only. All data contained within IDOCs is in character form when passed to or from SAP.
The SAP data types INT1, INT2, INT4 and PREC are binary integer fields in SAP. These will have a Siebel type of DTYPE_NUMBER. These types are supported for BAPI and RFC calls only. All data contained within IDOCs is in character form when passed to or from SAP.
The SAP data types ACCP and NUMC are numeric character strings in SAP. These have a Siebel data type of DTYPE_NUMBER. While a NUMC field does not normally have a scale value, as it generally represents an integer, a scale value can be entered for the field in the Siebel Integration Object. In this event, a decimal point is created at the appropriate place. This feature supports BAPI interfaces that send integer values that are intended to have fixed decimal places. For example, if the number "00054321" is sent as a NUMC field and the comment for the field indicates that the number should be interpreted as 543.21, the Siebel SAP adapters have the capability of inserting the decimal point at the correct position, if the external scale value for the field is set to 2. When the number is sent to SAP, the decimal point is removed. NUMC and ACCP fields are also padded on the left with zeros prior to sending to SAP. Leading zeros are removed from NUMC and ACCP fields when the value is received from SAP. These data types are used for both BAPI and IDOC interfaces. However, only BAPI interfaces use the External Scale field to shift the decimal point.
The SAP data type FLTP represents an 8 byte floating point number. This has a Siebel data type of DTYPE_NUMBER. The 8 byte binary floating point number passed from SAP is converted to a character string DTYPE_NUMBER field. The DTYPE_NUMBER field is converted to an 8 byte binary floating point number and passed to SAP. Exponential notation is not supported. The number must be representable as a 16 character field without exponential notation.
IDOC Integration Object fields that represent decimal numbers are treated specially by the adapters. All IDOC data is passed as character strings. The format for a decimal value passed as a character string in an IDOC field is to left-justify the number and place any "-" sign after the number. For example, the value "
-123.45
" would be placed into the IDOC field as"123.45- "
. To handle this situation some special external data types are used in the IDOC Integration Object. These are IDOC-DEC, IDOC-CURR, IDOC-QUAN, and IDOC-FLTP. When an IDOC is sent or received, to or from SAP, the number is converted to or from a DTYPE_NUMBER field. The "-" sign is moved to the front of the number in the DTYPE_NUMBER field.Similarly IDOC Integration Object fields that represent integer numbers are treated specially by the adapters. The types of IDOC-INT1, IDOC-INT2, IDOC-INT4 and IDOC-PREC are treated as if they were NUMC fields with the exception that no scale information is used.
Siebel Applications display SAP material numbers, customer numbers, and sales order numbers with leading zeros. These numbers are stored in this manner in the SAP database, although the leading zeroes are not displayed in the SAP user interface.
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Connector for SAP R/3 Published: 22 August 2003 |