Application-specific information in business object definitions provides the connector with application-dependent instructions on how to process business objects. This information includes:
If you extend or modify an application-specific business object, make sure that the application-specific information in the business object definition matches the syntax that the connector expects.
The following sections discuss this functionality in more detail.
The verb of the top-level business object specifies the class for the vDynRetBOH business object handler. This application-specific information should always be the following:
sap.bapimodule.vDynRetBOH
The application-specific information for attributes specifies the following information:
The application-specific information format consists of four name-value parameters, each of which includes the parameter name and its value. Each parameter set is delimited from the next by a colon (:).
The format of attribute application-specific information is shown below. Square brackets ([ ]) surround an optional parameter. A vertical bar (|) separates the members of a set of options. Reserve the colon as a delimiter.
TN=TableName:CN=ColumnName:[FK=[..]fk_attributeName]:[OP=GT|GE|EQ|NE|LE|LT|LIKE]
Table 46 describes each name-value parameter.
Table 46. Name-value parameters in attribute application-specific information
Parameter | Description |
---|---|
TN=TableName | The name of the database table |
CN=ColumnName | The name of the database table column (field) |
FK=[..]fk_attribute Name | The value of
this property depends on whether the foreign-key relationship is
stored in the parent business object or the current business
object:
If an attribute is not a foreign key, do not include this parameter in the application-specific information. |
OP=GT|GE|EQ|NE|LE|LT| LIKE | The operand
options are:
It is recommended that you specify EQ to maximize performance. If no operand is specified, the connector uses EQ. |
The required parameters for each simple attribute are the table name and column name. The operand defaults to EQ (equals). The following example illustrates the basic format:
TN=KNA1:CN=KUNNR
It is permissible for simple attributes within a business object to have no value specified (that is, zero length) for application-specific information fields. The connector ignores such attributes. This is a convenient way to ensure that the connector does not process placeholder attributes used to separate adjacent arrays of child business objects.
If none of the application-specific information in any of a business object's attributes provide sufficient information for the connector to build or execute a query, the connector returns a failure.
Figure 35 provides an example of a WebSphere business object with two foreign keys that reference attributes within the business object. In this case, the business object represents data in two tables, one containing address data and the other containing lookup data for state/province and country abbreviations. To process this data, the connector performs two table reads.
Figure 35. Example: current
business object stores the foreign key
Table 47 documents the table name, column name, key, and foreign-key for each attribute in the example SAP_Address:
Table 47. Description of example business object attributes
Attribute | Table name | Column name | Key | Foreign key | Default |
---|---|---|---|---|---|
address_id | ADRC | ADDRNUMBER | true | ||
city | ADRC | CITY1 | false | ||
state | ADRC | REGION | false | ||
country | ADRC | LAND1 | false | ||
language | T005U | SPRAS | true | E | |
fk_country | T005U | LAND1 | false | FK=country | |
fk_state | T005U | BLAND | false | FK=state | |
state_description | T005U | BEZEI | false |
Given the information in Table 47, the application-specific information for the fk_state attribute is:
TN=T005U:CN=BLAND:FK=state
The application-specific information for the fk_country attribute is:
TN=T005U:CN=LAND1:FK=country
The following SELECT statements illustrate the WHERE clause that the connector builds to retrieve data from the tables represented by SAP_Address:
SELECT * FROM ADRC WHERE ADDRNUMBER = address_idValue SELECT * FROM T005U WHERE SPRAS = 'E' AND LAND1 = countryValue AND BLAND = stateValue