Entering content frameFunction documentation Data Types Locate the document in its SAP Library structure

Use

A data type is a basic unit for defining the structure of the data for a message type and, as a result, for the message to be exchanged.

Integration

A data type is an XML Schema Definition (XSD). This definition determines how the valid payload of a message will look. Data types in XML schema are only an abstract description of a structure that you can assign to elements in an XML schema definition. A message type or a fault message type that links to a data type then determines the name of the root element of a message.

Prerequisites

See the Prerequisites section in introduction to interface development.

Features

Data Type Categories

Category

Meaning

Examples

Built-In Type

Built-in data types are part of the XML schema language and have the prefix xsd. (They can also be subdivided into primitive and derived data types, but this is not important in the definition of data types). XML schema defines a value range for each built-in data type.

xsd:string

xsd:decimal

xsd:integer

Simple Type

Simple data types refine built-in data types, for example, by limiting the length of a string or by specifying a specific value range. Like built-in data types, they do not contain any further elements.

<simpleType
   name="germanPhoneNumber"
   base="string">
 <pattern
  value="?\d{4}?/?\d{6}" />
</simpleType>

Complex Type

Data types that can contain further elements and attributes. Elements and attributes can in turn reference built-in, simple, complex, or global data types. This enables large complex data types to be structured using smaller complex data types.

<complexType name="person">
 <element
     name="firstname"
     type="string" />
 <element
     name="lastname"
     type="string" />
</complexType>

Note

You can refine simple data types and fields of complex types by using facets.

Referencing of Data Types

You can structure data types in nested way by referencing data types from a complex data type. However, you must ensure that the referencing and the referenced data type are shipped together otherwise the data type definition is not complete. For this reason, the following restrictions exist for the use of data types (also see: versioning and compatibility):

Referencing of Data Types

Category

Can Be Referenced In

Built-In Type

All software component versions

Simple Type

The same software component version or a sub-software component version of the referencing data type.

Complex Type

The same software component versions or sub-software component versions of the referencing data type.

Caution

You cannot structure a data type recursively, in other words, references of type
Data Type_1 ® Data Type_1 and transitive references of type
Data Type_1 ® Data Type_2 ® Data Type_1 are not permitted ("® " means "referenced" in this example).

Activities

  1. Create a data type in the design maintenance of the Integration Builder (see: Creating a New Object).

There are two further tab pages on the tab page for data types:

  1. Use the XSD editor to define simple data type or a complex data type.
  2. Save your changes.

 

 

 

 

Leaving content frame