I_REContractAddl

DDL: I_RECONTRACTADDL SQL: IRECONTRACTADDL Type: view COMPOSITE

RE Contract additional

I_REContractAddl is a Composite CDS View that provides data about "RE Contract additional" in SAP S/4HANA. It reads from 1 data source (I_REContract) and exposes 10 fields with key field InternalRealEstateNumber. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_REContract I_REContract from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_REContractType _REContractType $projection.REContractType = _REContractType.REContractType
[0..1] I_REContractStat _REContractStat $projection.REStatusObject = _REContractStat.StatusObject

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName IRECONTRACTADDL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
EndUserText.label RE Contract additional view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY InternalRealEstateNumber InternalRealEstateNumber
RealEstateContract RealEstateContract
CompanyCode CompanyCode
REContractType REContractType
REStatusObject REStatusObject
REAuthorizationGroup REAuthorizationGroup
REContractCategory _REContractType REContractCategory
_REContractType _REContractType
_REPartnerAssgmt _REPartnerAssgmt
_REContractStat _REContractStat
@AbapCatalog.sqlViewName: 'IRECONTRACTADDL'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED

@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType : #COMPOSITE // BASIC

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel: {
//  representativeKey: 'RealEstateContract',

  semanticKey: ['InternalRealEstateNumber' ],
  usageType.serviceQuality: #D,
  usageType.sizeCategory: #L,
  usageType.dataClass: #MIXED
}

@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@EndUserText.label: 'RE Contract additional'
define view I_REContractAddl
  as select from I_REContract
  association [1..1] to I_REContractType as _REContractType on $projection.REContractType = _REContractType.REContractType
  association [0..1] to I_REContractStat as _REContractStat on $projection.REStatusObject = _REContractStat.StatusObject
  //    association [0..*] to I_REReminderDateAddl          as _REReminderDateAddl         on  $projection.InternalRealEstateNumber = _REReminderDateAddl.InternalRealEstateNumber

  //                                                                                       and $projection.

//  association [0..1] to C_REContractConditionChart as _REContractConditionChart on  $projection.InternalRealEstateNumber = _REContractConditionChart.InternalRealEstateNumber

{
  key InternalRealEstateNumber,

      RealEstateContract,
      CompanyCode,
      REContractType,

      REStatusObject,

      REAuthorizationGroup,

      _REContractType.REContractCategory as REContractCategory,

//      cast(_REContractStat.REContractStatus as recnvdmcnstatus)   as REContractSystemStatusText,


     //case when REContractActivateDate = '00.00.0000' then 'false'

    // else 'true' end as toggleactive,

     
//      @DefaultAggregation: #SUM

//      sum(case

//            when _REReminderRule._REReminderDate.REReminderIsDone = 'X' then 0

//            when _REReminderRule._REReminderDate.REReminderIsDone is null then 0

//            //Uncritical reminders do not count

//            when _REReminderRule._REReminderDate.REReminderDate > DATS_ADD_DAYS(cast($session.system_date as dats),7,'UNCHANGED') then 0

//            else 1

//          end )                          as RENumberOfOpenReminders,

//

//      //Copied from I_REReminderDateAddl since association is not available here

//      @DefaultAggregation: #MIN

//      min( case when _REReminderRule.REReminderRule is null then 0 //no color

//            else  case

//           when _REReminderRule._REReminderDate.REReminderDate < $session.system_date

//            and _REReminderRule._REReminderDate.REReminderIsDone <> 'X'

//               then 1 //Overdue

//           when _REReminderRule._REReminderDate.REReminderDate >= $session.system_date

//            and _REReminderRule._REReminderDate.REReminderDate <= DATS_ADD_DAYS(cast($session.system_date as dats),7,'UNCHANGED')

//            and _REReminderRule._REReminderDate.REReminderIsDone <> 'X'

//               then 2 //Due in the next 7 days

//           else 3 //On Track or already done

//       end

//       end )                             as REOpenRemindersCriticality,


      _REContractType,
      _REPartnerAssgmt,
      _REContractStat
      
//      _REContractConditionChart


}
//group by

//  InternalRealEstateNumber,

//  RealEstateContract,

//  CompanyCode,

//  REContractType,

//  REAuthorizationGroup,

//  _REContractType.REContractCategory,

//  REStatusObject,

//  _REContractStat.REContractStatus

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_RECONTRACT",
"I_RECONTRACTTYPE"
],
"ASSOCIATED":
[
"I_RECONTRACTSTAT",
"I_RECONTRACTTYPE",
"I_REPARTNERASSGMT"
],
"BASE":
[
"I_RECONTRACT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/