I_USFedAPInvoiceStatusCube

DDL: I_USFEDAPINVOICESTATUSCUBE Type: view_entity COMPOSITE

US Fed AP Invoice Status - Cube

I_USFedAPInvoiceStatusCube is a Composite CDS View (Cube) that provides data about "US Fed AP Invoice Status - Cube" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItemRawData) and exposes 75 fields with key fields CompanyCode, SourceLedger, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 12 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountLineItemRawData I_GLAccountLineItemRawData from

Parameters (1)

NameTypeDefault
P_ClearingStatus fis_clearingstatusselection

Associations (12)

CardinalityTargetAliasCondition
[1..1] E_JournalEntryItem _Extension $projection.SourceLedger = _Extension.SourceLedger and $projection.CompanyCode = _Extension.CompanyCode and $projection.FiscalYear = _Extension.FiscalYear and $projection.AccountingDocument = _Extension.AccountingDocument and $projection.LedgerGLLineItem = _Extension.LedgerGLLineItem
[0..1] I_FunctionalArea _FunctionalAreaHierarchy $projection.FndsMgmtRptgFctArForHierarchy = _FunctionalAreaHierarchy.FunctionalArea
[0..1] I_Segment _SegmentHierarchy $projection.FndsMgmtRptgSegmentForHier = _SegmentHierarchy.Segment
[0..1] I_Fund _FundHierarchy $projection.FinancialManagementArea = _FundHierarchy.FinancialManagementArea and $projection.FndsMgmtRptgFundForHierarchy = _FundHierarchy.Fund
[0..1] I_FundedProgram _FundedProgramHierarchy $projection.FinancialManagementArea = _FundedProgramHierarchy.FinancialManagementArea and $projection.FndsMgmtRptgFnddPgmForHier = _FundedProgramHierarchy.FundedProgram
[0..*] I_ProfitCenter _ProfitCenterHierarchy $projection.ControllingArea = _ProfitCenterHierarchy.ControllingArea and $projection.FndsMgmtRptgPrftCtrForHier = _ProfitCenterHierarchy.ProfitCenter
[0..1] I_BudgetPeriod _BudgetPeriodHierarchy $projection.FndsMgmtRptgBdgtPerdForHier = _BudgetPeriodHierarchy.BudgetPeriod
[0..*] I_FundsCenter _FundsCenterHierarchy $projection.FinancialManagementArea = _FundsCenterHierarchy.FinancialManagementArea and $projection.FndsMgmtRptgFndsCtrForHier = _FundsCenterHierarchy.FundsCenter
[0..1] I_GLAccountInChartOfAccounts _GLAccountHierarchy $projection.ChartOfAccounts = _GLAccountHierarchy.ChartOfAccounts and $projection.GLAccountForHierarchy = _GLAccountHierarchy.GLAccount
[0..1] I_FiscalYearForFinMgmtArea _FiscalYearForFinMgmtArea $projection.FinancialManagementArea = _FiscalYearForFinMgmtArea.FinancialManagementArea and $projection.USFedFiscalYearBlank = _FiscalYearForFinMgmtArea.FinMgmtAreaFiscalYear
[0..1] I_WBSElementBasicData _WBS $projection.FundedProgram = _WBS.WBSElement
[0..1] I_USFedProjectBasicDetail _Project $projection.USFedProjectIdentifier = _Project.ProjectExternalID

Annotations (12)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label US Fed AP Invoice Status - Cube view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
Analytics.internalName #LOCAL view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
Analytics.dataCategory #CUBE view
VDM.viewType #COMPOSITE view

Fields (75)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY SourceLedger SourceLedger
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
KEY LedgerGLLineItem LedgerGLLineItem
GLAccount GLAccount
AccountingDocumentType AccountingDocumentType
USFedFiscalYearBlank FiscalYear
Fund Fund
FinancialManagementArea FinancialManagementArea
ChartOfAccounts ChartOfAccounts
BudgetPeriod BudgetPeriod
FundsCenter FundsCenter
FunctionalArea FunctionalArea
FundedProgram FundedProgram
USFedProjectIdentifier
Supplier Supplier
OrganizationBPName1 _Supplier OrganizationBPName1
ControllingArea ControllingArea
ProfitCenter ProfitCenter
Segment Segment
BusinessArea BusinessArea
FiscalYearPeriod FiscalYearPeriod
FiscalYearVariant FiscalYearVariant
InvoiceReference InvoiceReference
InvoiceReferenceFiscalYear InvoiceReferenceFiscalYear
InvoiceItemReference InvoiceItemReference
DocumentDate DocumentDate
ClearingDate ClearingDate
ClearingJournalEntry ClearingJournalEntry
ClearingJournalEntryFiscalYear ClearingJournalEntryFiscalYear
IsOpenItemManaged IsOpenItemManaged
FinancialAccountType FinancialAccountType
PostingDate PostingDate
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency
CompanyCodeCurrency CompanyCodeCurrency
FndsMgmtRptgSegmentForHier Segment
_SegmentHierarchy _SegmentHierarchy
FndsMgmtRptgFundForHierarchy Fund
_FundHierarchy _FundHierarchy
GLAccountForHierarchy GLAccount
_GLAccountHierarchy _GLAccountHierarchy
FndsMgmtRptgFnddPgmForHier FundedProgram
_FundedProgramHierarchy _FundedProgramHierarchy
FndsMgmtRptgPrftCtrForHier ProfitCenter
_ProfitCenterHierarchy _ProfitCenterHierarchy
FndsMgmtRptgBdgtPerdForHier BudgetPeriod
_BudgetPeriodHierarchy _BudgetPeriodHierarchy
FndsMgmtRptgFctArForHierarchy FunctionalArea
_FunctionalAreaHierarchy _FunctionalAreaHierarchy
FndsMgmtRptgFndsCtrForHier FundsCenter
_FundsCenterHierarchy _FundsCenterHierarchy
_CompanyCode _CompanyCode
_Ledger _Ledger
_FiscalYear _FiscalYear
_FiscalYearForFinMgmtArea _FiscalYearForFinMgmtArea
_JournalEntry _JournalEntry
_AccountingDocumentType _AccountingDocumentType
_Fund _Fund
_FinancialManagementArea _FinancialManagementArea
_ChartOfAccounts _ChartOfAccounts
_BudgetPeriod _BudgetPeriod
_FundsCenter _FundsCenter
_FunctionalArea _FunctionalArea
_FundedProgram _FundedProgram
_Supplier _Supplier
_ControllingArea _ControllingArea
_ProfitCenter _ProfitCenter
_Segment _Segment
_BusinessArea _BusinessArea
_FiscalYearPeriodForVariant _FiscalYearPeriodForVariant
_FiscalYearVariant _FiscalYearVariant
_FinancialAccountType _FinancialAccountType
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_Project _Project
@AbapCatalog.viewEnhancementCategory: [#PROJECTION_LIST]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'US Fed AP Invoice Status - Cube'
@Metadata: { ignorePropagatedAnnotations: true,
             allowExtensions:true }
@Analytics.internalName:#LOCAL
@AccessControl.personalData.blocking: #REQUIRED
@ObjectModel: {
                usageType: { sizeCategory: #XXL,
                             dataClass:  #MIXED,
                             serviceQuality: #D },
                supportedCapabilities: [#ANALYTICAL_PROVIDER],
                modelingPattern: #ANALYTICAL_CUBE }
@Analytics: { dataCategory: #CUBE }
@VDM.viewType: #COMPOSITE
define view entity I_USFedAPInvoiceStatusCube
  with parameters
    // P_ClearingStatus_Sel : fis_clearingstatusselection

    P_ClearingStatus : fis_clearingstatusselection
  as select from I_GLAccountLineItemRawData
  association [1..1] to E_JournalEntryItem           as _Extension                on  $projection.SourceLedger       = _Extension.SourceLedger
                                                                                  and $projection.CompanyCode        = _Extension.CompanyCode
                                                                                  and $projection.FiscalYear         = _Extension.FiscalYear
                                                                                  and $projection.AccountingDocument = _Extension.AccountingDocument
                                                                                  and $projection.LedgerGLLineItem   = _Extension.LedgerGLLineItem
  association [0..1] to I_FunctionalArea             as _FunctionalAreaHierarchy  on  $projection.FndsMgmtRptgFctArForHierarchy = _FunctionalAreaHierarchy.FunctionalArea
  association [0..1] to I_Segment                    as _SegmentHierarchy         on  $projection.FndsMgmtRptgSegmentForHier = _SegmentHierarchy.Segment
  association [0..1] to I_Fund                       as _FundHierarchy            on  $projection.FinancialManagementArea      = _FundHierarchy.FinancialManagementArea
                                                                                  and $projection.FndsMgmtRptgFundForHierarchy = _FundHierarchy.Fund
  association [0..1] to I_FundedProgram              as _FundedProgramHierarchy   on  $projection.FinancialManagementArea    = _FundedProgramHierarchy.FinancialManagementArea
                                                                                  and $projection.FndsMgmtRptgFnddPgmForHier = _FundedProgramHierarchy.FundedProgram
  association [0..*] to I_ProfitCenter               as _ProfitCenterHierarchy    on  $projection.ControllingArea            = _ProfitCenterHierarchy.ControllingArea
                                                                                  and $projection.FndsMgmtRptgPrftCtrForHier = _ProfitCenterHierarchy.ProfitCenter
  association [0..1] to I_BudgetPeriod               as _BudgetPeriodHierarchy    on  $projection.FndsMgmtRptgBdgtPerdForHier = _BudgetPeriodHierarchy.BudgetPeriod
  association [0..*] to I_FundsCenter                as _FundsCenterHierarchy     on  $projection.FinancialManagementArea    = _FundsCenterHierarchy.FinancialManagementArea
                                                                                  and $projection.FndsMgmtRptgFndsCtrForHier = _FundsCenterHierarchy.FundsCenter
  association [0..1] to I_GLAccountInChartOfAccounts as _GLAccountHierarchy       on  $projection.ChartOfAccounts       = _GLAccountHierarchy.ChartOfAccounts
                                                                                  and $projection.GLAccountForHierarchy = _GLAccountHierarchy.GLAccount
  association [0..1] to I_FiscalYearForFinMgmtArea   as _FiscalYearForFinMgmtArea on  $projection.FinancialManagementArea = _FiscalYearForFinMgmtArea.FinancialManagementArea
                                                                                  and $projection.USFedFiscalYearBlank    = _FiscalYearForFinMgmtArea.FinMgmtAreaFiscalYear
  association [0..1] to I_WBSElementBasicData        as _WBS                      on  $projection.FundedProgram = _WBS.WBSElement
  association [0..1] to I_USFedProjectBasicDetail    as _Project                  on  $projection.USFedProjectIdentifier = _Project.ProjectExternalID

{
      @ObjectModel.foreignKey.association: '_CompanyCode'
  key CompanyCode, //RBUKRS

      @ObjectModel.foreignKey.association: '_Ledger'
  key SourceLedger, //RLDNR

      @ObjectModel.foreignKey.association: '_FiscalYear'
  key FiscalYear, //GJAHR

      @ObjectModel.foreignKey.association: '_JournalEntry'
  key AccountingDocument,         //BELNR

  key LedgerGLLineItem,           //DOCLN

      @ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
      GLAccount,
      @ObjectModel.foreignKey.association: '_AccountingDocumentType'
      AccountingDocumentType,     //BLART

      @ObjectModel.foreignKey.association:'_FiscalYearForFinMgmtArea'
      FiscalYear                      as USFedFiscalYearBlank,
      @ObjectModel.foreignKey.association: '_Fund'
      Fund, //RFUND

      @ObjectModel.foreignKey.association: '_FinancialManagementArea'
      FinancialManagementArea, //FIKRS

      @ObjectModel.foreignKey.association: '_ChartOfAccounts'
      ChartOfAccounts,
      @ObjectModel.foreignKey.association: '_BudgetPeriod'
      BudgetPeriod,   //BUDPER

      @ObjectModel.foreignKey.association: '_FundsCenter'
      FundsCenter,    //FISTL

      @ObjectModel.foreignKey.association: '_FunctionalArea'
      FunctionalArea, //RFAREA

      @ObjectModel.foreignKey.association: '_FundedProgram'
      FundedProgram,  //measure, Project Task Identifier

      @ObjectModel.foreignKey.association: '_Project'
      // _WBS._Project.ProjectExternalID as USFedProjectIdentifier, //USFedProjectExternalID, // Project Identifier

      _WBS._Project.ProjectExternalID as USFedProjectIdentifier,
      @ObjectModel.foreignKey.association: '_Supplier'
      Supplier, //LIFNR

      _Supplier.OrganizationBPName1   as OrganizationBPName1,
      @ObjectModel.foreignKey.association: '_ControllingArea'
      ControllingArea,  //kokrs

      @ObjectModel.foreignKey.association: '_ProfitCenter'
      ProfitCenter,     //PRCTR

      @ObjectModel.foreignKey.association: '_Segment'
      Segment,          //SEGMENT

      @ObjectModel.foreignKey.association: '_BusinessArea'
      BusinessArea,     //GSBER

      @ObjectModel.foreignKey.association: '_FiscalYearPeriodForVariant'
      @Semantics.fiscal.yearPeriod: true
      FiscalYearPeriod, //FISCYEARPER

      @ObjectModel.foreignKey.association: '_FiscalYearVariant'
      @Semantics.fiscal.yearVariant: true
      FiscalYearVariant,
      InvoiceReference,           //REBZG

      InvoiceReferenceFiscalYear, //REBZJ

      InvoiceItemReference,       //REBZZ

      DocumentDate, //BLDAT

      ClearingDate, //AUGDT

      ClearingJournalEntry,           //AUGBL

      ClearingJournalEntryFiscalYear, //auggj

      @Semantics.booleanIndicator: true
      IsOpenItemManaged, //XOPVW

      @ObjectModel.foreignKey.association: '_FinancialAccountType'
      FinancialAccountType, //KOART,

      PostingDate, //BUDAT


      case
      //when $parameters.P_ClearingStatus_Sel = '1' then cast ( '1' as abap.char( 1 ) )   // All

      when $parameters.P_ClearingStatus = '1' then cast ( '1' as abap.char( 1 ) )   // All

      when ClearingJournalEntry = '' then   cast ( '2' as abap.char( 1 ) )              // Open

      when ClearingJournalEntry != ''  then  cast ( '3' as abap.char( 1 ) )             // Clear

      else null
      end                             as ClearingStatusSelection,

      case
      when ClearingJournalEntry != '' then 'Yes' //as fis_augbl )

      when ClearingJournalEntry  = '' then 'No' //as fis_augbl )

      else null
      end                             as ClearingStatusName,

      // Measures

      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      @Aggregation.default: #SUM
      case
      when ClearingJournalEntry != '' then AmountInCompanyCodeCurrency
      else null
      end                             as USFedClearedAmount,
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      @Aggregation.default: #SUM
      case
      when ClearingJournalEntry = '' then AmountInCompanyCodeCurrency
      else null
      end                             as USFedOpenAmount,
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      @Aggregation.default: #SUM
      AmountInCompanyCodeCurrency, //HSL

      CompanyCodeCurrency,

      // Hierarchy fields

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SegmentHierarchy'
      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      Segment                         as FndsMgmtRptgSegmentForHier,
      _SegmentHierarchy,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_FundHierarchy'
      Fund                            as FndsMgmtRptgFundForHierarchy,
      _FundHierarchy,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_GLAccountHierarchy'
      GLAccount                       as GLAccountForHierarchy,
      _GLAccountHierarchy,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_FundedProgramHierarchy'
      FundedProgram                   as FndsMgmtRptgFnddPgmForHier,
      _FundedProgramHierarchy,

      @Analytics.internalName: #LOCAL
      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      @ObjectModel.foreignKey.association: '_ProfitCenterHierarchy'
      ProfitCenter                    as FndsMgmtRptgPrftCtrForHier,
      _ProfitCenterHierarchy,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_BudgetPeriodHierarchy'
      BudgetPeriod                    as FndsMgmtRptgBdgtPerdForHier,
      _BudgetPeriodHierarchy,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_FunctionalAreaHierarchy'
      FunctionalArea                  as FndsMgmtRptgFctArForHierarchy,
      _FunctionalAreaHierarchy,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_FundsCenterHierarchy'
      FundsCenter                     as FndsMgmtRptgFndsCtrForHier,
      _FundsCenterHierarchy,


      //Associations

      _CompanyCode,
      _Ledger,
      _FiscalYear,
      _FiscalYearForFinMgmtArea,
      _JournalEntry,
      _AccountingDocumentType,
      _Fund,
      _FinancialManagementArea,
      _ChartOfAccounts,
      _BudgetPeriod,
      _FundsCenter,
      _FunctionalArea,
      _FundedProgram,
      _Supplier,
      _ControllingArea,
      _ProfitCenter,
      _Segment,
      _BusinessArea,
      _FiscalYearPeriodForVariant,
      _FiscalYearVariant,
      _FinancialAccountType,
      _GLAccountInChartOfAccounts,
      _Project
}