Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, August 6, 2008

Data Types Developing Message Interfaces

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 references a data type determines the name of the root element of a message.

Alternatively, you can use external definitions, which already contain data types, or import an XSD definition as a template.

Customers and partners can use data type enhancements to add their own fields to SAP data types in the Integration Repository.

Prerequisites

For more information, 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.



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.




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

Referencing of Data Types

You can structure data types in a 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 (see also: Version Management):

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

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 “references” in this example).

Activities

...

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

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

Choose the Type Definition tab page to use the XSD editor to describe your data type in XML schema. The editor simplifies the structure of the data type by limiting it to the essential language elements only and converting it to a valid XML schema definition.

Choose the XSD Definition tab page to display the XML schema definition as text.

2. Use the XSD editor to define a simple data type or a complex data type.

3. Save your changes.

No comments:

Archives