I_REContractValid
Valid Real Estate Contracts
I_REContractValid is a Composite CDS View (Cube) that provides data about "Valid Real Estate Contracts" in SAP S/4HANA. It reads from 1 data source (I_REContract) and exposes 45 fields with key fields CompanyCode, RealEstateContract. It has 9 associations to related views. Part of development package VDM_RE_CN.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_REContract | _Contract | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_ValidFrom | vdm_validitystart | |
| P_ValidTo | vdm_validityend |
Associations (9)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_REContractType | _REContractType | $projection.REContractType = _REContractType.REContractType |
| [0..1] | I_REContractStat | _REContractSts | $projection.ObjectInternalID = _REContractSts.StatusObject |
| [0..1] | I_REContractTypeText | _ContractTypeName | $projection.REContractType = _ContractTypeName.REContractType and _ContractTypeName.Language = $session.system_language |
| [0..*] | I_StatusObjectStatusBasic | _IsActive | $projection.ObjectInternalID = _IsActive.StatusObject and _IsActive.StatusIsInactive = ' ' |
| [0..*] | I_StatusObjectStatusBasic | _IsDeleted | $projection.ObjectInternalID = _IsDeleted.StatusObject and _IsDeleted.StatusIsInactive = ' ' |
| [0..1] | I_REValuationRelevanceText | _REValuationRelevanceText | _REValuationRelevanceText.ValuationRelevance = $projection.ValuationRelevance and _REValuationRelevanceText.Language = $session.system_language |
| [0..1] | I_User | _CreatedByUser | $projection.CreatedByUser = _CreatedByUser.UserID |
| [0..1] | I_User | _ChangedByUser | $projection.LastChangedByUser = _ChangedByUser.UserID |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Analytics.dataCategory | #CUBE | view | |
| Analytics.internalName | #LOCAL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| AbapCatalog.sqlViewName | IRECONTRACTVALID | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| EndUserText.label | Valid Real Estate Contracts | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_CUBE | view | |
| Metadata.allowExtensions | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (45)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | ||
| KEY | RealEstateContract | RealEstateContract | ||
| InternalRealEstateNumber | InternalRealEstateNumber | |||
| ObjectInternalID | REStatusObject | |||
| CreatedByUser | CreatedByUser | Created by User | ||
| CreatedByUserDescription | _CreatedByUser | UserDescription | Created by User Description | |
| CreationDate | CreationDate | Creation Date | ||
| CreationTime | CreationTime | Creation Time | ||
| LastChangeDate | LastChangeDate | Changed Date | ||
| LastChangeTime | LastChangeTime | Changed Time | ||
| LastChangedByUser | LastChangedByUser | Last Changed User | ||
| LastChangedByUserDescription | _ChangedByUser | UserDescription | Last Changed User Description | |
| Responsible | Responsible | Responsible User | ||
| ResponsibleUserFullName | _ResponsibleUser | UserDescription | Responsible User Description | |
| REContractName | REContractName | |||
| ContractStartDate | ContractStartDate | Contract Start Date | ||
| ContractEndDate | ContractEndDate | Contract End Date | ||
| REContractFirstEndDate | REContractFirstEndDate | Contract First End Date | ||
| REContractNumberOld | REContractNumberOld | |||
| REMainContractCompanyCode | REMainContractCompanyCode | |||
| REMainContract | REMainContract | |||
| REAuthorizationGroup | REAuthorizationGroup | |||
| ValuationRelevance | ValuationRelevance | |||
| ValuationRelevanceDesc | _REValuationRelevanceText | ValuationRelevanceDesc | ||
| REIdentificationType | ||||
| REIdentificationKey | ||||
| CompanyCodeName | _CompanyCode | CompanyCodeName | ||
| REContractType | REContractType | |||
| REContractTypeName | _ContractTypeName | REContractTypeName | ||
| REContractSystStatus | _REContractSts | ConcatenatedActiveSystStsName | ||
| REContractUserStatus | _REContractSts | ConcatenatedActiveUserStsName | ||
| REContractStatus | _REContractSts | REContractStatus | ||
| Country | ||||
| CountryName | ||||
| NumberOfREContracts | Number of Contracts | |||
| _REContractSts | _REContractSts | |||
| _MainContractCompanyCode | _MainContractCompanyCode | |||
| _CreatedByUser | _CreatedByUser | |||
| _LastChangedByUser | _ChangedByUser | |||
| _ResponsibleUser | _ResponsibleUser | |||
| _REContractType | _REContractType | |||
| _CompanyCode | _CompanyCode | |||
| _IsActive | _IsActive | |||
| _IsDeleted | _IsDeleted | |||
| _REValuationRelevance | _REValuationRelevance |
@ClientHandling.algorithm: #SESSION_VARIABLE
@Analytics: {dataCategory: #CUBE}
@Analytics.internalName:#LOCAL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
//@ObjectModel.representativeKey: ['RealEstateContract']
@ObjectModel.semanticKey: ['CompanyCode','RealEstateContract']
@AbapCatalog.sqlViewName: 'IRECONTRACTVALID'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@EndUserText.label: 'Valid Real Estate Contracts'
@AbapCatalog.preserveKey:true
@AccessControl.privilegedAssociations: [ '_REContractSts', '_IsActive', '_IsDeleted' ]
//@ClientDependent: true
@VDM.viewType: #COMPOSITE
@ObjectModel.modelingPattern: #ANALYTICAL_CUBE
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_PROVIDER,
#SQL_DATA_SOURCE,
#CDS_MODELING_DATA_SOURCE ]
@Metadata.allowExtensions:true
@Metadata.ignorePropagatedAnnotations: true
define view I_REContractValid
// Start of insertion Parameters
with parameters
@Consumption.hidden: true
@Environment.systemField: #SYSTEM_DATE
P_ValidFrom :vdm_validitystart, //recncnbeg,
@Consumption.hidden: true
@Environment.systemField: #SYSTEM_DATE
P_ValidTo :vdm_validityend //recncnendabs
// end of insertion Parameters
as select from I_REContract as _Contract
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_REContractType as _REContractType on $projection.REContractType = _REContractType.REContractType
association [0..1] to I_REContractStat as _REContractSts on $projection.ObjectInternalID = _REContractSts.StatusObject
association [0..1] to I_REContractTypeText as _ContractTypeName on $projection.REContractType = _ContractTypeName.REContractType
and _ContractTypeName.Language = $session.system_language
association [0..*] to I_StatusObjectStatusBasic as _IsActive on $projection.ObjectInternalID = _IsActive.StatusObject
and _IsActive.StatusIsInactive = ' '
association [0..*] to I_StatusObjectStatusBasic as _IsDeleted on $projection.ObjectInternalID = _IsDeleted.StatusObject
and _IsDeleted.StatusIsInactive = ' '
association [0..1] to I_REValuationRelevanceText as _REValuationRelevanceText on _REValuationRelevanceText.ValuationRelevance = $projection.ValuationRelevance
and _REValuationRelevanceText.Language = $session.system_language
association [0..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_User as _ChangedByUser on $projection.LastChangedByUser = _ChangedByUser.UserID
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key CompanyCode,
key RealEstateContract,
InternalRealEstateNumber,
REStatusObject as ObjectInternalID,
// Admin
@EndUserText.label: 'Created by User'
CreatedByUser,
@EndUserText.label: 'Created by User Description'
_CreatedByUser.UserDescription as CreatedByUserDescription,
@EndUserText.label: 'Creation Date'
CreationDate,
@EndUserText.label: 'Creation Time'
CreationTime,
@EndUserText.label: 'Changed Date'
LastChangeDate,
@EndUserText.label: 'Changed Time'
LastChangeTime,
@EndUserText.label: 'Last Changed User'
LastChangedByUser,
@EndUserText.label: 'Last Changed User Description'
_ChangedByUser.UserDescription as LastChangedByUserDescription,
@EndUserText.label: 'Responsible User'
Responsible,
@EndUserText.label: 'Responsible User Description'
_ResponsibleUser.UserDescription as ResponsibleUserFullName,
REContractName,
@EndUserText.label: 'Contract Start Date'
ContractStartDate,
@EndUserText.label: 'Contract End Date'
ContractEndDate,
@EndUserText.label: 'Contract First End Date'
REContractFirstEndDate,
REContractNumberOld,
REMainContractCompanyCode,
REMainContract,
REAuthorizationGroup,
ValuationRelevance,
_REValuationRelevanceText.ValuationRelevanceDesc as ValuationRelevanceDesc,
'IS' as REIdentificationType,
cast(substring(rtrim(replace(concat(_Contract.CompanyCode, concat('/', _Contract.InternalRealEstateNumber)), '&@', ''),' '),1,45) as recaidentkey) as REIdentificationKey,
_CompanyCode.CompanyCodeName,
@ObjectModel.foreignKey.association: '_REContractType'
REContractType,
_ContractTypeName.REContractTypeName,
_REContractSts.ConcatenatedActiveSystStsName as REContractSystStatus,
_REContractSts.ConcatenatedActiveUserStsName as REContractUserStatus,
_REContractSts.REContractStatus as REContractStatus,
// @ObjectModel.foreignKey.association: '_IsActive'
@EndUserText.label: 'Contract is Active'
cast(case when _IsActive[1: StatusCode = 'I0119'].StatusCode is not null
and _IsActive[1: StatusCode = 'I0119'].StatusCode = 'I0119'
then 'X' else ''
end as lkenz ) as IsActive,
// @ObjectModel.foreignKey.association:'_IsDeleted'
@EndUserText.label: 'Contract is Deleted'
cast( case when ( _IsDeleted[1: StatusCode = 'I0076'].StatusCode is not null
and _IsDeleted[1: StatusCode = 'I0076'].StatusCode = 'I0076')
or ( _IsDeleted[1: StatusCode = 'I0013'].StatusCode is not null
and _IsDeleted[1: StatusCode = 'I0013'].StatusCode = 'I0013')
then 'X' else ''
end as lkenz ) as IsDeleted,
_Contract._CompanyCode._Country.Country as Country,
_Contract._CompanyCode._Country._Text[1: Language = $session.system_language].CountryName as CountryName,
@DefaultAggregation: #SUM
@EndUserText.label: 'Number of Contracts'
cast(1 as abap.int4) as NumberOfREContracts,
// Propagate association
_REContractSts,
_MainContractCompanyCode,
_CreatedByUser,
_ChangedByUser as _LastChangedByUser,
_ResponsibleUser,
_REContractType,
_CompanyCode,
_IsActive,
_IsDeleted,
_REValuationRelevance
}
// start of insertion Paramerters
where
ContractEndDate >= $parameters.P_ValidFrom
and ContractStartDate <= $parameters.P_ValidTo;
// end of insertion parameter
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA