P_SAFTGenLedgerBalance5

DDL: P_SAFTGENLEDGERBALANCE5 SQL: PSAFTGLBAL5 Type: view COMPOSITE

P_SAFTGenLedgerBalance5 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_GLAcctBalance) and exposes 14 fields with key fields Ledger, CompanyCode, FiscalYear, SourceLedger, AccountingDocument.

Data Sources (1)

SourceAliasJoin Type
I_GLAcctBalance I_GLAcctBalance from

Parameters (2)

NameTypeDefault
P_FromPostingDate abap.dats
P_ToPostingDate abap.dats

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PSAFTGLBAL5 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger
KEY CompanyCode CompanyCode
KEY FiscalYear FiscalYear
KEY SourceLedger SourceLedger
KEY AccountingDocument AccountingDocument
KEY LedgerGLLineItem LedgerGLLineItem
KEY GLAccountFlowType GLAccountFlowType
KEY FiscalPeriodDate FiscalPeriodDate
ChartOfAccounts ChartOfAccounts
GLAccount GLAccount
CompanyCodeCurrency CompanyCodeCurrency
DebitAmountInCoCodeCrcy DebitAmountInCoCodeCrcy
CreditAmountInCoCodeCrcy CreditAmountInCoCodeCrcy
EndingBalanceAmtInCoCodeCrcy EndingBalanceAmtInCoCodeCrcy
@AbapCatalog.sqlViewName: 'PSAFTGLBAL5'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #P
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
define view P_SAFTGenLedgerBalance5
  with parameters
    P_FromPostingDate : abap.dats,
    P_ToPostingDate   : abap.dats

  as select from I_GLAcctBalance( P_FromPostingDate: $parameters.P_FromPostingDate ,
                                       P_ToPostingDate: $parameters.P_ToPostingDate )
{
  key Ledger,
  key CompanyCode,
  key FiscalYear,
  key SourceLedger,
  key AccountingDocument,
  key LedgerGLLineItem,
  key GLAccountFlowType,
  key FiscalPeriodDate,

      case when FinancialAccountType = ' '
        then 'S'
        else FinancialAccountType
      end                   as FinancialAccountType,

      case when FinancialAccountType = 'D'
        then Customer
        else ''
      end                   as Customer,

      case when FinancialAccountType = 'K'
        then Supplier
        else ''
      end                   as Supplier,
     
      ChartOfAccounts,
      GLAccount,
      
      CompanyCodeCurrency,
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      DebitAmountInCoCodeCrcy,
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      CreditAmountInCoCodeCrcy, 
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      EndingBalanceAmtInCoCodeCrcy

}

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