Definition
The web service interface Query Business Document Message Monitoring Information enables an external application to connect to your SAP Business ByDesign system and query the business messages.
Scope
The web service interface Query Business Document Message Monitoring Information allows querying of asynchronous application-to-application (A2A) and business-to-business messages (B2B).
Business Context and Use
The web service interface Query Business Document Message In offers two operations
1. Find By Elements
2. Read Message Payload
More Information
You can find general information about Web services, their structure and consumption in the Web Services documentation. Please open the Web Services document in a new window.
Definition
This operation could be used to read the payload of specific business messages. The specific business message can be identified by passing the selection parameter MessageID (BusinessDocumentMessageID as received in the response of the operation FindByElements)
Structure
SelectionByBusinessDocumentMessageID
Example
Here is an example of a web service request, which is trying to query the payload of a specific business message with message ID 00163E04ED391ED5A59AD90C2A7C9885.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
<soap:Header/>
<soap:Body>
<glob:BusinessDocumentMessageMonitoringReadMessagePayloadRequest>
<BusinessDocumentMessageMonitoringReadMessagePayloadByMessageID>
<SelectionByBusinessDocumentMessageID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryIdentifier>00163E04ED391ED5A59AD90C2A7C9885</LowerBoundaryIdentifier>
</SelectionByBusinessDocumentMessageID>
</BusinessDocumentMessageMonitoringReadMessagePayloadByMessageID>
</glob:BusinessDocumentMessageMonitoringReadMessagePayloadRequest>
</soap:Body>
</soap:Envelope>
Usage
Response Message
The structure of the query response message consists of three parts:
• A business specific part containing the payload of the business message
• Processing conditions
• Log items containing system messages including errors, warnings, and information messages raised by the system during processing of the web service request.
Definition
This operation could be used to select multiple business messages using a range of selection parameters. Selection parameters being -
1. CreationDateTime: The date when the business message was created. Example: 2015-12-01T00:00:00.1234567Z
2. ExecutionDateTime: The date and time when the business message status was changed. Example: 2015-12-01T00:00:00.1234567Z
3. MessageDirection: A coded representation of the direction of message transmission. Possible value are 1 or 2. The meaning of the coded values:
1 Incoming
2 Outgoing
4. LocalPartyID: A unique identifier for the local party involved in the business document message monitored. Example: ID of the SAP Business ByDesign System which is communicating with an external external application (e.g: Point of Sales application) or the Business Partner.
5. RemotePartyID: A unique identifier for the remote party involved in the business document message monitored. Example: ID of the external application (e.g: Point of Sales application) or the Business Partner which is communicating with your SAP Business ByDesign System.
6. Status: The transmission status of the business message. Possible values are numbers 1 to 9. The meaning of the coded values:
1 In Process
2 Received
3 Acknowledged
4 Long Running
5 Content Error
6 Technical Error
7 Obsolete
8 Not Started
9 Canceled
7. BusinessDocumentMessageID: A unique identifier for the technical message (the ID element seen in the SOAP message header) that represents the business message.
8. AdapterType: A coded representation of the communication profile type used for the business document message monitored. Possible values are numbers like 10, 11, 12, 13, 14, 15, 19, 20, 23 or 24. The meaning of these coded values are:
10 SOAP Inbound
11 SOAP Outbound
12 SOAP Outbound and Inbound
13 XI Inbound
14 XI Outbound
15 XI Outbound and Inbound
19 Web Service Inbound
20 Web Service Outbound
23 IDOC Inbound
24 IDOC Outbound
9. ReferenceMessageID: A unique identifier of the business message to which the business message (BusinessDocumentMessageID) refers to.
10. DocumentID: A unique identifier of the business object instance that is involved in the business message.
Structure
SelectionByCreationDateTime
SelectionByExecutionDateTime
SelectionByMessageDirection
SelectionByLocalPartyID
SelectionByRemotePartyID
SelectionByStatus
SelectionByBusinessDocumentMessageID
SelectionByAdapterType
SelectionByReferenceMessageID
SelectionByDocumentID
Example
Request Message
Here is an example of a simple web service request, which queries business messages with certain criterion specified.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
<soap:Header/>
<soap:Body>
<glob:BusinessDocumentMessageMonitoringQueryRequest>
<BusinessDocumentMessageMonitoringQueryByElements>
<!-- Outgoing business message-->
<SelectionByMessageDirection>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryCode>2</LowerBoundaryCode>
</SelectionByMessageDirection>
<!-- Creation DateTime of the business message -->
<SelectionByCreationDateTime>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>9</IntervalBoundaryTypeCode>
<LowerBoundaryDateTime>2015-12-01T00:00:00.1234567Z</LowerBoundaryDateTime>
</SelectionByCreationDateTime>
<!-- Involved Business Object ID - 2023 -->
<SelectionByDocumentID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryIdentifier>2023</LowerBoundaryIdentifier>
</SelectionByDocumentID>
<!-- transmission status of the business message is between 4 (Long Running) and 6 (Technical Error) -->
<SelectionByStatus>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>
<LowerBoundaryCode>4</LowerBoundaryCode>
<UpperBoundaryCode>6</UpperBoundaryCode>
</SelectionByStatus>
<!-- Local party could be the process component in your SAP Business ByDesign. e.g: SAPServiceDeliveryProcessing -->
<SelectionByLocalPartyID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryIdentifier>SAPServiceDeliveryProcessing</LowerBoundaryIdentifier>
</SelectionByLocalPartyID>
<!-- Remote party can be a business partner or communication system. E.g: Central_GlobalBusinessBackbone -->
<SelectionByRemotePartyID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryIdentifier>Central_GlobalBusinessBackbone</LowerBoundaryIdentifier>
</SelectionByRemotePartyID>
</BusinessDocumentMessageMonitoringQueryByElements>
<ProcessingConditions>
<!-- a maximum or two records are expected -->
<QueryHitsMaximumNumberValue>2</QueryHitsMaximumNumberValue>
<QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
</ProcessingConditions>
</glob:BusinessDocumentMessageMonitoringQueryRequest>
</soap:Body>
</soap:Envelope>
Usage
Response Message
The structure of the query response message consists of three parts:
• A business specific part containing the payload of the business message
• Processing conditions
• Log items containing system messages including errors, warnings, and information messages raised by the system during processing of the web service request.