Description | Query Lease Contracts |
Name | QueryLeaseContractQueryIn |
Namespace | http://sap.com/xi/A1S/Global |
Process Component Description | Lease Contract Management |
Process Component Name | LeaseContractManagement |
Process Component Namespace | http://sap.com/xi/AP/LeaseContractManagement/Global |
Deployment Unit Description | Financials |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to query the existing lease contracts in the system.
The web service Interface ’Query Lease Contract Query In' enables you to connect external applications to your SAP Business ByDesign system and to find Lease Contracts in your system. The web service interface ‘Query Lease Contract Query In’ is relevant if your company wants to query Lease Contracts data from external applications.
The web service interface Query Lease Contract Query In offers the FIND_BY_ELEMENTS operation.
Here is an example of a simple web service request:
<n0:LeaseContractByElementsQuery_Syncxmlns:n="http://sap.com/xi/SAPGlobal20/Global"> <LeaseContractSelectionByElements> <SelectionByID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>633</LowerBoundaryIdentifier> </SelectionByID> </LeaseContractSelectionByElements> <ProcessingConditions> <QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator> </ProcessingConditions> </n0:LeaseContractByElementsQuery_Sync>
Here is an example of a simple web service response:
<n0:LeaseContractByElementsResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAS82C82181F9C787EB3A1D:804"> <LeaseContract> <ID>633</ID> <UUID>00163e5f-4da7-1ee9-9f8a-cbd5763d6a7d</UUID> <LessorID>MC2000</LessorID> <LesseeCompanyID>MC10000</LesseeCompanyID> <EmployeeResposibleID>4137</EmployeeResposibleID> <Description>NV_QBO_Test02</Description> <ExternalReferenceID>NV_QBO_ExtRef02</ExternalReferenceID> <FrameAgreementID>1561811</FrameAgreementID> <CurrencyCode>USD</CurrencyCode> <UnlimitedLeaseContractIndicator>true</UnlimitedLeaseContractIndicator> <InceptionDate>2017-01-01</InceptionDate> <LeaseStartDate>2017-01-01</LeaseStartDate> <LeaseFirstEndDate>2019-12-31</LeaseFirstEndDate> <LeaseTermInMonths>0036</LeaseTermInMonths> <LeaseTermEndDate>2019-12-31</LeaseTermEndDate> <InterestRate>1.0</InterestRate> <SystemAdministrativeData> <CreationDateTime>2019-05-22T05:57:29.705107Z</CreationDateTime> <LastChangeDateTime>2019-05-22T06:02:11.748473Z</LastChangeDateTime> </SystemAdministrativeData> <CreatedBy>Venkatesan Nirosha</CreatedBy> <ChangedBy>Venkatesan Nirosha</ChangedBy> <LifecycleStatusCode>1</LifecycleStatusCode> <VersionID>0</VersionID> <VersionStartDate>2017-01-01</VersionStartDate> <VersionEndDate>2019-12-31</VersionEndDate> <TransitionIndicator>true</TransitionIndicator> <TransitionType>1</TransitionType> <ObjectItem> <ID>1</ID> <UUID>00163e5f-4da7-1ee9-9f8a-db5539d48a9f</UUID> <Description>ObjItem1</Description> <ExternalReferenceID>ObjItem_ExtRef01</ExternalReferenceID> <ObjectType>0002</ObjectType> <PaymentScheduleCreationStatus>1</PaymentScheduleCreationStatus> <CashflowCreationStatus>1</CashflowCreationStatus> <SetOfBooksRelevance> <SetOfBooksID>0001</SetOfBooksID> <LeaseValuationType>2</LeaseValuationType> <TransitionDate>2019-01-01</TransitionDate> <Relevance>2</Relevance> </SetOfBooksRelevance> <OrganisationalAssignment> <ValidityPeriod> <StartDate>2019-01-01</StartDate> <EndDate>2019-12-31</EndDate> </ValidityPeriod> <AccountAssignmentTypeCode>22</AccountAssignmentTypeCode> <ProjectTaskID>DCP447</ProjectTaskID> </OrganisationalAssignment> </ObjectItem> </LeaseContract> <ResponseProcessingConditions> <ReturnedQueryHitsNumberValue>1</ReturnedQueryHitsNumberValue> <MoreHitsAvailableIndicator>false</MoreHitsAvailableIndicator> <LastReturnedObjectID>00163E5F4DA71EE99F8ACBD5763D6A7D</LastReturnedObjectID> </ResponseProcessingConditions> <Log/> </n0:LeaseContractByElementsResponse_sync>
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 runtime 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.
Description | Find lease contracts |
Name | FindByElements |
Synchronous | yes |
Release Status | Released |
QueryLeaseContractQueryIn interface allows to query on existing lease contracts in the system.
The request message of the FindByElements contain two parts: Body and Processing Conditions. Body comprises of the various parameters on which Lease Contracts can be queried. Details on these parameters is discussed in the following sub-sections. Processing conditions controls the execution of query. For example you can specify if you want a certain number of records as output or unlimited records should be shown.
The response message contain the header level relevant attributes of Lease Contract along with the Processing conditions. The processing condition here indicates that how many records are returned and are there any more records existing which meet the criteria but not fetched.
The search can contain complex criteria instead of having simple equation. You can get results based on ‘equal to’ or a Range or Less than or greater than logical operations. These type codes should be specified in the request message.
The web service ‘Query Lease Contract Query In’ offers the operation FIND_BY_ELEMENTS.
Structure of the request message has the following parameters based on which lease contracts can be searched:
Element | Remark |
---|---|
SelectionByID | Id of the Lease Contract |
SelectionByVersionID | Id of the Version |
SelectionByDescription | Description of Lease Contract |
SelectionByExternalReferenceID | External Reference ID of Lease Contract |
SelectionByFrameAgreementID | Frame Agreement ID of Lease Contract |
SelectionByLifecycleStatusCode | The life cycle status of Lease Contract, it could be 1 In Preparation 2 Ready For Release 3 Released 4 In Revision 5 Cancelled 6 Terminated 7 Closed. |
SelectionByLesseeCompanyID | Lessee Company ID in Lease Contract |
SelectionByLessorID | Lessor ID in Lease Contract |
SelectionByEmployeeResponsibleID | Employee Responsible ID in Lease Contract |
SelectionByInceptionDate | Inception Date of Lease Contract |
SelectionByLeaseStartDate | Lease Start Date of Lease Contract |
SelectionByLeaseFirstEndDate | Lease First End Date of Lease Contract |
SelectionByTermEndDate | Term End Date of Lease Contract |
SelectionByLeaseObjectExternalReferenceID | External Reference ID of Lease Contract Object Item |
SelectionByLeaseObjectDescription | Description of Lease Contract Object Item |
The life cycle status of Lease Contract
Code | Remark |
---|---|
1 | In-Preparation |
2 | Ready For Release |
3 | Released |
4 | In-Revision |
5 | Cancelled |
6 | Terminated |
7 | Closed |
Transistion type of Lease Contract
Code | Remark |
---|---|
2 | Cumulative A |
3 | Cumulative B |
Renewals mode of Lease Contract
Code | Remark |
---|---|
1 | Automatic |
2 | Option |
Notice giving party code of Lease Contract
Code | Remark |
---|---|
1 | Lessee |
2 | Lessor |
3 | Both |
Type code of Lease Object Item
Code | Remark |
---|---|
0001 | Land/Property |
0002 | Building |
0003 | Hardware |
0004 | Fixtures/Fittings |
0005 | Machinery |
0006 | Vehicles |
0007 | Location/Site |
0008 | Floor |
0009 | Room |
0010 | Equipment |
0011 | Office Equipment |
Payment schedule creation status of Lease Object Item
Code | Remark |
---|---|
1 | Not Started |
2 | Creation Successful |
Cashflow creation status of Lease Object Item
Code | Remark |
---|---|
1 | Not Started |
2 | Creation Successful |
Account assignment type code of Lease Object Item
Code | Remark |
---|---|
1 | Cost Center |
21 | Overhead Cost Project Task |
22 | Other Direct Cost Project Task |
Conditions type code of Lease Object Item
Code | Remark |
---|---|
01 | Lease Installment |
02 | Service Charge |
03 | Initial Cost |
04 | Residual Value |
05 | Penalty Payment |
06 | IFRS Incentive |
07 | Exercise Price |
08 | Estimated Cost |
Recurrence frequency code of Lease Object Item
Code | Remark |
---|---|
1 | One-time Payment |
2 | Daily |
3 | Monthly |
4 | Yearly |
Lease Valuation Type Code of Lease Object Item Set of Books Relevance
Code | Remark |
---|---|
1 | IFRS16 |
2 | ASC842 |
Relevance Code of Lease Contract Item Set of Books
Code | Remark |
---|---|
1 | Finance Lease |
2 | Operating Lease |
3 | Expense |
Payment Form Type Code of Lease Contract Conditions
Code | Remark |
---|---|
1 | In Advance |
2 | In Arrears |
Category Code of Attachment
Category Code | Description |
---|---|
2 | Document |
3 | Link |
Type Code of Text Collection
TypeCode | Description |
---|---|
10011 | Internal comment |
The response message will contain root level data, such as Lease Contract ID, Start and End date, set of books and company, as well as item nodes.
Element | Remark |
---|---|
ID | Lease Contract ID |
UUID | Lease Contract UUID |
LessorID | Lessor ID of Lease Contract |
LessorContactPersonID | Lessor Contact Person ID of the Lease Conract |
LesseeCompanyID | Lessee Company ID |
EmployeeResposibleID | Employee Responsible |
Description | Description of the Lease Contract |
ExternalReferenceID | External Reference ID |
FrameAgreementID | Frame Agreement ID of Lease Contract |
CurrencyCode | Currency Code |
UnlimitedLeaseContractIndicator | Unlimited Lease Contract Indicator |
InceptionDate | Inception date of Lease contract |
LeaseStartDate | Lease Start Date |
LeaseFirstEndDate | Lease First End Date |
LeaseTermInMonths | Lease Term In Months |
LeaseTermEndDate | Lease Term End Date |
AdvanceInvoiceDuration | Invoice Offset days |
InterestRate | Valuation Interest Rate |
SystemAdministrativeData | System Administrative Data which include the creation and last changed date time |
CreatedBy | Lease Contract Created By user |
ChangedBy | Lease Contract Changed By user |
LifecycleStatusCode | The life cycle status of Lease Contract |
VersionID | Lease Contract Version ID |
VersionStartDate | Lease Contract version start date |
VersionEndDate | Lease Contract version end date |
TransitionIndicator | Transition Indicator |
TransitionType | Transition Type |
RenewalTerm | Terms which determine the renewal of Lease Contract |
Rule | Renewal rule |
Mode | Renewal mode |
DueDate | Due date |
RenewalPeriod | Renewal Period |
RenewalStartDate | Renewal Start Date |
RenewalEndDate | Renewal End Date |
NoticeAgreementTerm | Notice Agreement Term |
Name | Notice Agreement name |
NoticeGivingPartyTypeCode | Notice Giving Party Type Code |
NoticeDate | Notice Date |
NoticePeriod | Notice Period |
ObjectItem | Item |
ID | Item ID |
Description | Item description |
ExternalReferenceID | External reference ID |
ObjectType | Item object type |
AutomaticInvoiceIndicator | Automatic Invoice Indicator |
MasterFixedAssetID | Master Fixed Asset ID |
SubAssetID | Sub Asset ID |
PaymentScheduleCreationStatus | Item Payment Schedule Creation Status |
CashflowCreationStatus | Item Cash flow Creation Status |
RightOfUseAssetUsageEndDate | Item Asset Usage End Date |
TextCollection | Notes on Lease Contract at Header or Item Level |
AttachmentFolder | Attachements on Lease Contract |
SetOfBooksRelevance | |
SetOfBooksID | Set Of Books ID |
LeaseValuationType | Item Lease Valuation Type |
CumulativeATransitionAmt | Cumulative ATransition Amount |
TransitionDate | Transition Date |
Relevance | Relevance |
Conditions | |
TypeCode | Type Code |
Amount | Amount |
PaymentFormTypeCode | Lease Contract Payment Form Type Code |
ValidityStartDate | Lease Contract Validity Start Date |
ValidityEndDate | Lease Contract Validity End Date |
TaxationCharacteristicsCode | Taxation Characteristics Code |
RecurrenceFrequencyCode | Recurrence Frequency Code |
RecurrenceOffsetDay | Recurrence Offset Day |
RecurrenceStartDate | Recurrence Start Date |
Organization Assignment | |
ValidityPeriod | Validity Period |
AccountAssignmentTypeCode | The type of accounting object of Lease Contract item |
CostCentreID | Cost Center of item |
ProjectTaskID | Project Task to which item is accounted to |
Example 1: Retrieves lease contract based on lease contract ID.
Web service request
<n0:LeaseContractByElementsQuery_Syncxmlns:n="http://sap.com/xi/SAPGlobal20/Global"> <LeaseContractSelectionByElements> <SelectionByID> <InclusionExclusionCode>I</InclusionExclusionCode> <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode> <LowerBoundaryIdentifier>633</LowerBoundaryIdentifier> </SelectionByID> </LeaseContractSelectionByElements> <ProcessingConditions> <QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator> </ProcessingConditions> </n0:LeaseContractByElementsQuery_Sync>
Web service response
<n0:LeaseContractByElementsResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAS82C82181F9C787EB3A1D:804"> <LeaseContract> <ID>633</ID> <UUID>00163e5f-4da7-1ee9-9f8a-cbd5763d6a7d</UUID> <LessorID>MC2000</LessorID> <LesseeCompanyID>MC10000</LesseeCompanyID> <EmployeeResposibleID>4137</EmployeeResposibleID> <Description>NV_QBO_Test02</Description> <ExternalReferenceID>NV_QBO_ExtRef02</ExternalReferenceID> <FrameAgreementID>1561811</FrameAgreementID> <CurrencyCode>USD</CurrencyCode> <UnlimitedLeaseContractIndicator>true</UnlimitedLeaseContractIndicator> <InceptionDate>2017-01-01</InceptionDate> <LeaseStartDate>2017-01-01</LeaseStartDate> <LeaseFirstEndDate>2019-12-31</LeaseFirstEndDate> <LeaseTermInMonths>0036</LeaseTermInMonths> <LeaseTermEndDate>2019-12-31</LeaseTermEndDate> <InterestRate>1.0</InterestRate> <SystemAdministrativeData> <CreationDateTime>2019-05-22T05:57:29.705107Z</CreationDateTime> <LastChangeDateTime>2019-05-22T06:02:11.748473Z</LastChangeDateTime> </SystemAdministrativeData> <CreatedBy>Venkatesan Nirosha</CreatedBy> <ChangedBy>Venkatesan Nirosha</ChangedBy> <LifecycleStatusCode>1</LifecycleStatusCode> <VersionID>0</VersionID> <VersionStartDate>2017-01-01</VersionStartDate> <VersionEndDate>2019-12-31</VersionEndDate> <TransitionIndicator>true</TransitionIndicator> <TransitionType>1</TransitionType> <ObjectItem> <ID>1</ID> <UUID>00163e5f-4da7-1ee9-9f8a-db5539d48a9f</UUID> <Description>ObjItem1</Description> <ExternalReferenceID>ObjItem_ExtRef01</ExternalReferenceID> <ObjectType>0002</ObjectType> <PaymentScheduleCreationStatus>1</PaymentScheduleCreationStatus> <CashflowCreationStatus>1</CashflowCreationStatus> <SetOfBooksRelevance> <SetOfBooksID>0001</SetOfBooksID> <LeaseValuationType>2</LeaseValuationType> <TransitionDate>2019-01-01</TransitionDate> <Relevance>2</Relevance> </SetOfBooksRelevance> <OrganisationalAssignment> <ValidityPeriod> <StartDate>2019-01-01</StartDate> <EndDate>2019-12-31</EndDate> </ValidityPeriod> <AccountAssignmentTypeCode>22</AccountAssignmentTypeCode> <ProjectTaskID>DCP447</ProjectTaskID> </OrganisationalAssignment> </ObjectItem> </LeaseContract> <ResponseProcessingConditions> <ReturnedQueryHitsNumberValue>1</ReturnedQueryHitsNumberValue> <MoreHitsAvailableIndicator>false</MoreHitsAvailableIndicator> <LastReturnedObjectID>00163E5F4DA71EE99F8ACBD5763D6A7D</LastReturnedObjectID> </ResponseProcessingConditions> <Log/> </n0:LeaseContractByElementsResponse_sync>
Release | Change Description | Details |
---|