The metadata generated by enterprise metadata discovery provides the adapter with instructions on how to process BAPI business objects. Metadata is generated at the business-object level, the operation level, and the property level.
Business-object-level metadata is metadata that defines the top-level wrapper of the business object. The following table describes the business-object metadata elements of a BAPI business object.
Metadata element | Description |
---|---|
Type | The business object type.
|
Operation | The valid operations include Create, Update,
Delete, and Retrieve. The specified operation metadata is defined in the sapBAPIOperationTypeMetadata
tag and contains the following:
|
Property-level metadata is metadata that represents child objects or an array of child objects. The following table describes the metadata elements of a complex property (child) or structure or table property (an array of child objects)
Metadata element | Description |
---|---|
FieldName | The BAPI field name as represented in SAP. |
FieldType | The type of the property as it exists in SAP. |
PrimaryKey | An indication about whether this property is a primary key. |
ParameterType | The direction of the mapping.
|
MaxLength | The length of the field. |
ForeignKey | The foreign-key relationship. This element applies only to BAPI result sets. |
Operation-level metadata is metadata that specifies the method name of the BAPI in the SAP system. This name is used by the adapter to determine the action to take on the BAPI. The following table describes the operation-level metadata elements of a BAPI business object.
Metadata element | Description |
---|---|
MethodName | The name of the BAPI call (method) in the SAP system. |
Name | The name of the business object operation associated with the MethodName. |
Operation-level metadata for a BAPI, a BAPI transaction, and a BAPI result set are shown in the figures in the Business-object-level metadata section. Notice that the BAPI transaction has three MethodName values listed–two for the BAPIs in the transaction and one for the COMMIT. The operations are listed in the sequence in which they are called.