R_RECONTRACTTP

CDS View

Real Estate Contract TP

R_RECONTRACTTP is a CDS View in S/4HANA. Real Estate Contract TP. 4 CDS views read from this table.

CDS Views using this table (4)

ViewTypeJoinVDMDescription
A_REContract view_entity projection CONSUMPTION Real Estate Contract
C_REContractTermTP view_entity projection CONSUMPTION Contract Term Management Root
C_REContractTP view_entity projection CONSUMPTION Real Estate Contract
C_REValuationManageTP view_entity projection CONSUMPTION Contract Valuation Management Root
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: ['_StatusObject']
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED

@EndUserText.label: 'Real Estate Contract TP'

@ObjectModel: {
        usageType: {
            serviceQuality: #C,
            dataClass: #TRANSACTIONAL,
            sizeCategory: #XL
        },

        semanticKey: ['RealEstateContract', 'CompanyCode' ],
        representativeKey: 'InternalRealEstateNumber',
        sapObjectNodeType.name: 'RealEstateContract',
        lifecycle.enqueue.expiryInterval: 'PT15M', //draft expiry 15 min for lock testing

        objectIdentifier.oidElement: 'RealEstateContractOID',
        alternativeKey: [{ element: [ 'RealEstateContractOID' ], id: 'OID', uniqueness: #UNIQUE_IF_NOT_INITIAL }]
    }

@VDM: {
    viewType: #TRANSACTIONAL,
    lifecycle.contract.type: #SAP_INTERNAL_API,
    usage.type: [ #TRANSACTIONAL_PROCESSING_SERVICE ]
    }

@Analytics.technicalName: 'RRECONTRACTTP'

define root view entity R_REContractTP
  as select from I_REContract as REContract
  composition [0..*] of R_REContrPartAssgmtTP          as _REPartnerAssgmtTP
  composition [0..*] of R_REContrObjAssgmtTP           as _REObjAssgmtTP
  composition [1..*] of R_REContrOrglAssgmtTermTP      as _REOrglAssgmtTermTP
  composition [1..*] of R_REContrPostingTermTP         as _REPostingTermTP
  composition [1..*] of R_REContrRhythmTermTP          as _RERhythmTermTP
  composition [0..*] of R_REContrRenewalTermAndRulesTP as _RERenewalTermAndRulesTP
  composition [0..*] of R_REContrRenewalTermTP         as _RERenewalTermTP

  composition [0..*] of R_REContractRenewalTP          as _RERenewalTP
  composition [0..*] of R_REContractNoticeTP           as _RENoticeTP

  composition [0..*] of R_REContrNoticeTermTP          as _RENoticeTermTP
  composition [0..*] of R_REContrNoticeTermAndRulesTP  as _RENoticeTermAndRulesTP
  composition [0..*] of R_REContrConditionTP           as _REConditionTP
  composition [0..*] of R_REContrNoticeTermForObjTP    as _RENoticeTermForObjTP
  composition [0..*] of R_REContrAdjustmentTermTP      as _REAdjustmentTermTP
  composition [0..*] of R_REContrReminderRuleTP        as _REReminderRuleTP
  composition [0..*] of R_REContrReminderRuleMainTP    as _REReminderRuleMainTP
  composition [0..*] of R_REContrReminderDateTP        as _REReminderDateTP
  composition [0..*] of R_REContrValuationTP           as _REValuationTP
  composition [0..*] of R_REContrValuationConditionTP  as _REValuationConditionTP
  composition [0..*] of R_REContrSalesRuleTermTP       as _RESalesRuleTermTP
  composition [0..*] of R_REContrSalesReportingTermTP  as _RESalesReportingTermTP
  composition [0..*] of R_REContrSalesRuleFrqcyTermTP  as _RESalesRuleFrqcyTermTP
  composition [0..*] of R_REContrRegistryEntryTP       as _RERegistryEntryTP
  composition [0..*] of R_REContrValuationProcStepTP   as _REValuationProcessStepTP
  composition [0..*] of R_REContrStatusObjectTP        as _REStatusObjectTP

  //  Additional fields

  association [1..1] to I_REContractAddl               as _REContractAddl    on  $projection.InternalRealEstateNumber = _REContractAddl.InternalRealEstateNumber
  //Text

  association [0..*] to I_StatusProfiletext            as _StatusProfileText on  $projection.StatusProfile = _StatusProfileText.StatusProfile
  //  Extensibility

  association [1..1] to E_REContract                   as _Extension         on  $projection.InternalRealEstateNumber = _Extension.InternalRealEstateNumber

  association [0..1] to P_REActVlnForCoCodeContrType as _ValuationRules 
      on $projection.CompanyCode = _ValuationRules.CompanyCode and
         $projection.REContractType = _ValuationRules.REContractType
         
{
  key     InternalRealEstateNumber                                                                                               as InternalRealEstateNumber,
          CompanyCode                                                                                                            as CompanyCode,
          RealEstateContract                                                                                                     as RealEstateContract,
          REStatusObject                                                                                                         as REStatusObject,
          REInternalFinNumber                                                                                                    as REInternalFinNumber,
          RealEstateContractOID,
          REContractAlternativeID,
          REIdentificationKey                                                                                                    as REIdentificationKey,
          RECreationType                                                                                                         as RECreationType,
          @Semantics.user.createdBy: true
          CreatedByUser                                                                                                          as CreatedByUser,
          CreationDate                                                                                                           as CreationDate,
          CreationTime                                                                                                           as CreationTime,
          //          Create Timestamp aggregation

          @Semantics.systemDateTime.createdAt: true
          cast (dats_tims_to_tstmp( CreationDate,
                              CreationTime,
                              abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as vdm_creationdatetime) as CreationDateTime,
          RESourceOfCreation                                                                                                     as RESourceOfCreation,
          @Semantics.user.lastChangedBy: true
          LastChangedByUser                                                                                                      as LastChangedByUser,
          LastChangeDate                                                                                                         as LastChangeDate,
          LastChangeTime                                                                                                         as LastChangeTime,
          //          LastChange Timestamp aggregation

          @Semantics.systemDateTime.lastChangedAt: true
          cast (dats_tims_to_tstmp( LastChangeDate,
                              LastChangeTime,
                              abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as vdm_lastchangedon)    as LastChangeDateTime,
          RESourceOfChange                                                                                                       as RESourceOfChange,
          Responsible                                                                                                            as Responsible,
          REUserExclusive                                                                                                        as REUserExclusive,
          REAuthorizationGroup                                                                                                   as REAuthorizationGroup,
          REContractType                                                                                                         as REContractType,
          @Semantics.businessDate.from: true
          ContractStartDate                                                                                                      as ContractStartDate,
          @Semantics.businessDate.to: true
          ContractEndDate                                                                                                        as ContractEndDate,
          //@ObjectModel.mandatory: true

          @Semantics.text: true
          REContractName                                                                                                         as REContractName,
          REContractActivateDate                                                                                                 as REContractActivateDate,
          RETenancyLaw                                                                                                           as RETenancyLaw,
          REContractNumberOld                                                                                                    as REContractNumberOld,
          REMainContractCompanyCode                                                                                              as REMainContractCompanyCode,
          REMainContract                                                                                                         as REMainContract,
          //@Semantics.currencyCode: true

          REContractCurrency                                                                                                     as REContractCurrency,
          REIndustrySector                                                                                                       as REIndustrySector,
          REIsSalesRelevant                                                                                                      as REIsSalesRelevant,
          REContractDepositType                                                                                                  as REContractDepositType,
          REContractSignDate                                                                                                     as REContractSignDate,
          REContract2SignDate                                                                                                    as REContract2SignDate,
          REContractCashFlowDate                                                                                                 as REContractCashFlowDate,
          REContractFirstEndDate                                                                                                 as REContractFirstEndDate,
          REContractNoticeDate                                                                                                   as REContractNoticeDate,
          REContractNoticeInDate                                                                                                 as REContractNoticeInDate,
          REContractNoticeReason                                                                                                 as REContractNoticeReason,
          REContractNoticeActivationDate                                                                                         as REContractNoticeActivationDate,
          RECashFlowArchivedToDate                                                                                               as RECashFlowArchivedToDate,
          RECashFlowLockedToDate                                                                                                 as RECashFlowLockedToDate,
          RECashFlowPostingFromDate                                                                                              as RECashFlowPostingFromDate,
          REBusinessEntity                                                                                                       as REBusinessEntity,
          REPossessionStartDate                                                                                                  as REPossessionStartDate,
          REPossessionEndDate                                                                                                    as REPossessionEndDate,
          REHasMultipleAssignments                                                                                               as REHasMultipleAssignments,
          REObjectAvailableFromDate                                                                                              as REObjectAvailableFromDate,
          REObjectAvailableToDate                                                                                                as REObjectAvailableToDate,
          ValuationRelevance                                                                                                     as ValuationRelevance,
          _StatusObject.StatusProfile                                                                                            as StatusProfile,
          RealEstateObjectType                                                                                                   as RealEstateObjectType,
          _REContractType.REBusinessPartnerRole1                                                                                 as REBusinessPartnerRole1,
          
 //         cast ('' as receceactive ) as REContractIsRelevantForValn,

          case
            when _ValuationRules[1: 1 = 1].REValuationRuleIsActive is null then ''
            else _ValuationRules[1: 1 = 1].REValuationRuleIsActive 
          end as REContractIsRelevantForValn,
          
//          _ValuationRules[1: 1 = 1].REValuationRuleIsActive                                                                      as REContractIsRelevantForValn,

          //          _REContractStat.REContractStatus                                     as REContractStatus,


          _REContractAddl,
          _CompanyCode,
          _MainContractCompanyCode,
          _StatusObject,
          _StatusObjectStatus,
          _REObjectType,
          _REAuthorizationGroup,
          _CreatedByUser,
          _ChangedByUser,
          _ResponsibleUser,
          _Currency,
          _REIndustry,
          _RECreationType,
          _REContractType_2 as _REContractType,
          _RETenancyLaw,
          _REContractDepositType,
          _REContractNoticeReason,
          _REValuationRelevance,
          _REPartnerAssgmtTP,
          _REOrglAssgmtTermTP,
          _REPostingTermTP,
          _RERhythmTermTP,
          _REObjAssgmtTP,
          @Semantics.valueRange.maximum: '1'
          _RERenewalTermTP,
          _RERenewalTermAndRulesTP,
          _StatusProfileText,
          _RERenewalTP,
          _RENoticeTP,
          

          @Semantics.valueRange.maximum: '1'
          _RENoticeTermTP,
          _REConditionTP,
          _RENoticeTermForObjTP,
          _REAdjustmentTermTP,
          _REReminderRuleTP,
          _REReminderRuleMainTP,
          _REReminderDateTP,
          _REValuationTP,
          _REValuationConditionTP,
          _RESalesRuleTermTP,
          _RESalesReportingTermTP,
          _RESalesRuleFrqcyTermTP,
          _RERegistryEntryTP,
          _RENoticeTermAndRulesTP,
          _REValuationProcessStepTP,
          _REStatusObjectTP
}