| Description | Query Warranties |
| Name | QueryWarrantyIn |
| 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 |
| Deploymnent Unit Description | Foundation |
| Endpoint Activation | By Scoping of Process Component | Operations |
| Release Status | Deprecated |
An interface to query warranties.
The web service interface Query Warranty In enables you to connect external applications to your solution and to query and read warranties in your system. The web service interface Query Warranty In is relevant if your company wants to access and manage warranty data from external applications.
The web service interface Query Warranty In offers the operation Find By Elements.
Here is an example of a simple web service request, which seeks for all warranties with service process life cycle status Active.
<n0:WarrantyByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <WarrantySelectionByElements> <SelectionByServiceProcessUsabilityLifeCycleStatusCode> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryCode>2</LowerBoundaryCode> </SelectionByServiceProcessUsabilityLifeCycleStatusCode> </WarrantySelectionByElements> </n0:WarrantyByElementsQuery_sync>
Here is an excerpt of the response of the request above including one of warranty records returned by the query:
<nm:WarrantyByElementsResponse_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ALP:/1SAI/TAE6DC9CEA2D17FE74F5AE3:804">
<Warranty>
<ChangeStateID>20101209092935.2945180</ChangeStateID>
<InternalID>WTYID1</InternalID>
<ServiceProcessUsabilityLifeCycleStatusCode>2</ServiceProcessUsabilityLifeCycleStatusCode>
<Duration>P2Y</Duration>
<ServiceIssueCategoryCoverage>
<ServiceIssueCategoryID>C12</ServiceIssueCategoryID>
<CoveredIndicator>false</CoveredIndicator>
</ServiceIssueCategoryCoverage>
<ServiceIssueCategoryCoverage>
<ServiceIssueCategoryID>C1417</ServiceIssueCategoryID>
<CoveredIndicator>false</CoveredIndicator>
</ServiceIssueCategoryCoverage>
<Description>
<Description languageCode="EN">Description English</Description>
</Description>
<Description>
<Description languageCode="DE">Beschreibung Deutsch</Description>
</Description>
<DetailedDescription>
<Text languageCode="DE">Detailed Description Deutsch</Text>
</DetailedDescription>
<DetailedDescription>
<Text languageCode="EN">Detailed Description English</Text>
</DetailedDescription>
...
</Warranty>
<ProcessingConditions>
<ReturnedQueryHitsNumberValue>28</ReturnedQueryHitsNumberValue>
<MoreHitsAvailableIndicator>false</MoreHitsAvailableIndicator>
<LastReturnedObjectID>00300571CC0F02DC83E727EF0253400E</LastReturnedObjectID>
</ProcessingConditions>
</nm:WarrantyByElementsResponse_sync>
All data (complete response):
Expected result:
<Warranty> <full response... /> <Warranty>
Request:
<RequestedElements warrantyTransmissionRequestCode='1'>
or (default is '1')
<RequestedElements />
or just omit it (default is all)
... empty ...
Return everything except attachments:
Expected result:
<Warranty> <all... except attachments /> </Warranty>
Request:
<RequestedElements warrantyTransmissionRequestCode='1'> <Warranty attachmentFolderTransmissionRequestCode='4'/> </RequestedElements>
Return warranty general data and description:
Expected result:
<Warranty> <ChangeStateID>20121211153055.1018410</ChangeStateID> <InternalID>WTYID1</InternalID> <ServiceProcessUsabilityLifeCycleStatusCode>1</ServiceProcessUsabilityLifeCycleStatusCode> <Duration>P2Y</Duration> <Description> <Description languageCode="EN">Description English</Description> </Description> <Description> <Description languageCode="DE">Description Deutsch</Description> </Description> </Warranty>
Request:
<RequestedElements warrantyTransmissionRequestCode="1"> <Warranty serviceIssueCategoryCoverageTransmissionRequestCode="4" descriptionTransmissionRequestCode="1" detailedDescriptionTransmissionRequestCode="4" attachmentFolderTransmissionRequestCode="4"/> </RequestedElements>
You can find general information about Web services, their structure and consumption in the Web Services documentation.
In the following example, the consumer wants to activate all warranties which are in preparation.
First, all warranties that are in preparation need to be queried, using the Query Warranty In service interface. Afterwards, the Manage Warranty In service interface is used to set the status to Active.
Step 1: Query warranties by status
Request:
<n0:WarrantyByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <WarrantySelectionByElements> <SelectionByServiceProcessUsabilityLifeCycleStatusCode> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryCode>1</LowerBoundaryCode> </SelectionByServiceProcessUsabilityLifeCycleStatusCode> </WarrantySelectionByElements> <RequestedElements warrantyTransmissionRequestCode="1"> <Warranty serviceIssueCategoryCoverageTransmissionRequestCode="4" descriptionTransmissionRequestCode="4" detailedDescriptionTransmissionRequestCode="4" attachmentFolderTransmissionRequestCode="4"/> </RequestedElements> </n0:WarrantyByElementsQuery_sync>
Response:
<nm:WarrantyByElementsResponse_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ALP:/1SAI/TAE6DC9CEA2D17FE74F5AE3:804">
<Warranty>
<ChangeStateID>20121217173414.1232150</ChangeStateID>
<InternalID>WTYID1</InternalID>
<ServiceProcessUsabilityLifeCycleStatusCode>1</ServiceProcessUsabilityLifeCycleStatusCode>
<Duration>P2Y</Duration>
</Warranty> <ProcessingConditions>
<Warranty>
<ChangeStateID>20121217173414.1232150</ChangeStateID>
<InternalID>WTYID2</InternalID>
<ServiceProcessUsabilityLifeCycleStatusCode>1</ServiceProcessUsabilityLifeCycleStatusCode>
<Duration>P2Y</Duration>
</Warranty> <ProcessingConditions>
...
<ReturnedQueryHitsNumberValue>74</ReturnedQueryHitsNumberValue>
<MoreHitsAvailableIndicator>false</MoreHitsAvailableIndicator>
<LastReturnedObjectID>00163E028B341EE2908ECC1A8C7E7C5C</LastReturnedObjectID>
</ProcessingConditions>
</nm:WarrantyByElementsResponse_sync>
Step 2: Activate the warranties
<n0:WarrantyBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID>00163E0290581ED28B972C9E3289459O</ID> </BasicMessageHeader> <Warranty actionCode="02"> <ChangeStateID>20121217173414.1232150</ChangeStateID> <InternalID>WTYID1</InternalID> <ServiceProcessUsabilityLifeCycleStatusCode>2</ServiceProcessUsabilityLifeCycleStatusCode> </Warranty> <Warranty actionCode="02"> <ChangeStateID>20121217173414.1232150</ChangeStateID> <InternalID>WTYID2</InternalID> <ServiceProcessUsabilityLifeCycleStatusCode>2</ServiceProcessUsabilityLifeCycleStatusCode> </Warranty> </n0:WarrantyBundleMaintainRequest_sync>
| Description | Find warranties by elements |
| Name | FindByElements |
| Synchronous | yes |
| Release Status | Deprecated |
To find warranties by elements.
The request message of the operation FindByElements contains the WarrantySelectionByElements node that groups all possible selection parameters.
This node groups all selection parameters. The selection parameters are as follows:
| Selection Parameter | Remark |
|---|---|
| SelectionByInternalID | Selection by internal ID (Warranty ID) |
| SelectionByServiceProcessUsabilityLifeCycleStatusCode | Selection by life cycle status |
| SelectionBySearchText | Selection by search text (Basic Search) |
The response contains the list of found warranties, log items, and processing conditions.
In this node, all found warranties are contained, including their warranty data according to the RequestedElements provided in the query request. This includes the ChangeStateID that may be needed for subsequent change requests using web services as well.
The lifecycle status code can occur with the following values:
| Status Code | Description |
|---|---|
| 1 | In Preparation |
| 2 | Active |
| 3 | Blocked |
The Service Issue Category Coverage node element contains the service issue categories and if they are covered.
Example
<ServiceIssueCategoryCoverage>
<ServiceIssueCategoryID>C14175</ServiceIssueCategoryID>
<CoveredIndicator>false</CoveredIndicator>
</ServiceIssueCategoryCoverage>
<ServiceIssueCategoryCoverage>
<ServiceIssueCategoryID>C13</ServiceIssueCategoryID>
<CoveredIndicator>false</CoveredIndicator>
</ServiceIssueCategoryCoverage>
In the Description node element, the description of the warranty is returned in all languages available.
Example
<Description> <Description languageCode="EN">English Description</Description> </Description> <Description> <Description languageCode="DE">Deutsche Beschreibung</Description> </Description>
The Detailed Description node element contains the detailed descriptions in the available languages.
Note: In the UI, the detailed description in the logon language is displayed in the Notes section.
Example
<DetailedDescription> <Text languageCode="DE">deutsche Detailbeschreibung</Text> </DetailedDescription> <DetailedDescription> <Text languageCode="EN">english detailed description</Text> </DetailedDescription>
The Attachment Folder node element returns information on links and documents attached to the warranty.
Note: The binary document content is not returned using this web service. Either the file content URI can be used to access the document, or another web service has to be used.
The CategoryCode element indicates whether a document is a folder, link, or file:
| Category Code | Description |
|---|---|
| 1 | File |
| 2 | Document |
| 3 | Link |
In this context, values 2 (Document) and 3 (Link) are used.
Example
<CategoryCode>3</CategoryCode>
The TypeCode element can contain the following values:
| Type Code | Description |
|---|---|
| 10001 | Standard Attachment |
| 10011 | Product Image |
| 10015 | Technical Drawing |
| 10018 | Product Specification |
Example: Document information of a standard attachment
<AttachmentFolder>
<UUID>00163e02-8b12-1ed2-8bff-9ac970add60b</UUID>
<Document>
<UUID>00163e02-8b12-1ed2-8bff-9ac970aeb60b</UUID>
<VersionID>0</VersionID>
<SystemAdministrativeData>
<CreationDateTime>2012-11-16T14:49:35.232901Z</CreationDateTime>
<CreationIdentityUUID>00163e02-33f4-1ee1-81aa-311337aab123</CreationIdentityUUID>
<LastChangeDateTime>2012-11-16T14:49:35.232901Z</LastChangeDateTime>
<LastChangeIdentityUUID>00163e02-33f4-1ee1-81aa-311337aab123</LastChangeIdentityUUID>
</SystemAdministrativeData>
<VisibleIndicator>true</VisibleIndicator>
<CategoryCode>2</CategoryCode>
<TypeCode>10001</TypeCode>
<MIMECode>text/plain</MIMECode>
<PathName>/BOAttachments/00163E028B121ED28BFF9AC970ADD60B/attachment_test.txt</PathName>
<Name>attachment_test.txt</Name>
<AlternativeName>attachment_test.txt</AlternativeName>
<Description>my attachment</Description>
<FileContentURI>http://servername.domain:12345/sap/ap/ds/wd/doc/00163E028B121ED28BFF9AC970AEB60B/attachment_test.txt?sap-client=004</FileContentURI>
<FilesizeMeasure unitCode="AD">23.0</FilesizeMeasure>
</Document>
</AttachmentFolder>
Example: Link information of a standard attachment
<AttachmentFolder>
<UUID>00163e02-8b32-1ed2-90dd-8662926d6477</UUID>
<Document>
<UUID>00163e02-8b32-1ed2-90dd-8662926e4477</UUID>
<VersionID>0</VersionID>
<SystemAdministrativeData>
<CreationDateTime>2012-12-10T17:08:21.575777Z</CreationDateTime>
<CreationIdentityUUID>00163e02-33f4-1ee1-81aa-311337aac123</CreationIdentityUUID>
<LastChangeDateTime>2012-12-10T17:08:21.575777Z</LastChangeDateTime>
<LastChangeIdentityUUID>00163e02-33f4-1ee1-81aa-311337aac123</LastChangeIdentityUUID>
</SystemAdministrativeData>
<VisibleIndicator>true</VisibleIndicator>
<CategoryCode>3</CategoryCode>
<TypeCode>10001</TypeCode>
<PathName>/BOAttachments/00163E028B321ED290DD8662926D6477/link_test.txt</PathName>
<Name>link_test.txt</Name>
<AlternativeName>link_test.txt</AlternativeName>
<Description>Home page</Description>
<ExternalLinkWebURI>http://sap.com/anyURI</ExternalLinkWebURI>
<FileContentURI>http://sap.com/anyURI</FileContentURI>
</Document>
</AttachmentFolder>
Show full documentation