Siebel Connector for SAP R/3 > Installing and Configuring the SAP Connector > SAP Codepages and Corresponding EAI Value Mappings >

BAPI Adapter and BAPI Receiver


The BAPI Adapter and BAPI Receiver for Siebel 7.5 support SAP implementations using single codepages as well as Multi-Display Multi-Processing SAP implementations. Multi-Display Single Processing SAP implementations are not supported, as these use special SAP blended codepages. For the BAPI Adapter and BAPI Receiver, no additional configuration is required. The BAPI Adapter and BAPI Receiver retrieve SAP's codepage from SAP and convert data based on this value. This is true even if the BAPI Adapter and Receiver are working with multiple SAP installations that are based on different codepages.

CAUTION:  If you are interfacing to multiple SAP implementations with different codepages, you are responsible for partitioning the data within the Siebel application so the data can be correctly transported to SAP with the correct codepage for that data. For example, if you are using Siebel applications with a Unicode database it would be possible to store data in Siebel data received from an SAP implementation using codepage 1100 (Latin-1, European) and from an SAP implementation using codepage 8000 (Shift-JIS, Japanese). However, you are then responsible for programmatically making sure that codepage 8000 data is not returned to the codepage 1100 SAP implementation, as Japanese characters cannot be converted to the European character set defined by codepage 1100. Siebel Systems provides no predefined method for partitioning the data based upon the application it originated in.

When interfacing to an SAP implementation based on a single codepage, all data that is transported to and from SAP is transported in a single codepage. When data is sent from the Siebel Database to SAP through the BAPI Adapter, the adapter retrieves the codepage from SAP automatically after connecting. It then looks up the SAP codepage value in the SAP Codepage EAI Value Map and uses the corresponding Siebel codepage value to translate all data passing between the Siebel application and SAP.

When data is sent from SAP to the Siebel application through the BAPI Receiver, the receiver retrieves the codepage value from SAP each time a packet of data is sent from SAP. It then looks up the SAP codepage value in the SAP Codepage EAI Value Map and uses the corresponding Siebel codepage value to translate all data it receives from SAP from the SAP codepage to Unicode.

The interface to a Multi-Display Multi-Processing SAP implementation is similar. The difference is that the codepage that is automatically retrieved is dependent upon the login language of the user in the SAP implementation. When using the BAPI adapter, the login language defined in the parameter SAPConnectString is used to determine the codepage. When using the BAPI Receiver, the login language of the user responsible for the send of the data to the receiver is used. This means that the BAPI Receiver may receive packets of data in different codepages depending upon who sent the data.

Although not necessary, you can override the automatic retrieval of the SAP codepage from SAP by setting the SAPCodepage parameter to a Siebel Value as defined in Table 10. For the BAPI Adapter, set this parameter on the BusIntMgr component just as you would set the parameters SAPUserName, SAPConnectString, and SAPPassword. For the BAPI Receiver set this parameter on the BAPIRcvr component just as you would set the SAPRfcDestEntry parameter for this component.

Because the codepages are retrieved automatically, the BAPI Adapter can interface to multiple SAP implementations that use different codepages. Starting with Siebel v7.5, the BAPI Adapter can dynamically change its connection and its codepage. To switch the connection from one to another, the parameters SAPUserName, SAPConnectString and SAPPassword must be set as input arguments to the BAPI Adapter business service call made from the workflow. The BAPI Adapter then uses these parameters instead of those set at the BusIntMgr component level. When a call is then made to the BAPI Adapter that is for a different SAP implementation (or different user or language in the same SAP implementation) than the previous call, the old connection to SAP ends and a new connection is made. When the new connection is made, the codepage is retrieved from the new connection and data is processed using the new codepage.

You can customize the handling of errors that occur during codepage conversion by using the SAPIgnoreCharSetConvErrors parameter. When this parameter is set to True, errors in codepage conversion are handled by substituting a question mark (?) for characters that cannot be converted. This parameter can be set on the BusIntMgr component and also on the BAPIRcvr for BAPI Adapter and BAPI Receiver usage respectively.


 Siebel Connector for SAP R/3 
 Published: 22 August 2003