P_OplAcctgDocItemDebitSum

DDL: P_OPLACCTGDOCITEMDEBITSUM SQL: PFIOPACCTGDITDS Type: view COMPOSITE Package: GLO_FIN_IS_GEN

Sum of S-Amounts

P_OplAcctgDocItemDebitSum is a Composite CDS View that provides data about "Sum of S-Amounts" in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 6 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxCode, TaxItemGroup. Part of development package GLO_FIN_IS_GEN.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem I_OperationalAcctgDocItem from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PFIOPACCTGDITDS view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AccountingDocument AccountingDocument
KEY FiscalYear FiscalYear
KEY TaxCode TaxCode
KEY TaxItemGroup TaxItemGroup
AmountInCompanyCodeCurrency
@AbapCatalog.sqlViewName: 'PFIOPACCTGDITDS'
@AbapCatalog.preserveKey:true 
@VDM.viewType: #COMPOSITE
@VDM.private: true
//@Analytics: { dataCategory: #DIMENSION }

@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Operational Acc. Doc. It. - Debit Sum'

@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_OplAcctgDocItemDebitSum as 
select from I_OperationalAcctgDocItem 
{
  key CompanyCode,
  key AccountingDocument,
  key FiscalYear,
  key TaxCode,
  key TaxItemGroup,
  sum(AmountInCompanyCodeCurrency) as AmountInCompanyCodeCurrency
}
where 
  AccountingDocumentItemType <> 'T' and
  (FinancialAccountType = 'S' or FinancialAccountType = 'A') and 
  ((DebitCreditCode = 'S' and IsNegativePosting = '') or (DebitCreditCode = 'H' and IsNegativePosting = 'X')) //DebitCreditCode(=shkzg_calc) changed in P_BSEG_COM1 in case XNEGP=X

group by CompanyCode, AccountingDocument, FiscalYear, TaxCode, TaxItemGroup