I_UtilsBillgOrderForContract

DDL: I_UTILSBILLGORDERFORCONTRACT SQL: IEBILLGORDCONTR Type: view COMPOSITE

Billing Order For Contract

I_UtilsBillgOrderForContract is a Composite CDS View (Cube) that provides data about "Billing Order For Contract" in SAP S/4HANA. It reads from 2 data sources (I_UtilitiesBillingOrder, I_UtilitiesContract) and exposes 16 fields with key fields UtilitiesContract, UtilitiesInstallation, UtilitiesBillingReason, ScheduledUtilitiesBillingDate. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
I_UtilitiesBillingOrder UtilitiesBillingOrder from
I_UtilitiesContract UtilitiesContract inner

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_UtilitiesContract _UtilitiesContract $projection.UtilitiesContract = _UtilitiesContract.UtilitiesContract

Annotations (10)

NameValueLevelField
EndUserText.label Billing Order For Contract view
Analytics.dataCategory #CUBE view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName IEBILLGORDCONTR view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.allowExtensions true view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY UtilitiesContract I_UtilitiesContract UtilitiesContract
KEY UtilitiesInstallation I_UtilitiesBillingOrder UtilitiesInstallation
KEY UtilitiesBillingReason I_UtilitiesBillingOrder UtilitiesBillingReason
KEY ScheduledUtilitiesBillingDate I_UtilitiesBillingOrder ScheduledUtilitiesBillingDate
CompanyCode I_UtilitiesBillingOrder CompanyCode
AuthorizationGroup I_UtilitiesContract AuthorizationGroup
Division Division
MeterReadingUnit MeterReadingUnit
UtilitiesPortion UtilitiesPortion
_UtilitiesContract _UtilitiesContract
_UtilitiesBillingReason _UtilitiesBillingReason
_UtilitiesInstallation I_UtilitiesBillingOrder _UtilitiesInstallation
_MeterReadingUnit I_UtilitiesBillingOrder _MeterReadingUnit
_CompanyCode I_UtilitiesBillingOrder _CompanyCode
_Division I_UtilitiesBillingOrder _Division
_UtilitiesPortion I_UtilitiesBillingOrder _UtilitiesPortion
@EndUserText.label: 'Billing Order For Contract' //same as DDL description

@Analytics.dataCategory: #CUBE // #FACT

@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'IEBILLGORDCONTR' //must start with "I"

@AccessControl.authorizationCheck: #CHECK //or #NOT_REQUIRED 

@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions: true 
define view I_UtilsBillgOrderForContract as select from I_UtilitiesBillingOrder as UtilitiesBillingOrder 
  inner join I_UtilitiesContract as UtilitiesContract             on UtilitiesContract.UtilitiesInstallation = UtilitiesBillingOrder.UtilitiesInstallation
  association [1..1] to I_UtilitiesContract as _UtilitiesContract on $projection.UtilitiesContract           = _UtilitiesContract.UtilitiesContract
{
  @ObjectModel.foreignKey.association:'_UtilitiesContract' 
  key UtilitiesContract.UtilitiesContract,
  @ObjectModel.foreignKey.association:'_UtilitiesInstallation' 
  key UtilitiesBillingOrder.UtilitiesInstallation,
  @ObjectModel.foreignKey.association:'_UtilitiesBillingReason' 
  key UtilitiesBillingOrder.UtilitiesBillingReason,
  @Semantics.businessDate.at: true 
  key UtilitiesBillingOrder.ScheduledUtilitiesBillingDate,
  @ObjectModel.foreignKey.association:'_CompanyCode'
  UtilitiesBillingOrder.CompanyCode,
  UtilitiesContract.AuthorizationGroup,
  @ObjectModel.foreignKey.association:'_Division'
  Division,
  @ObjectModel.foreignKey.association:'_MeterReadingUnit'
  MeterReadingUnit,
  @ObjectModel.foreignKey.association:'_UtilitiesPortion'
  UtilitiesPortion,
  @DefaultAggregation: #SUM
  case when UtilsBillingOrderStatus = '2' then
   cast (1 as e_bllblebillgorder_vdm) 
  else
    0
  end as NmbrOfBllbleUtilsBillgOrds,
   @DefaultAggregation: #SUM
  case when UtilsBillingOrderStatus = '1' then
   cast (1 as e_nonbllblebillgorder_vdm)
  else
    0
  end as NmbrOfNonBllbleUtilsBillgOrds,    
// associations

  _UtilitiesContract,
  _UtilitiesBillingReason,
   UtilitiesBillingOrder._UtilitiesInstallation,
   UtilitiesBillingOrder._MeterReadingUnit,
   UtilitiesBillingOrder._CompanyCode,
   UtilitiesBillingOrder._Division,
   UtilitiesBillingOrder._UtilitiesPortion

}
where UtilitiesContract.UtilitiesMoveInDate  <= UtilitiesBillingOrder.ScheduledMeterReadingDate and
      UtilitiesContract.UtilitiesMoveOutDate >= UtilitiesBillingOrder.ScheduledMeterReadingDate

                                                                             
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_UTILITIESBILLINGORDER",
"I_UTILITIESCONTRACT"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_DIVISION",
"I_METERREADINGUNIT",
"I_UTILITIESBILLINGREASON",
"I_UTILITIESCONTRACT",
"I_UTILITIESINSTALLATION",
"I_UTILITIESPORTION"
],
"BASE":
[
"I_UTILITIESBILLINGORDER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/