Description | Query Individual Products |
Name | QueryRegisteredProductIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Product Data Maintenance |
Process Component Name | ProductDataMaintenance |
Process Component Namespace | http://sap.com/xi/AP/FO/Product/Global |
Deployment Unit Description | Foundation |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to query registered product data.
The web service Interface ‘QueryRegisteredProductIn’ enables you to connect external applications to your SAP Business By Design system and to query Registered Product in your system. The web service interface ‘QueryRegisteredProductIn’ is relevant if your company wants to access registered product data from external applications.
The web service ‘QueryRegisteredProductIn’ offers the operation QUERY_BY_ELEMENTS. Here is an example of a simple web service request:
<n0:RegisteredProductQuery xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <ProcessingConditions> <QueryHitsMaximumNumberValue>4</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> <LastReturnedObjectID></LastReturnedObjectID> </ProcessingConditions> <RegisteredProductSelectByElements> <SelectionByRegisteredProductID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>YJ141</LowerBoundaryIdentifier> </SelectionByRegisteredProductID> <SelectionByRefProductID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>SP_UDAY1</LowerBoundaryIdentifier> </SelectionByRefProductID> </RegisteredProductSelectByElements> </n0:RegisteredProductQuery>
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 in 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 | Logical Operator |
---|---|---|---|
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 |
Action codes represent an instruction to the recipient of the web service request to process transmitted message node elements.
The action code to be used is ‘QUERY_BY_ELEMENTS’.
Both Registered Product ID and Referenece Product ID are necessary to find uniquely of any registered product.
Optional leaf elements in request messages that are not transmitted within a web service request are not considered while querying. So any value of missing parameters would meet the comparison.
Query operation is stateless synchronous web service operation. Transferring or requesting amounts of data that are too large causes communication timeouts. The web service consumer is responsible for ensuring reasonable sizes of data for mass operations.
The structure of the request message type consists of two parts:
• Selection parameters for the query
• Processing conditions. This specifies the limit on the output i.e number of records returned. You can also specify if you want unlimited number of records.
Many external applications consuming web services have special requirements and restrictions regarding the format of WSDLs. Some external applications require service definition WSDLs describing the web service signature. This is normally sufficient for the creation of static client-side proxies. Other external applications, normally 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" 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, but 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.
Note: You can download the WSDL file for any web service here:
• Application and User Management work center -> Input Output Management -> Communication Arrangement.
• User Management work center à Service Explorer view.
You can find the documentation of the global data types in the SAP Community Network: Go to http://scn.sap.com/docs/DOC-17516 and click View Document.
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Possible scenarios include the following:
• Find Registered Product based on certain set of information like Serial ID, Reference Product ID etc.
This finds Serial ID is YJ141
<n0:RegisteredProductQuery xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <ProcessingConditions> <QueryHitsMaximumNumberValue>4</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> <LastReturnedObjectID></LastReturnedObjectID> </ProcessingConditions> <RegisteredProductSelectByElements> <SelectionByRegisteredProductID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>YJ141</LowerBoundaryIdentifier> </SelectionByRegisteredProductID> <SelectionByRefProductID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>SP_UDAY1</LowerBoundaryIdentifier> </SelectionByRefProductID> </RegisteredProductSelectByElements> </n0:RegisteredProductQuery>
Description | Find registered products |
Name | FindByElements |
Synchronous | yes |
Release Status | Released |
To find registered product data by elements.
The request message of the operation FindByElements contains the RegisteredProductSelectionByElements node that groups all possible selection parameters.
Structure of the request message has the following parameters based on which registered product can be searched:
Element | Remark |
---|---|
SEL_BY_SERIAL_ID | Selection by registered product ID |
SEL_BY_REF_PROD_ID | Selection by reference product ID |
SEL_BY_STATUS | Selection by status |
SEL_BY_DESCRIPTION | Selection by registered product description |
SEL_BY_PARENT_SERIAL_ID | Selection by parent registered product ID |
SEL_BY_PARENT_REF_PROD_ID | Selection by parent reference product ID |
SEL_BY_PROD_CATEGORY_ID | Selection by product category ID |
SEL_BY_REFERENCE_DATE | Selection by warranty reference date |
SEL_BY_WARRANTY_ID | Selection by warranty ID |
SEL_BY_WARRANTY_START_DATE | Selection by warranty start date |
SEL_BY_WARRANTY_END_DATE | Selection by warranty end date |
SEL_BY_ACCOUNT_ID | Selection by account ID |
SEL_BY_CONTACT_ID | Selection by contact ID |
SEL_BY_OWNER_ID | Selection by owner ID |
SEL_BY_COUNTRY | Selection by country code |
SEL_BY_ROOM | Selection by room ID |
SEL_BY_FLOOR | Selection by floor ID |
SEL_BY_BUILDING | Selection by building ID |
SEL_BY_POSTAL_CODE | Selection by postal code |
SEL_BY_STATE | Selection by state |
SEL_BY_CITY | Selection by city |
SEL_BY_STREET | Selection by street |
SEL_BY_INVENTORY_STATUS_CODE | Selection by inventory status code |
The response consists of root level element of Registered Product. Following are the major attributes in result
RegisteredProductID
RegisteredProductDescription
Status
InventoryStatusCode
WarrantyReferenceDate
ReferenceProduct
Account
Contact
Owner
Warranty
Country
CareOf
Building
Floor
Room
AddressLine1
AddressLine2
HouseNumber
Street
AddressLine4
AddressLine5
City
DifferentCity
State
PostalCode
District
County
TimeZone
CompanyPostalCode
POBox
POBoxPostalCode
POBoxCity
POBoxState
POBoxCountry
This finds Serial ID is YJ141
<n0:RegisteredProductQuery xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <ProcessingConditions> <QueryHitsMaximumNumberValue>4</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> <LastReturnedObjectID></LastReturnedObjectID> </ProcessingConditions> <RegisteredProductSelectByElements> <SelectionByRegisteredProductID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>YJ141</LowerBoundaryIdentifier> </SelectionByRegisteredProductID> <SelectionByRefProductID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>SP_UDAY1</LowerBoundaryIdentifier> </SelectionByRefProductID> </RegisteredProductSelectByElements> </n0:RegisteredProductQuery>