Siebel Connector for SAP R/3 > Installation and Configuration > SAP Code Page Configuration >

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 code page 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 code page 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 code page 1100 (Latin-1, European) and from an SAP implementation using code page 8000 (Shift-JIS, Japanese). However, you are then responsible for programmatically making sure that code page 8000 data is not returned to the code page 1100 SAP implementation, as Japanese characters cannot be converted to the European character set defined by code page 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 code page, all data that is transported to and from SAP is transported in a single code page. When data is sent from the Siebel database to SAP through the BAPI Adapter, the adapter retrieves the code page from SAP automatically after connecting. It then looks up the SAP code page value in the SAP Code Page EAI Value Map and uses the corresponding Siebel code page 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 code page value from SAP each time a packet of data is sent from SAP. It then looks up the SAP code page value in the SAP Code Page EAI Value Map and uses the corresponding Siebel code page value to translate all data it receives from SAP from the SAP code page to Unicode.

The interface to a Multi-Display Multi-Processing SAP implementation is similar. The difference is that the code page 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 code page. 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 code page 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 code page. 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 code page is retrieved from the new connection and data is processed using the new code page.

You can customize the handling of errors that occur during code page conversion by using the SAPIgnoreCharSetConvErrors parameter. When this parameter is set to True, errors in code page 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