P_AR_DbtrCrdtrRblsPyblsTotal

DDL: P_AR_DBTRCRDTRRBLSPYBLSTOTAL SQL: PARDCRPTOT Type: view CONSUMPTION

Arg. Dbt, Crdt, Receivables and Payables

P_AR_DbtrCrdtrRblsPyblsTotal is a Consumption CDS View that provides data about "Arg. Dbt, Crdt, Receivables and Payables" in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 21 fields with key fields CompanyCode, FiscalYear, AccountingDocument, Supplier, Customer.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem I_OperationalAcctgDocItem from

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PARDCRPTOT view
VDM.private true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
EndUserText.label Arg. Dbt, Crdt, Receivables and Payables view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
KEY Supplier Supplier
KEY Customer Customer
FinancialAccountType FinancialAccountType
NetDueDate
ClearingDate
ClearingAccountingDocument
CompanyCodeCurrency CompanyCodeCurrency
AmountInCompanyCodeCurrency
TransactionCurrency TransactionCurrency
AmountInTransactionCurrency
_CompanyCode _CompanyCode
_FiscalYear _FiscalYear
_JournalEntry _JournalEntry
_CompanyCodeCurrency _CompanyCodeCurrency
_TransactionCurrency _TransactionCurrency
_FinancialAccountType _FinancialAccountType
_Supplier _Supplier
_Customer _Customer
@AbapCatalog.sqlViewName: 'PARDCRPTOT'
@VDM.private:true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #P
@EndUserText.label: 'Arg. Dbt, Crdt, Receivables and Payables'

define view P_AR_DbtrCrdtrRblsPyblsTotal
  as select from I_OperationalAcctgDocItem
{
      @ObjectModel.foreignKey.association: '_CompanyCode'
  key CompanyCode,
      @ObjectModel.foreignKey.association: '_FiscalYear'
  key FiscalYear,
      @ObjectModel.foreignKey.association: '_JournalEntry'
  key AccountingDocument,
      @ObjectModel.foreignKey.association: '_Supplier'
  key Supplier,
      @ObjectModel.foreignKey.association: '_Customer'
  key Customer,
      @ObjectModel.foreignKey.association: '_FinancialAccountType'
      FinancialAccountType,
      cast( max(NetDueDate) as farp_netdt preserving type )                as NetDueDate, 
      cast( max(ClearingDate) as fis_augdt preserving type )               as ClearingDate, //sometimes there is a line for the customer with clearing date initial and another with valid clearing date (it takes the one with valid clearing date)

      cast( max(ClearingAccountingDocument) as fis_augbl preserving type ) as ClearingAccountingDocument,
      @ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
      @Semantics.currencyCode:true
      CompanyCodeCurrency,      
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      cast( sum(AmountInCompanyCodeCurrency) as fis_hsl preserving type )  as AmountInCompanyCodeCurrency,         
      @ObjectModel.foreignKey.association: '_TransactionCurrency'   
      @Semantics.currencyCode:true
      TransactionCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      cast( sum(AmountInTransactionCurrency) as fis_wsl preserving type )  as AmountInTransactionCurrency,      
      _CompanyCode,
      _FiscalYear,
      _JournalEntry,
      _CompanyCodeCurrency,
      _TransactionCurrency,
      _FinancialAccountType,
      _Supplier,
      _Customer
}

where ( FinancialAccountType = 'D' or FinancialAccountType = 'K' )
  and IsUsedInPaymentTransaction = ''
group by
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  FinancialAccountType,
  Supplier,
  Customer,
  CompanyCodeCurrency,
  TransactionCurrency
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CURRENCY",
"I_CUSTOMER",
"I_FINANCIALACCOUNTTYPE",
"I_FISCALYEARFORCOMPANYCODE",
"I_JOURNALENTRY",
"I_SUPPLIER"
],
"BASE":
[
"I_OPERATIONALACCTGDOCITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/