I_UtilsBillgDocIntAndExtPoD

DDL: I_UTILSBILLGDOCINTANDEXTPOD SQL: IEBDOCINTEXTPOD Type: view COMPOSITE

Internal and External Point of Delivery for Billing Document

I_UtilsBillgDocIntAndExtPoD is a Composite CDS View that provides data about "Internal and External Point of Delivery for Billing Document" in SAP S/4HANA. It reads from 4 data sources (I_UtilitiesBillingDocument, I_UtilitiesContract, I_UtilsAllocOfExtToIntPoD, I_UtilsAllocOfInstToPoD) and exposes 4 fields with key field UtilitiesBillingDocument. It has 1 association to related views.

Data Sources (4)

SourceAliasJoin Type
I_UtilitiesBillingDocument UtilitiesBillingDocument from
I_UtilitiesContract UtilitiesContract inner
I_UtilsAllocOfExtToIntPoD UtilsAllocOfExtToIntPoD left_outer
I_UtilsAllocOfInstToPoD UtilsAllocOfInstToPoD inner

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_UtilitiesBillingDocument _UtilitiesBillingDocument $projection.UtilitiesBillingDocument = _UtilitiesBillingDocument.UtilitiesBillingDocument

Annotations (8)

NameValueLevelField
EndUserText.label Internal and External Point of Delivery for Billing Document view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName IEBDOCINTEXTPOD view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY UtilitiesBillingDocument I_UtilitiesBillingDocument UtilitiesBillingDocument
UtilsInternalPointOfDelivery I_UtilsAllocOfInstToPoD UtilsInternalPointOfDelivery
UtilsExternalPointOfDelivery I_UtilsAllocOfExtToIntPoD UtilsExternalPointOfDelivery
_UtilitiesBillingDocument _UtilitiesBillingDocument
@EndUserText.label: 'Internal and External Point of Delivery for Billing Document'
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'IEBDOCINTEXTPOD'
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view I_UtilsBillgDocIntAndExtPoD
  as select from    I_UtilitiesBillingDocument as UtilitiesBillingDocument
    inner join      I_UtilitiesContract        as UtilitiesContract       on UtilitiesContract.UtilitiesContract = UtilitiesBillingDocument.UtilitiesContract
    inner join      I_UtilsAllocOfInstToPoD    as UtilsAllocOfInstToPoD   on  UtilsAllocOfInstToPoD.UtilitiesInstallation          = UtilitiesContract.UtilitiesInstallation
                                                                          and UtilsAllocOfInstToPoD.UtilsInstToPoDAllocEndDate     = '99991231' // added in case of inconsistent data - it is not possible to have multiple IntPoDs for Installation

                                                                          and UtilsAllocOfInstToPoD.UtilsInstToPoDAllocEndTime     = '235959'   // added in case of inconsistent data

                                                                          and UtilsAllocOfInstToPoD.UtilsPtOfDeliveryIsDeregulated = 'X'
    left outer join I_UtilsAllocOfExtToIntPoD  as UtilsAllocOfExtToIntPoD on  UtilsAllocOfExtToIntPoD.UtilsInternalPointOfDelivery = UtilsAllocOfInstToPoD.UtilsInternalPointOfDelivery
                                                                          and UtilsAllocOfExtToIntPoD.UtilsPoDAllocValidityEndDate = '99991231'
                                                                          and UtilsAllocOfExtToIntPoD.UtilsPoDAllocValidityEndTime = '235959'

  //Interim Solution because of performance problems: access with timestamp (31.12.9999, 23:59) instead of end of billing period

  // and (

  //        (

  //           $projection.UtilsBillgPeriodEndDate <  UtilsAllocOfExtToIntPoD.UtilsPoDAllocValidityEndDate and

  //           $projection.UtilsBillgPeriodEndDate >= UtilsAllocOfExtToIntPoD.UtilsPoDAllocValidityStartDate

  //        ) or

  //        (

  //           $projection.UtilsBillgPeriodEndDate = UtilsAllocOfExtToIntPoD.UtilsPoDAllocValidityEndDate and

  //           UtilsAllocOfExtToIntPoD.UtilsPoDAllocValidityEndTime ='235959'

  //        )

  //)

  association [1..1] to I_UtilitiesBillingDocument as _UtilitiesBillingDocument on $projection.UtilitiesBillingDocument = _UtilitiesBillingDocument.UtilitiesBillingDocument
{
  key UtilitiesBillingDocument.UtilitiesBillingDocument,
      UtilsAllocOfInstToPoD.UtilsInternalPointOfDelivery,
      UtilsAllocOfExtToIntPoD.UtilsExternalPointOfDelivery,

      /* Associations */
      _UtilitiesBillingDocument
}