C_PL_CAExcessDelRepLogItm

DDL: C_PL_CAEXCESSDELREPLOGITM Type: view_entity CONSUMPTION Package: FKK_ID_PL_REP

FICA PL Reporting Items

C_PL_CAExcessDelRepLogItm is a Consumption CDS View that provides data about "FICA PL Reporting Items" in SAP S/4HANA. It reads from 1 data source (I_CADocumentBPItem) and exposes 12 fields with key fields CADocumentNumber, CARepetitionItemNumber, CABPItemNumber, CASubItemNumber, BusinessPartnerAddressID. It has 1 association to related views. Part of development package FKK_ID_PL_REP.

Data Sources (1)

SourceAliasJoin Type
I_CADocumentBPItem I_CADocumentBPItem from

Parameters (3)

NameTypeDefault
P_KeyDate fipl_keydate
P_CADocumentBPItemIsOpen xfeld
P_CADocumentBPItemIsCleared xfeld

Associations (1)

CardinalityTargetAliasCondition
[1..*] P_BusinessPartnerDefaultAddr _DefaultAddress $projection.BusinessPartner = _DefaultAddress.BusinessPartner and ( _DefaultAddress.ValidityStartDate is null or _DefaultAddress.ValidityStartDate <= $parameters.P_KeyDate ) and( _DefaultAddress.ValidityEndDate is null or _DefaultAddress.ValidityEndDate > $parameters.P_KeyDate )

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY CADocumentNumber CADocumentNumber
KEY CARepetitionItemNumber CARepetitionItemNumber
KEY CABPItemNumber CABPItemNumber
KEY CASubItemNumber CASubItemNumber
KEY BusinessPartnerAddressID _DefaultAddress BusinessPartnerAddressID
CompanyCode CompanyCode
BusinessPartner BusinessPartner
ProfitCenter ProfitCenter
CADocumentType CADocumentType
CAReconciliationAccount CAReconciliationAccount
CAClearingDate CAClearingDate
Country
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #XL,
  dataClass: #TRANSACTIONAL
}
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
define view entity C_PL_CAExcessDelRepLogItm
  with parameters
    P_KeyDate                   : fipl_keydate,
    P_CADocumentBPItemIsOpen    : xfeld,
    P_CADocumentBPItemIsCleared : xfeld
  as select from I_CADocumentBPItem
  association [1..*] to P_BusinessPartnerDefaultAddr as _DefaultAddress on $projection.BusinessPartner = _DefaultAddress.BusinessPartner
    and 
     (     
        _DefaultAddress.ValidityStartDate is null
        or _DefaultAddress.ValidityStartDate <= $parameters.P_KeyDate       
      )
      and(      
        _DefaultAddress.ValidityEndDate is null
        or _DefaultAddress.ValidityEndDate > $parameters.P_KeyDate
      )
{
  key CADocumentNumber                 as CADocumentNumber,
  key CARepetitionItemNumber           as CARepetitionItemNumber,
  key CABPItemNumber                   as CABPItemNumber,
  key CASubItemNumber                  as CASubItemNumber,
  key _DefaultAddress.BusinessPartnerAddressID,

      CompanyCode                      as CompanyCode,
      BusinessPartner                  as BusinessPartner,
      ProfitCenter                     as ProfitCenter,
      CADocumentType                   as CADocumentType,
      CAReconciliationAccount          as CAReconciliationAccount,
      CAClearingDate                   as CAClearingDate,
      _DefaultAddress._AddressDefaultRepresentation.Country as Country

}
where
             CAPostingDate                  <= $parameters.P_KeyDate

  and(
    (        // include cleared documents based on parameter

             $parameters.P_CADocumentBPItemIsCleared    =  'X'
      and    CAClearingDate                <= $parameters.P_KeyDate
    )
    or(      // include open documents based on parameter


             $parameters.P_CADocumentBPItemIsOpen       =  'X'
      and(
             CAClearingDate                > $parameters.P_KeyDate
        or(
             CAClearingDate                is initial
          or CAClearingStatus              is initial
        )
      )
    )
  )
  and(
             CAAmountInLocalCurrency       <> 0
    or       CAAmountInTransactionCurrency <> 0
  )