Description | Query Customer Contracts |
Name | QueryCustomerContractIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Customer Contract Processing |
Process Component Name | CustomerContractProcessing |
Process Component Namespace | http://sap.com/xi/AP/CRM/Global |
Deployment Unit Description | Customer Relationship Management |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to query customer contract data.
This web-service is used to query for customer contracts. It has one operation called FindByElements.
Example
<n0:CustomerContractByElementsQuery_sync> <CustomerContractSelectionByElements> <SelectionByID> <InclusionExclusionCode></InclusionExclusionCode> <IntervalBoundaryTypeCode></IntervalBoundaryTypeCode> <LowerBoundaryID></LowerBoundaryID> <UpperBoundaryID></UpperBoundaryID> </SelectionByID> <SelectionByItemListCustomerContractLifeCycleStatusCode> <InclusionExclusionCode>T</InclusionExclusionCode> <IntervalBoundaryTypeCode>T</IntervalBoundaryTypeCode> <LowerBoundaryItemListCustomerContractLifeCycleStatusCode></LowerBoundaryItemListCustomerContractLifeCycleStatusCode> <UpperBoundaryItemListCustomerContractLifeCycleStatusCode></UpperBoundaryItemListCustomerContractLifeCycleStatusCode> </SelectionByItemListCustomerContractLifeCycleStatusCode> <SelectionByBuyerPartyID> <InclusionExclusionCode></InclusionExclusionCode> <IntervalBoundaryTypeCode></IntervalBoundaryTypeCode> <LowerBoundaryID></LowerBoundaryID> <UpperBoundaryBuyerPartyID></UpperBoundaryID> </SelectionByBuyerPartyID> <SelectionByLastChangedDateTime> <InclusionExclusionCode></InclusionExclusionCode> <IntervalBoundaryTypeCode></IntervalBoundaryTypeCode> <LowerBoundaryDateTime></LowerBoundaryDateTime> <UpperBoundaryDateTime></UpperBoundaryDateTime> </SelectionByLastChangedDateTime> </CustomerContractSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue></QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator></QueryHitsUnlimitedIndicator> <LastReturnedObjectID></LastReturnedObjectID> </ProcessingConditions> <RequestedElements> <CustomerContract></CustomerContract> </RequestedElements> </n0:CustomerContractByElementsQuery_sync>
The response structure is as follows:
<nm:CustomerContractByElementsResponse_sync> <CustomerContract> <ID></ID> <UUID></UUID> <Name></Name> <ServiceConfirmationCreationCode></ServiceConfirmationCreationCode> <BuyerParty> <PartyID></PartyID> <ContactParty> <PartyID></PartyID> </ContactParty> </BuyerParty> <ValidityPeriod> <StartDateTime></StartDateTime> <EndDateTime></EndDateTime> </ValidityPeriod> <Status> <ItemListCustomerContractLifeCycleStatusCode></ItemListCustomerContractLifeCycleStatusCode> <ItemListValidityStatusCode></ItemListValidityStatusCode> <FulfilmentBlockingStatusCode></FulfilmentBlockingBlockingStatusCode> </Status> <Item> <ID></ID> <UUID></UUID> <Description></Description> <Status> <CustomerContractLifeCycleStatusCode></CustomerContractLifeCycleStatusCode> <ValidityStatusCode></ValidityStatusCode> <FulfilmentBlockingStatusCode></FulfilmentBlockingStatusCode> </Status> <ValidityPeriod> <StartDateTime></StartDateTime> <EndDateTime></EndDateTime> </ValidityPeriod> <Product> <ProductID></ProductID> <UnitOfMeasure></UnitOfMeasure> <TypeCode></TypeCode> </Product> <ScheduleLine> <Quantity></Quantity> <QuantityTypeCode></QuantityTypeCode> </ScheduleLine> <EntitledProduct> <ProductID></ProductID> <Description></Description> <TypeCode></TypeCode> </EntitledProduct> </Item> <SystemAdministrativeData> <CreationDateTime></CreationDateTime> <CreationIdentityUUID></CreationIdentityUUID> <LastChangeDateTime></LastChangeDateTime> <LastChangeIdentityUUID></LastChangeIdentityUUID> </SystemAdministrativeData> </CustomerContract> <ProcessingConditions> <ReturnedQueryHitsNumberValue></ReturnedQueryHitsNumberValue> <MoreHitsAvailableIndicator></MoreHitsAvailableIndicator> <LastReturnedObjectID></LastReturnedObjectID> </ProcessingConditions> </nm:CustomerContractByElementsResponse_sync>
In order to query customer contracts, you need to specify at least one valid parameter structure underneath the structure CustomerContractSelectionByElements, for example SelectionByID. In general, the structure SelectionByFIELD always has the following common fields:
InclusionExclusionCode
Code Value | Description |
---|---|
E | Excluding |
I | Including |
IntervalBoundaryTypeCode
Type Code | Description |
---|---|
1 | Equal To |
2 | Between (excl. upper boundary) |
3 | Between |
4 | Between (excl. both boundaries) |
5 | Between (excl. lower boundary) |
6 | Less Than |
7 | Less Than or Equal to |
8 | Greater Than |
9 | Greater Than or Equal to |
LowerBoundaryFIELD
The lower boundary for the query field
UpperBoundaryFIELD
The upper boundary for the query field
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.
Query the first 30 customer contracts in the system
<CustomerContractSelectionByElements> <SelectionByID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryID>*</LowerBoundaryID> </SelectionByID> </CustomerContractSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>30</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> </ProcessingConditions>
Query the first 30 customer contracts for buyer ID MC6123
<CustomerContractSelectionByElements> <SelectionByBuyerPartyID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryID>MC6123</LowerBoundaryID> </SelectionByBuyerPartyID> </CustomerContractSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>30</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> </ProcessingConditions>
Query the first 30 customer contracts that are released
<CustomerContractSelectionByElements> <SelectionByItemListCustomerContractLifeCycleStatusCode> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryItemListCustomerContractLifeCycleStatusCode>5</LowerBoundaryItemListCustomerContractLifeCycleStatusCode> </SelectionByItemListCustomerContractLifeCycleStatusCode> </CustomerContractSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>30</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> </ProcessingConditions>
Query the customer contracts that were changed between 2011-08-19T12:09:00Z and 2011-08-19T12:10:00Z
In most cases, you may want to look for an interval. It is also very useful to set the unlimited indicator to true to get all contracts matching the criteria. In this way, you can implement a paging strategy by initially downloading all contracts, then afterwards scheduling a job to get all contracts that have been changed since.
<CustomerContractSelectionByElements> <SelectionByLastChangedDateTime> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode> <LowerBoundaryDateTime>2011-08-19T12:09:00Z</LowerBoundaryDateTime> <UpperBoundaryDateTime>2011-08-19T12:10:00Z</UpperBoundaryDateTime> </SelectionByLastChangedDateTime> </CustomerContractSelectionByElements> <ProcessingConditions> <QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator> </ProcessingConditions>
Description | Find customer contracts |
Name | FindByElements |
Synchronous | yes |
Release Status | Released |
To query customer contract by elements.
FindByElements is an operation to query customer contract data by the selections elements passed in the request.
Below are the list of selection elements available and their corresponding business context with the user interface.
Parameters | User Interface Element | Data Type |
---|---|---|
SelectionByID | Contract ID | Identifier |
SelectionByItemListCustomerContractLifeCycleStatusCode | Status | Code |
SelectionByBuyerPartyID | Account ID | Identifier |
SelectionByLastChangedDateTime | Changed On | DateTime |
With this query parameter you can query contracts with a specific customer contract ID. The value depends on the number range that you have defined for the customer contract business object in your system.
ItemListCustomerContractLifeCycleStatusCode | Description |
---|---|
1 | In Preparation |
2 | In Process |
3 | Completed |
4 | Partially Released |
5 | Released |
With this parameter you can search customer contracts for a specific customer by ID.
With this parameter you can search for customer contracts that were modified in a time interval defined by lower boundary and upper boundary.
The format of the field is YYYY-MM-DDTHH:MM:SSZ, where
YYYY is the year (for example 2011)
MM is the month (for example 12)
DD is the day(for example 31)
HH is hours
MM is minutes
SS is seconds
"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'.
This Operation of the interface supports extensibility.
Name | Type | Description |
---|---|---|
ID | Element | Customer Contract ID |
UUID | Element | Unique identifier of the customer contract |
Name | Element | Description of Contract |
ServiceConfirmationCreationCode | Element | Specifies whether a service confirmation can be created for this customer contract or not |
Code Value - Description | ||
1 - Service Confirmation Required | ||
3 - Service Confirmation not Possible | ||
InvoicingBlockReasonCode | Element | Reason for blocking invoicing process |
DeliveryBlockReasonCode | Element | Reason for blocking fulfillment process |
ValidityPeriod | Node | |
StartDateTime | Element | Start date time from which the contract is valid |
EndDateTime | Element | End date time until which the contract is valid |
Status | Node | |
ItemListCustomerContractLifeCycleStatusCode | Element | Customer contract life cycle status code |
Code Value - Description | ||
1 - In Preparation | ||
2 - In Process | ||
3 - Completed | ||
4 - Partially Released | ||
5 - Released | ||
ItemListValidityStatusCode | Element | Customer contract validity status code |
Code Value - Description | ||
1 - Not Started | ||
2 - Active | ||
3 - Expired | ||
FulfilmentBlockingStatusCode | Element | Customer contract fulfillment status code |
Code Value - Description | ||
1 - Not Blocked | ||
2 - Partially Blocked | ||
3 - Blocked | ||
SystemAdministrativeData | Node | |
CreationDateTime | Element | Creation time of the customer contract |
CreationIdentityUUID | Element | Unique ID of the person who created the contract |
LastChangeDateTime | Element | Last change date time of the customer contract |
LastChangeIdentityUUID | Element | Unique ID of the last person who changed the contract |
CoveredObject | Node | |
IndividualProductID | Element | An identifier for an individual product |
ProductID | Element | An identifier for a product |
ProductCategoryHierarchyID | Element | An identifier for a product category hierarchy |
ProductCategoryInternalID | Element | A proprietary identifier for a product category |
Description | Element | Description of the covered product |
BusinessTransactionDocumentReference | Node | |
BusinessTransactionDocumentReference | Element | A unique reference to other business documents that are of significance for a contract |
BusinessTransactionDocumentRelationshipRoleCode | Element | A role that a business transaction document has when set against the contract within a relationship |
DataProviderIndicator | Element | Indicates whether or not the given reference provides data |
BuyerParty_V1 | Node | |
PartyID | Element | A party that buys goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of buyer party in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
EmployeeResponsibleParty | Node | |
PartyID | Element | A party that is responsible for contract. The party can be an internal or external employee |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of employee responsible in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
SalesUnitParty | Node | |
PartyID | Element | An organizational unit that is responsible for the sales and distribution of products in business processes |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of sales unit in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
ContractAdministratorParty | Node | |
PartyID | Element | An employee who is responsible for administering the contract |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of contract administrator in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
ContractingUnitParty | Node | |
PartyID | Element | An organizational unit responsible for administering contracts |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of contracting unit in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
SellerParty | Node | |
PartyID | Element | A party that sells goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of seller in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
ShipToParty | Node | |
PartyID | Element | A party where goods or services are supplied to |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of ship-to party in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
BillToParty | Node | |
PartyID | Element | A party that receives the bill for the supplied goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of bill-to party in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
PayerParty | Node | |
PartyID | Element | A party that pays for goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of payer party in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
ContractReleaseAuthorisedParty | Node | |
PartyID | Element | A party that has the authorisation to release a contract |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of party authorised to release a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
ServiceExecutionTeamParty | Node | |
PartyID | Element | A party that is responsible for executing service orders |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of service execution team in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
ServicePerformerParty | Node | |
PartyID | Element | A party that performs services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of service performer in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
VendorParty | Node | |
PartyID | Element | A party that supplies goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of vendor in a contract |
MainIndicator | Element | Indicates if the party is the main contact or not |
RenewalAndCancellation | Node | |
CancellationReasonCode | Element | Specifies the reason for cancellation of a contract |
CancellationAgreementCode | Element | Specifies the terms and conditions for cancellation of a contract as agreed upon by the company and the customer |
CancellationReceivedOnDateTime | Element | Date and Time on which the cancellation request for the contract was recieved |
CancellationRequestedForDateTime | Element | Date and Time for which the cancellation for the contract is requested to be valid |
CancellationEffectiveOnDateTime | Element | Date and Time from which the cancellation for the contract is effective |
RenewalAgreementCode | Element | Specifies the terms and conditions for renewal of a customer contract as agreed upon by the company and the customer |
InvoiceCancellationCode | Element | Specifies the cancellation scope of customer invoice requests for a contract |
PricingIn | Node | |
GrossAmountIndicator | Element | |
SalesAndServiceBusinessArea | Node | |
SalesOrganisationID | Element | An identifier for a sales organizational center |
SalesGroupID | Element | An identifier for a sales group |
SalesOfficeID | Element | An identifier for a sales office |
DistributionChannelCode | Element | A channel via which goods or services reach the customer |
Code Value - Description | ||
01 - Direct Sales | ||
02 - Indirect Sales | ||
ServiceOrganisationID | Element | An identifier for a service organizational center |
PriceAndTaxCalculation | Node | Specification for price and tax determination and valuation using attributes that are characteristic or relevant for a contract |
AttachmentFolder | Node | Collection of all documents attached to a contract item |
PaymentControl | Node | Specifies an agreement between the company and the customer on processing payments for a contract |
TextCollection | Node | Collection of all textual descriptions which are related to a contract |
CashDiscountTerms | Node | Specifies the payment terms as agreed between the company and the customer |
BuyerParty | Node | Obsolete |
Item | Node | |
ID | Element | Customer Contract Item ID |
UUID | Element | Customer Contract Item UUID |
Description | Element | Description of the customer contract item |
Status | Item Sub-Node | |
CustomerContractLifeCycleStatusCode | Element | |
Code Value - Description | ||
1 - In Preparation | ||
2 - In Process | ||
3 - Completed | ||
5 - Released | ||
ValidityStatusCode | Element | |
Code Value - Description | ||
1 - Not Started | ||
2 - Active | ||
3 - Expired | ||
FulfilmentBlockingStatusCode | Element | |
Code Value - Description | ||
1 - Not Blocked | ||
3 - Blocked | ||
ValidityPeriod | Item Sub-Node | |
StartDateTime | Element | Start date time from which the item is valid |
EndDateTime | Element | End date time until which the item is valid |
Product | Item Sub-Node | |
ProductID | Element | Item product identifier |
UnitOfMeasure | Element | Unit of measure of the item product |
TypeCode | Element | Type code of the item product |
Code Value - Description | ||
2 - Service | ||
6 - Entitlement Product | ||
ScheduleLine | Item Sub-Node | |
Quantity | Element | Quantity of the item |
EntitledProduct | Item Sub-Node | |
ProductID | Element | Product ID on item entitled product level |
Description | Element | Description of the item entitled product |
TypeCode | Element | Type code of the item entitled product. This field is empty for categories. |
Code Value - Description | ||
1 - Material | ||
2 - Service | ||
ItemSalesTerms | Item Sub-Node | |
CancellationReasonCode | Element | Specifies the reason for cancellation of a contract item |
CustomerContractCancellationAgreementCode | Element | Specifies the terms and conditions for cancellation of a contract as agreed upon by the company and the customer item |
CancellationRequestDateTime | Element | Date and Time for which the cancellation for the contract item is requested to be valid |
CancellationEffectiveDateTime | Element | Date and Time from which the cancellation for the contract item is effective |
CancellationDateTime | Element | |
CustomerInvoiceRequestCancellationScopeCode | Element | Specifies the cancellation scope of customer invoice requests for a contract item |
CustomerContractRenewalAgreementCode | Element | Specifies the terms and conditions for renewal of a customer contract as agreed upon by the company and the customer item |
ItemBusinessTransactionDocumentReference | Item Sub-Node | |
BusinessTransactionDocumentReference | Element | A unique reference to other business documents that are of significance for a contract item |
BusinessTransactionDocumentRelationshipRoleCode | Element | A role that a business transaction document has when set against the contract item within a relationship |
DataProviderIndicator | Element | Indicates whether or not the given reference provides data |
ProductRecipientItemParty | Item Sub-Node | |
PartyID | Element | A party that buys goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of product recipient party in a contract item |
MainIndicator | Element | Indicates if the party is the main contact or not |
SellerItemParty | Item Sub-Node | |
PartyID | Element | A party that sells goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of seller in a contract item |
MainIndicator | Element | Indicates if the party is the main contact or not |
ServiceExecutionTeamItemParty | Item Sub-Node | |
PartyID | Element | A party that is responsible for executing service orders |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of service execution team in a contract item |
MainIndicator | Element | Indicates if the party is the main contact or not |
ServicePerformerItemParty | Item Sub-Node | |
PartyID | Element | A party that performs services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of service performer in a contract item |
MainIndicator | Element | Indicates if the party is the main contact or not |
TaxReportingUnitItemParty | Item Sub-Node | |
PartyID | Element | A party that specifies the reporting tax unit |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of tax reporting unit in a contract item |
MainIndicator | Element | Indicates if the party is the main contact or not |
VendorItemParty | Item Sub-Node | |
PartyID | Element | A party that supplies goods or services |
ContactParty | Party Sub-Node | |
PartyID | Element | Contact details of supplier in a contract item |
MainIndicator | Element | Indicates if the party is the main contact or not |
PriceAndTaxCalculationItem | Item Sub-Node | Specification for price and tax determination and valuation using attributes that are characteristic or relevant for the contract item |
ItemAttachmentFolder | Item Sub-Node | Collection of all documents attached to a contract item |
ItemTextCollection | Item Sub-Node | Collection of all textual descriptions which are related to a contract item |
Release | Change Description | Details |
2008 | Response payload updated | Under item,element UUID can also be obtained now |