Adapter for SAP 10.1 | webMethods Adapter for SAP Documentation | webMethods Adapter for SAP Installation and User’s Guide Documentation | Working with Code Pages | Using Different Code Pages | To Encode Data from SAP Systems
 
To Encode Data from SAP Systems
To create the standard SAP XML you would use the service pub.sap.rfc:encode, which handles encoding automatically.
Note:
If you wish to create other XML-documents from SAP data, you should be careful to avoid problems with code pages whenever you receive data from an SAP system (e.g. a response to an outbound Remote Function Call or via an inbound call).
You need to set the encoding attribute in the XML-document manually:
*Use the following steps if you are using pub.xml:documentToXMLString
1. Extend your document by adding the attribute @encoding as a String as a child of the root element.
2. Insert the proper default value (e.g. Shift-JIS, if your source data is Shift-JIS encoded).
3. In the pub.xml:documentToXMLString Service, map your document to input field "document".