As a first step in business object processing, the connector converts a business object into a flat structure that can be processed in the SAP application. The format of the flat structure is the same for all types of business objects (such as Call Transaction-based or IDoc-based business objects). The flat structure is reformatted data from an application-specific business object. The only difference between the two forms of data is that the flat structure does not maintain parent and child business object relationships. Therefore, the connector relies on a set of rules to create a flat structure.
When converting a business object into a flat structure, the connector creates a structure in memory and then populates it with data from the business object. In doing so, it passes the following data into the SAP application from the business object:
Table 39 shows the generic flat structure of a business
object. The connector uses this flat structure when adding the business
object data from a WebSphere business object.
Table 39. Generic Flat Structure Representation of a WebSphere Business Object for SAP
Field Name | Data Type | Length | Description |
---|---|---|---|
ATTR_NAME | CHAR | 32 | Attribute Name (example, CustomerId) |
BLANK1 | CHAR | 1 | Delimiter |
ATTR_VALUE | CHAR | 200 | Attribute Value (example, 00000103) |
BLANK2 | CHAR | 1 | Delimiter |
ISKEY | CHAR | 1 | 1= true, 0 = false; attributes only |
BLANK3 | CHAR | 1 | Delimiter |
ISNEW | CHAR | 1 | 1 = BO; 0 = verb or attribute |
BLANK4 | CHAR | 1 | Delimiter |
PEERS | CHAR | 6 | Indicates number of peers of an array of business objects |
BLANK5 | CHAR | 1 | Delimiter |
OBJ_NUMBER | CHAR | 6 | Not used |
BLANK6 | CHAR | 1 | Delimiter |
APPTEXT | CHAR | 120 | Application-specific information of object, verb or attribute |
BLANK7 | CHAR | 1 | Delimiter |
In order for the data conversion to work properly, the business object data in the flat structure must strictly adhere to a set of rules. These rules are defined in this initial data conversion step:
When the connector populates the flat structure with business object data, the connector loops through each business object twice, beginning with the top-level business object.
Attributes that represent child business objects are not included in their parents. Instead, each child that contains data is created as a complete business object. The result is a single list of attributes ordered by depth, then breadth.
Figure 70 illustrates the data conversion of a WebSphere business object for SAP into a flat data structure. The conversion of data always follows the rule of depth first and then breadth. In the example, the top-level parent business object, SAP_Order, has two children, SAP_LineItem (1) and SAP_LineItem (2), which are considered peers. SAP_LineItem (1) has one child business object, SAP_ScheduleLines.
Figure 70. Conversion from a business object to a flat structure
It is important to understand the ordering of the business objects and
their attributes when designing a business object definition. The
following tables illustrate the result of the conversion of an WebSphere
business object to a flat structure. Table 40 represents a flat structure for a flat business object,
SAP_Material, whose key value is ItemID. In this example, there is no
application-specific information for the business object or any of the
attributes. Table 41 represents a flat structure of a hierarchical business
object based on an IDoc Sales Order.
Table 40. Flat business object SAP_Material
ATTR_NAME | ATTR_VALUE | ISKEY | ISNEW | PEERS | OBJ_ NUMBER | APPTEXT |
---|---|---|---|---|---|---|
BoName | SAP_Material | 0 | 1 | 1 | (blank) | (blank) |
BoVerb | Retrieve | 0 | 0 | 1 | (blank) | :Y_XR_
DYNAMIC_RETRIEVE |
ItemID | 000000000000001179 | 1 | 0 | 1 | (blank) | (blank) |
ShortDesc | CxIgnore | 0 | 0 | 1 | (blank) | (blank) |
ObjectEventID | SAP_124 | 0 | 0 | 1 | (blank) | (blank) |
In this example, there is no application-specific information for the
business object or any of the attributes.
Table 41. Hierarchical business object based on an IDoc sales order
ATTR_NAME | ATTR_VALUE | ISKEY | ISNEW | PEERS | OBJ_ NUMBER | APPTEXT |
---|---|---|---|---|---|---|
BoName | SAP_Order | 0 | 1 | 1 | (blank) | YXRV4B01 |
BoVerb | Create | 0 | 0 | 1 | (blank) | [archive:methods] |
Currency | USD | 0 | 0 | 1 | (blank) | E1EDK01:CURCY |
OrderId | CxIgnore | 1 | 0 | 1 | (blank) | E1EDK01:BELNR |
ObjectEventId | SAP_124 | 0 | 0 | 1 | (blank) | E1EDK01: ObjectEventId |
BoName | SAP_LineItem | 0 | 1 | 2 | (blank) | Z1XRV40 |
BoVerb | Create | 0 | 0 | 2 | (blank) | (blank) |
Createdby | User1 | 1 |
| 2 | (blank) | Z1XRV40:ERNAM |
ObjectEventId | SAP_125 | 0 | 0 | 2 | (blank) | Z1XRV40: ObjectEventId |
BoName | SAP_ ScheduleLines | 0 | 1 | 1 | (blank) | E1EDK14 |
BoVerb | Create | 0 | 0 | 1 | (blank) | (blank) |
Qualifier | 001 | 1 | 0 | 1 | (blank) | Z1XRV40:QUALF |
OrganizationId | 1000 | 0 | 0 | 1 | (blank) | E1EDK14:ORGID |
ObjectEventId | SAP_126 | 0 | 0 | 1 | (blank) | E1EDK14: ObjectEventId |
BoName | SAP_LineItem | 0 | 1 | 2 | (blank) | Z1XRV40 |
BoVerb | Create | 0 | 0 | 2 | (blank) | (blank) |
Createdby | User1 | 1 | 0 | 2 | (blank) | Z1XRV40:ERNAM |
ObjectEventId | SAP_127 | 0 | 0 | 2 | (blank) | Z1XRV40: ObjectEventId |
The first two rows, BoName and BoVerb, are added by the connector for each business object. BoName and BoVerb are keywords that cannot be used as business object attributes.