Siebel Connector for SAP R/3 > Customizing Integrations > Building the Interfaces >
Modifying Integration Objects
In general you should not need to modify the BAPI integration object captured by the BAPI Integration Object Wizard. In some cases, however, you may want to modify it. This topic discusses the modifications necessary.
Using Normalization of Internal Tables
In some cases, SAP BAPI and RFC interfaces may denormalize data from several tables into a single internal table passed through the RFC interface. This can make it difficult to extract the data from the interface table into different components. For this reason the Siebel Connector for SAP R/3 provides a way to define multiple components for a single SAP internal table passed through the interface. This is currently implemented for extraction from an SAP internal table, and it applies only to BAPI Output integration objects.
BAPI_SALESORDER_GETSTATUS BAPI is an example of this. The output integration object corresponding to
BAPI_SALESORDER_GETSTATUS was modified after it was captured from SAP. This integration object is used in the Siebel Sales Order to SAP Sales Order standard integration.
Figure 20 shows the modifications made to the integration object component and represents the STATUSINFO table returned by SAP. This SAP internal table contains information that can be separated into three normalized tables.
- Order Header information
- Order Line Item information
- Order Delivery Line Item information
Three new components can be created in the integration object to separate the Header, Line Item, and Delivery Item data. The BAPI adapter can then automatically create these new components from the original component. One component from SAP becomes three normalized components within the Siebel workflow after the invocation of the BAPI adapter.
Figure 20. Normalization of Integration Object Components
To convert a single component to multiple components
- From Siebel Tools, navigate to a BAPI integration object to modify.
- Select the component applet under the integration object.
- Select the component you want to divide into multiple components and make a copy of it for each new component.
- Give each one a new name and new External Name Context.
Make sure the External name retains the original SAP name for the table and the External Name Context is not the same as the External Name for any component.
- Correct the Parent Integration Object field as necessary. In the case of BAPI_SALESORDER_GETSTATUS, the new components form a hierarchy:
Order Header - parent Export Parameters
Order Item - Parent Order Header
Order Item Delivery Item - Parent Order Item
The Parent Integration Object field has been changed to include the parent of each new component.
- The External Sequence number field for components is currently not used by the BAPI Adapter. However, these fields do need to be filled in with values. If two or more components have the same parent, you can optionally give them unique External Sequence numbers.
- Remove fields that are not needed for each component, leaving only the fields that you would like to have in each new component.
- Create appropriate user keys for each component.
User keys provide a list of key fields used to determine uniqueness for a component. To create the user key:
- Select the component the user key needs to be created for.
- Select Integration Component Key from the Object Explorer.
- Add a new record to the Integration Component Keys list.
- Give the key a name, sequence number, and key type of "User Key".
- Select Integration Component Key Fields from the Object Explorer and add new records to the Integration Component Key Fields list, one for each field in the key.
Modifying External Scale Values
In certain cases, it may be necessary to change the External Scale value for numeric Integration Object fields. The External Scale value of a numeric field defines the number of decimals to appear in the number after the decimal point. This may be necessary in the following cases:
- SAP's BAPI interface passes a NUMC field with no decimal point, but the number is intended to be interpreted as a decimal number. For example: the field ORDER_ITEMS_IN-REQ_QTY is defined as a NUMC field but it is intended to be interpreted as a decimal number with three digits after the decimal point. A value of "0009000" then needs to be interpreted as 9.000 rather than 9000. SAP indicates this in the field's description, but no metadata is available in SAP which defines this. The BAPI Adapter has the capability to place the decimal point at the correct position given that the External Scale field is set. In this case the External Scale value would need to be set to 3 in the integration object.
- Incorrect currency values can be passed through the BAPI interface depending upon currency being used in the application. There are differences between the scale value passed to the BAPI wizard as metadata and the actual scale value for the data. If you find that the decimal point has moved after sending or receiving a currency value, you may need to adjust the External Scale value for the Integration Object field. The External Scale value of a numeric field defines the number of decimals to appear in the number after the decimal point.