| Description | Query Sales Orders |
| Name | CustomerOrderProcessingQueryCustomerOrderIn |
| Namespace | http://sap.com/xi/A1S/Global |
| Process Component Description | Customer Quote Processing |
| Process Component Name | CustomerQuoteProcessing |
| Process Component Namespace | http://sap.com/xi/AP/CRM/Global |
| Deploymnent Unit Description | Customer Relationship Management |
| Endpoint Activation | By Scoping of Process Component | Operations |
| Release Status | Deprecated |
An interface to query customer orders.
The web service interface CustomerOrderProcessingQueryCustomerOrderIn enables you to connect external applications to your SAP system and to query and read customer orders within your system. The web service interface is relevant if your company wants to access and manage customer order data from external applications.
The web service interface CustomerOrderProcessingQueryCustomerOrderIn offers the operation FindByElements.
Query operations are mass-enabled stateless synchronous web service operations. Transferring or requesting amounts of data that are too large can cause communication timeouts. The web service consumer (external application) is responsible for ensuring reasonable sizes for mass operations.
The query processing conditions specify how to process a query with respect to the maximum number of hits to be returned.
Query request messages provide the following processing parameters:
Query hits maximum number value (element name QueryHitsMaximumNumberValue): Maximum number of hits to be returned by an inquiry.
Query hits unlimited indicator (element name QueryHitsUnlimitedIndicator): Indicates whether the maximum number of hits to be returned by an inquiry is unlimited or not.
Last returned object ID (element name LastReturnedObjectID): Identifies the last object returned by a previous inquiry.
Note: If QueryHitsUnlimitedIndicator = true, QueryHitsMaximumNumberValue must not be filled.
Query response messages provide the following elements:
Returned query hits number value (element name ReturnedQueryHitsNumberValue): The number of hits returned by an inquiry.
More hits available indicator (element name MoreHitsAvailableIndicator): Indicates whether there are more than ReturnedQueryHitsNumberValue hits matching the selection criteria or not.
Last returned object ID (element name LastReturnedObjectID): Identifies the last object returned by this inquiry.
Note: Processing conditions can be used for the paging of query results. However, it is crucial not to change the query selection parameters from request to request. Otherwise, the query result might change.
Query selection parameters are mainly exposed as select options or ranges with an inclusion/exclusion code, interval boundary type code, lower boundary value, and upper boundary value.
The inclusion/exclusion code (element name InclusionExclusionCode) specifies the inclusion or exclusion of a set into a result set.
| Inclusion Exclusion Code | Description |
|---|---|
| E | Excluding |
| I | Including |
The interval boundary type code (element name IntervalBoundaryTypeCode) is used to describe intervals by their boundaries. Depending on the operator, the lower boundary value or both boundary values are relevant.
| Interval Boundary Type Code | Name | Description | |
|---|---|---|---|
| 1 | Equal to | Single value | = X |
| 2 | Between (excluding upper boundary) | Interval with closed lower and open upper boundary | [X, Y) |
| 3 | Between | Interval with open lower and open upper boundary | (X, Y) |
| 4 | Between (excluding both boundaries) | Interval with open lower and open upper boundary | (X, Y) |
| 5 | Between (excluding lower boundary) | Interval with open lower and closed upper boundary | (X, Y] |
| 6 | Less than | Interval with unlimited lower and open upper boundary | < X |
| 7 | Less Than or Equal to | Interval with unlimited lower and closed upper boundary | <= X |
| 8 | Greater Than | Interval with open lower and unlimited upper boundary | > X |
| 9 | Greater Than or Equal to | Interval with closed lower and unlimited upper boundary | = X |
Requested elements (element name RequestedElements) enable web service consumer to specify which elements are to be selected so that response messages contain only data which are required. This reduces also the size of query response messages and thus transmission and response times.
Requested elements contain transmission request codes for controlling the transmission of corresponding query response node elements.
The transmission request codes are modeled as xml attributes following the syntax: <element name>TransmissionRequestCode.
The prefix <element name> is equivalent to the name of the node element in the response message to which the transmission request code applies.
| Transmission Request Code | Name | Description |
|---|---|---|
| 1 | Complete Structure | The node element and all its elements, its child node elements and all their elements will be returned. |
| 2 | Complete Node | The node element and all its elements will be returned. |
| 3 | Node with Key Elements | The node element and its key elements will be returned (not supported by all web service interfaces). |
| 4 | Excluded Node | The node element and its child node elements will not be returned. |
The transmission request code is optional. If no transmission request code is modeled or provided by the service consumer, then the following rules apply:
If no transmission request code is provided at all, then the response message contains all data.
If the transmission request code of the parent node element is 1, then its sub-node elements for which no transmission request code is specified are defaulted by 1.
If the transmission request code of the parent node element is 2 or 3, then its sub-node elements for which no transmission request code is specified are defaulted by 4.
If the transmission request code of the parent node element is 4, then its sub-node elements are not returned anyway.
The structure of the query response message consists of three parts:
A business document-specific part containing the returned business documents
Processing conditions
Log items containing system messages including errors, warnings, and information messages raised by the system during processing of the web service request.
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Possible scenarios include the following:
Select customer orders by
Identifier
Name
BuyerIdentifier
BuyerPartyBusinessPartnerInternalID
LifeCycleStatusCode
RequestedDateTime
DataOriginTypeCode
ApprovalStatusCode
EmployeeResponsibleBusinessPartnerInternalID
SalesUnitID
SalesOrganisationID
DistributionChannelCode
ProductID
LastChangeDateTime
BuyerPartyContactPartyBusinessPartnerInternalID
PartyContactPartyBusinessPartnerInternalID
BusinessPartnerInternalID
PartyRoleCode
Example to select customer orders by name (with prefix A2X):
<n0:CustomerOrderByElementsQuery_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <CustomerQuoteSelectionByElements> <SelectionByName> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryName>A2X*</LowerBoundaryName> </SelectionByName> </CustomerQuoteSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> </ProcessingConditions> </n0:CustomerOrderByElementsQuery_sync_V1>
Example to select customer orders by buyer party (Account: MC9785):
<n0:CustomerOrderByElementsQuery_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <CustomerQuoteSelectionByElements> <SelectionByBuyerPartyBusinessPartnerInternalID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryPartyIdentifier>MC9785</LowerBoundaryPartyIdentifier> </SelectionByBuyerPartyBusinessPartnerInternalID> </CustomerQuoteSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> </ProcessingConditions> </n0:CustomerOrderByElementsQuery_sync_V1>
| Description | Find sales orders |
| Name | FindByElements |
| Synchronous | yes |
| Release Status | Deprecated |
FindByElements is an operation to select customer order.
The request message of the operation FindByElements contains the QueryByElements that groups all possible selection parameters.
| Selection Parameter | Remark |
|---|---|
| SelectionByIdentifier | Selection by ID |
| SelectionByName | Selection by name (description) |
| SelectionByBuyerIdentifier | Selection by buyer ID (external reference) |
| SelectionByBuyerPartyBusinessPartnerInternalID | Selection by internal Business Partner ID of the Buyer Party |
| SelectionByLifeCycleStatusCode | Selection by lifecycle status |
| SelectionByRequestedDateTime | Selection by requested date time |
| SelectionByDataOriginTypeCode | Selection by data origin type |
| SelectionByApprovalStatusCode | Selection by approval status |
| SelectionByEmployeeResponsibleBusinessPartnerInternalID | Selection by internal Business Partner ID of the Employee Responsible Party |
| SelectionBySalesUnitID | Selection by ID of the Sales Unit Party |
| SelectionBySalesOrganisationID | Selection by ID of the Sales Organisation |
| SelectionByDistributionChannelCode | Selection by Distribution Channel |
| SelectionByProductID | Selection by product ID |
| SelectionByLastChangeDateTime | Selection by last change date time |
| SelectionByBuyerPartyContactPartyBusinessPartnerInternalID | Selection by Contact of the Buyer |
| SelectionByContactPartyBusinessPartnerInternalID | Selection by any Contact |
SelectionByBuyerPartyContactPartyBusinessPartnerInternalID |Selection by ID of the Contact Party |
SelectionByBusinessPartnerInternalID| Selection by ID of the Party|
SelectionByPartyRoleCode|Selection by Party Role Code|
The response contains the list of selected customer orders, log items, and processing conditions.
For parties like BuyerParty, EmployeeResponsibleParty, ApproverParty etc., the business partner internal ID is returned. Other IDs are currently not supported.
Code
{
<n0:CustomerOrderByElementsQuery_sync_V1 xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<CustomerOrderSelectionByElements>
<SelectionByBusinessPartnerInternalID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryPartyIdentifier>MC9785</LowerBoundaryPartyIdentifier>
</SelectionByBusinessPartnerInternalID>
<SelectionByPartyRoleCode>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryPartyIdentifier>71</LowerBoundaryPartyIdentifier>
</SelectionByPartyRoleCode>
</CustomerOrderSelectionByElements>
<ProcessingConditions>
<QueryHitsMaximumNumberValue>5</QueryHitsMaximumNumberValue>
<QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
</ProcessingConditions>
</n0:CustomerOrderByElementsQuery_sync_V1>
}
Show full documentation