Editing Data Type & Message Type Artifacts
- How to edit the data type and message type artifacts and the dependencies.
Prerequisites
- You have enabled the Cloud Integration capability of SAP Integration Suite and have subscribed to standard or above service plans.
- Configuring SAP Cloud Connector with on premise Enterprise Service Repository (ESR).
- Configure connection to ESR.
Once you create the data type and message type artifacts you might need to edit those. But before editing, you must be aware about all the details of these artifacts. Let’s learn different terminologies and details that you can view for these artifacts and then, how to edit those.
Both these artifacts have three tabs each:
- Overview: Lists the general details
- Structure: Represents the nodes in a hierarchical format in a table
- XSD: Displays the XML Schema Definition (XSD) that is, the text view of artifact in read-only mode. When you edit the data type or message type artifact, the data in the XSD tab is automatically updated.
- Step 1
Now before proceeding, let’s understand some terms here:
Terms Description Elements & Attributes Data type consists of elements and attributes. The difference between elements and attributes is that attributes don't have any child node, and you can't use the same attribute more than once in an element.Category Category can be Simple or Complex. The root nodes can be of two types; Complex or Simple. Only Complex Types can have child nodes.Complex and Simple Data Type Complex data types can have child nodes whereas simple types cannot.For data type artifact, you can find following details of in the Overview and Structure tabs.
Tab Field Description Overview NameName of the data typeOverview IDUnique ID of the artifactOverview NamespaceTarget namespace to which data type belongs to or where it's createdOverview VersionThe current version of data typeOverview Created On & Created ByUser who created the data type and on which dateOverview DescriptionDescription text added while creating the data typeOverview ES Repository informationESR information linked with the data type
Tab Field Description Editable Structure NameName of the data typeYes except root nodeStructure CategoryDisplays category of the node. Root node can be Simple or Complex Type. Child node can be Elements or AttributesNoStructure TypeBuilt-in data type (example string, decimal, or integer) or reference to an existing data type for an element or attributeYesStructure OccurrenceAppears only for attributes, can be required or optionalYesStructure RestrictionsRestriction of the value range of nodesYes

Most of these fields will be empty when you create new artifacts from Cloud Integration. To assign values in this case, you must edit the artifact.
- Step 2
For data types, you can only edit following details from Structure tab.
When you select the node, you see following more details. Now, can click Edit to modify or add the details. So, basically for a data type you can edit only following fields:

- Name: You can change the name of any node except the root node. The name of two nodes can’t be same.
- Type: You can switch from the primitive type to referenced data type, that is, if your data type is defined by built-in type then you can change and assign a user-defined data type or vice versa.
-
If you switch from Primitive to User-Defined: The namespace and package name of the referenced data type will be auto populated.
Note: For root node and child attributes, you can reference only Simple Data Types. So, only those allowed Data Types will be listed in the dialog box.


-
If you switch from User-Defined to Primitive: Choose the Value and namespace will be auto populated depending upon your choice of built-in or derived values.

Moreover, consider the following details before modifying or assigning a new type to any node:
Node Kind of Modification in Type Impact Child ChangeOn current node onlyParent Element ChangeAll child attributes deletedRoot Node ChangeAll sub elements deleted. Attributes are retained.Root Node AssignAll sub elements deleted. Attributes are retained.Parent Element AssignAll sub elements deleted. Attributes are retained.- Occurrence: If the selected node is an Attribute, you can decide whether it is Required or Optional.
- Max Occurs and Min Occurs: For elements, you can decide its maximum and minimum occurrences.
Now, based on what ‘Type’ is selected for a node, Restrictions are populated. These restrictions only appear for Simple Data types, elements or attributes with Primitive Type assigned to them. These are used to limit the value range of these nodes. To know more about the restrictions and its value range, see Restrictions.
- Step 3
Adding Nodes
When you edit a data type, other than editing the existing nodes, you can also add new nodes, that is, new elements and attributes. To do so follow these steps:
- Select the node where you want to add a child element or attribute. Choose Edit.
- Choose Add and select whether you wish to add Element or Attribute. If you wish to add multiple row of element or attributes, choose Rows. Specify the number of rows to be added and choose Add.
However, below mentioned are few conditions, which apply for such additions:

Node Category Type Add Element Add Attribute Root ComplexAssigned (Any)NoYesRoot ComplexNot assignedYesYesAny SimpleAnyNoNoChild Element ElementPrimitive or user-defined simple data typeNoYesChild Element ElementUser-defined complex data typeNoNoChild Element ElementNot assignedYesYesChild Attribute AttributeAnyNoNoDeleting Nodes
You can also delete nodes from the data type. To do so follow these steps:
- Use the checkboxes to select the rows that you want to delete. Only editable nodes can be deleted.
- Choose Delete just above the table. Following rules apply for node deletion:

Node Category Type Delete Node Root AnyAnyNoChild Element or Attribute AnyPrimitive or unspecifiedThe selected node along with all child nodes are deletedChild Element AnyUser-defined data typeParent node along with child nodes of the user-defined data type gets deletedNote: When you assign a user-defined data type to an element, the child nodes populated from that user-defined data type can only be deleted from the referenced data type only. So, from the current data type’s structure, you can delete the parent element only.
For example, in ‘xyz’ data type ‘Element1’ is a child element, which refers to ‘tutorial_test’ data type. Here, you will only be allowed to delete the parent element ‘Element1’ and not its child nodes (the checkboxes are disabled). To delete the child nodes, you must do it from ‘tutorial_test’ data type.
Once you edit the data types, you can then save the data types directly or save the data types as a new version. You can do so even if you have errors in your data type structure.
Using Cut, Copy, Paste, Drag, Drop, Up, and Down
You can change the positions of the nodes by using quick actions like drag, and drop, move up and down.
Use cut, copy, paste actions to modify the data type structure and reuse existing node formats respectively.
None of these actions can be performed on the root node. Multi-select is not allowed for any of these actions.
Cut, Copy, Paste
- Use the checkbox to select the node to be cut, copied.


- Select the node below which you wish to paste the cut or copied node.

Note: All the rules for deleting and adding the node will apply when you cut and paste the nodes respectively.
Drag and Drop
Use drag and drop to change the positions of the nodes.
Note: The nodes re always added below the target drop node. All the rules for adding and deleting nodes will apply while placing the nodes at the desired location. If dropping of the node is not possible at the selected target location, the node retains its older position.
Move Up and Down
Use the up and down arrows (above the table) to change the positions of the nodes.
-
Use the checkbox to select the node to be moved.
-
Use the up or down action buttons to change the position of the selected node.


Note: You cannot move up an immediate child node(first node under a parent) at all hierarchies. And, you cannot move last node in a hierarchy down.
- Step 4
Message Types comprises a data type that describes the structure of a message. You can find the following details.
Following details you see as soon as you land on the Structure tab.
Tab Field Description Editable Structure NameName of the message typeNoStructure CategoryIt can be Elements or AttributesNoStructure TypeDisplays the referenced data type assigned to the root node and built-in data type (decimal, string, or integer) of the child nodes.YesStructure OccurrenceAppears only for attributes, can be required or optionalNoStructure RestrictionsRestriction of the value range of nodesNoStructure > Right-hand panel NamespaceThe namespace to which Message Type belongs to or where it's created.YesWhen you select a row you see additional details in view only mode. The Restrictions are non editable and depend upon the used user-defined data type.
- Step 5
For message types, you can only edit the Data Type Used from both Overview and Structure tabs.
From Structure & Overview tab:
- Choose Edit.


- Select a row to view the additional details.
- Following fields can be edited in the right hand-panel of Structure tab or from Overview tab:
- Data Type Used: Choose Select. Select the integration packages from which you wish to list the data types. Select the data type to be assigned. The structure of the selected data type gets loaded in the tree table.



> Note: You can edit the referenced data type of the root node only.
- Namespace (Only editable from Overview tab): If the namespace is not mentioned, you can enter a new one or modify the existing one.

Note:
- XMLNamespace should begin with an alphabet and cannot contain tilde (~), back-quote (`), and caret(^).
- The XMLNamespace ‘http://www.w3.org/2001/XMLSchema’ is dedicated to schema components and cannot be used.