Description | Query Opportunities |
Name | QueryOpportunityIn |
Namespace | http://sap.com/xi/AP/CRM/Global |
Product | SAP Business ByDesign |
Process component | Opportunity Processing |
Process component namespace | http://sap.com/xi/AP/CRM/Global |
Deployment unit | Customer Relationship Management |
Endpoint Activation | By Scoping of Process Component | Operations |
|
Release Status | Released |
Technical documentation on the SAP API Business Hub | Query Opportunities |
General web service documentation | A2X Web Services (SOAP) |
An interface that queries an Opportunity based on the Opportunity information provided by the consumer.
The web service interface Query Opportunity In offers the operations Find By Elements and Query By Elements.
An example of 'Query By Element' specifying the Party:
<n0:OpportunityOverviewSimpleByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <OpportunityOverviewSimpleSelectionByElements> <SelectionByStatusLifeCycleStatusCode> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryLifeCycleStatusCode>1</LowerBoundaryLifeCycleStatusCode> </SelectionByStatusLifeCycleStatusCode> <SelectionByPartyProspectPartyKeyPartyID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryPartyID>MC9785</LowerBoundaryPartyID> </SelectionByPartyProspectPartyKeyPartyID> </OpportunityOverviewSimpleSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator /> <LastReturnedObjectID /> </ProcessingConditions> </n0:OpportunityOverviewSimpleByElementsQuery_sync>
An example of 'Query By Element' specifying the Party and the Lifecycle Status Code:
<n0:OpportunityOverviewSimpleByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <OpportunityOverviewSimpleSelectionByElements> <SelectionByStatusLifeCycleStatusCode> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryLifeCycleStatusCode>1</LowerBoundaryLifeCycleStatusCode> </SelectionByStatusLifeCycleStatusCode> <SelectionByPartyProspectPartyKeyPartyID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryPartyID>MC9785</LowerBoundaryPartyID> </SelectionByPartyProspectPartyKeyPartyID> </OpportunityOverviewSimpleSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator /> <LastReturnedObjectID /> </ProcessingConditions> </n0:OpportunityOverviewSimpleByElementsQuery_sync>
An example of 'Find By Element' specifying the Lower Boundary Identifier:
<n0:OpportunityByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <OpportunitySelectionByElements> <SelectionByID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>31</LowerBoundaryIdentifier> </SelectionByID> <SelectionByID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>71</LowerBoundaryIdentifier> </SelectionByID> </OpportunitySelectionByElements> </n0:OpportunityByElementsQuery_sync>
Processing conditions should be provided for executing the query.
Processing conditions define the limit for the number of queries to be returned. You can even set the unlimited indicator to true for returning unlimited number of records(or all possible records which match the query parameters.)
This code takes the value 'I' for inclusive and 'E' for exclusive
InclusionExclusionCode | Description |
---|---|
I | includes code which has to be included in the query selection |
E | excludes code which has to be excluded from the query selection |
This code is used to define the boundary details for the query parameter.
List of Interval Boundary TypeCodes
IntervalBoundaryTypeCode | Description |
---|---|
1 | Equal To |
2 | Between (excluding- upper boundary) |
3 | Between |
4 | Between (excluding- both boundaries) |
5 | Between (excluding- lower boundary) |
6 | Less Than |
7 | Less Than or Equal to |
8 | Greater Than |
9 | Greater Than or Equal to |
Lower boundary and upper boundary for the particular parameter with which the query should be executed can be defined here.
Upper boundary is only generally used to find the records between a given interval.
Many external applications using the web services have special requirements and restrictions for the formating WSDLs. Some external applications require service definition WSDLs describing the web service signature. This is normally sufficient for the creation of static client proxies. Other external applications, normally for those that do not create static client-side proxies, require binding WSDLs including the endpoint definition and authentication policy information.
In both cases, it may be the case that the external application imposes special restrictions on the structure or the size of WSDLs.
Microsoft InfoPath requires binding WSDLs and considers elements with the attribute "minOccurs=0" as "mandatory". However "minOccurs=0", that means "optional" in SAP web services. In order to circumvent this problem, the WSDL must be saved locally and an additional attribute "nillable=true" must be added to make a query parameter optional for Microsoft InfoPath.
For very small clients such as mobile devices, the size of the WSDL itself may become a problem. In most cases the client only requires a very small part of the signature Due to the complexity of the WSDL they may end up with long runtimes during serialization of the request or deserialization of the response. In order to circumvent this problem, the WSDL must be saved locally and the optional parts of the signature have to be removed before the WSDL is imported or static client-side proxies are generated.
External applications have to take into account that web service request and response message types can be enhanced with additional elements and attributes. Enhancements can be created by SAP, SAP partners, and key users. Enhancements of request message types are always optional elements or attributes. The SAP system does not require the external application to provide values in the request. Enhancements of response message types can contain mandatory elements or attributes. The external application must be able to process the extended response successfully.
XML element and attribute names are always stable. Technical definitions of data types can be enhanced in a compatible way. This may result in changed data type names. External applications can rely on XML element names and attribute names, but should not rely on data type names.
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.
Description | Query overview by elements opportunities |
Name | FindOverviewSimpleByElements |
Synchronous | yes |
Release Status | Released |
To query one or more Opportunities using imported and structured data.
The Find Overview Simple By Elements inbound operation queries one or more Opportunities based on the Opportunity data.
An example of 'Query By Element' specifying the Party:
<n0:OpportunityOverviewSimpleByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <OpportunityOverviewSimpleSelectionByElements> <SelectionByStatusLifeCycleStatusCode> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryLifeCycleStatusCode>1</LowerBoundaryLifeCycleStatusCode> </SelectionByStatusLifeCycleStatusCode> <SelectionByPartyProspectPartyKeyPartyID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryPartyID>MC9785</LowerBoundaryPartyID> </SelectionByPartyProspectPartyKeyPartyID> </OpportunityOverviewSimpleSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator /> <LastReturnedObjectID /> </ProcessingConditions> </n0:OpportunityOverviewSimpleByElementsQuery_sync>
An example of 'Query By Element' specifying the Party and the Lifecycle Status Code:
<n0:OpportunityOverviewSimpleByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <OpportunityOverviewSimpleSelectionByElements> <SelectionByStatusLifeCycleStatusCode> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryLifeCycleStatusCode>1</LowerBoundaryLifeCycleStatusCode> </SelectionByStatusLifeCycleStatusCode> <SelectionByPartyProspectPartyKeyPartyID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryPartyID>MC9785</LowerBoundaryPartyID> </SelectionByPartyProspectPartyKeyPartyID> </OpportunityOverviewSimpleSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator /> <LastReturnedObjectID /> </ProcessingConditions> </n0:OpportunityOverviewSimpleByElementsQuery_sync>
Description | Query by elements opportunities |
Name | FindByElements |
Synchronous | yes |
Release Status | Released |
To find one or more Opportunities using imported and structured data.
The Find By Elements inbound operation finds one or more Opportunities based on the Opportunity data.
Selection element available and its corresponding business context with the UI is listed below.
SelectionByElements | UI Element |
---|---|
SelectionByID | Opportunity ID |
"IntervalBoundaryTypeCode" field is a mandatory field in each of the Selection tags. This field takes values as given in the generic document.
In the ProcessingConditions tag, "QueryHitsUnlimitedIndicator" field is mandatory which takes value 'True' or 'False'.
An example of 'Find By Element' specifying the Lower Boundary Identifier to query a specific opportunity:
<n0:OpportunityByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <OpportunitySelectionByElements> <SelectionByID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>31</LowerBoundaryIdentifier> </SelectionByID> <SelectionByID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>71</LowerBoundaryIdentifier> </SelectionByID> </OpportunitySelectionByElements> </n0:OpportunityByElementsQuery_sync>
This Operation of the interface supports extensibility.