@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":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_AR_DbtrCrdtrRblsPyblsTotal view