Creating sap bapi otds, 1 sap bapi encoding, Chapter 4 – Sun Microsystems eWay SAP BAPI User Manual
Page 39: Sap bapi encoding, Creating sap bapi otds” : p
eWay™ Adapter for SAP BAPI User’s Guide
39
Sun Microsystems, Inc.
Chapter 4
Creating SAP BAPI OTDs
The SAP BAPI wizard is used to create BAPI and RFC OTDs. You use these OTDs in
Java Collaborations and eInsight business processes to create the needed business rules
to communicate with SAP R/13.
What’s In This Chapter
Date and Time Stamp Requirements
4.1
SAP BAPI Encoding
SAP BAPI/RFC OTDs are encoding independent of the SAP R/3 system. This means
that OTDs created on a Unicode SAP R/3 instance can seamlessly interact with non-
Unicode SAP R/3 instances, and vice versa.
In addition, the marshal and unmarshal encoding methods on the
IDOC_INBOUND_ASYNCHRONOUS OTD only apply to the data, and not to the SAP
R/3 instance. The default for all processed byte data is UTF-8, regardless of connection
type (Unicode or non-Unicode).
When attempting to unmarshal data flows using an encoding other than UTF-8, such as
UTF-16, then you must also call the setUnmarshalEncoding method to specify this
encoding. This enables the eWay to properly unmarshal the byte array.
You also need to set the correct Character Set in the Environment parameters for an
inbound eWay when receiving data from SAP R/3. This way, the eWay knows whether
it is receiving Unicode or non-Unicode data from the SAP R/3 instance. The
setMarshalEncoding method is only for marshaling the OTD data into a byte array and
is not related to the SAP R/3 system character set.
Like the outbound data flows mentioned above, attempting to marshal data flows
using an encoding other than UTF-8, such as UTF-16, requires setting the
setMarshalEncoding method to match this encoding. This enables the data received
from SAP R/3 to be correctly converted to a byte array of the desired encoding.