Adapter for SAP 10.1 | webMethods Adapter for SAP Documentation | webMethods Adapter for SAP Installation and User’s Guide Documentation | Built-in Services | IDoc Services | pub.sap.idoc:encodeSDATA
 
pub.sap.idoc:encodeSDATA
Converts every SDATA field from a Document object to a String object.
This service is usually called prior to sending an IDoc to an SAP system via pub.sap.client:invokeTransaction or by an RFC adapter service for function module "IDOC_INBOUND_ASYNCHRONOUS" or "INBOUND_IDOC_PROCESS".
Note:
There is also a client service called pub.sap.client:sendIDoc that allows you to send the iDocList directly.
Input Parameter
serverName
SAP system alias which is used as repository for structure information about the IDoc. The name must match a configured RFC connection alias at Adapter for SAP.
IDOC_CONTROL
IDOC_DATA
- OR -
IDOC_CONTROL_REC40
IDOC_DATA_REC40
Both keys are Document lists (Tables) containing the control and data tables for the IDoc.
The SDATA field is a Document object containing the keys and values from the segment table (the name of the segment table is specified by the SEGNAM field).
Note:
This service handles both IDoc versions 2 and 3. The difference between the two is that, for IDocs version 2, the service looks for IDOC_CONTROL and IDOC_DATA in the pipeline. For IDocs version 3, it looks for IDOC_CONTROL_REC_40 and IDOC_DATA_REC_40.
iDocList
- OR -
Contains the IDoc(s) as object of com.sap.conn.idoc.IDocDocumentList.
$encoding
Optional. Specifies the encoding used in the output document's XML header, e.g. iso-8859-1.
Return Values
IDOC_CONTROL
IDOC_DATA
- OR -
IDOC_CONTROL_REC40
IDOC_DATA_REC40
Both keys are document lists (Tables) containing the control and data tables for the IDoc.
The SDATA field is a 1000-byte field.
At this point, the IDoc in the pipeline is ready to be sent to an SAP system via either pub.sap.client:invokeTransaction or an adapter service for one of the function modules (IDOC_INBOUND_ASYNCHRONOUS" or "INBOUND_IDOC_PROCESS").