P_CO_DIANStRpRevnOffsetAccount

DDL: P_CO_DIANSTRPREVNOFFSETACCOUNT Type: view CONSUMPTION

Format 1007 - Revenue Offsetting Account

P_CO_DIANStRpRevnOffsetAccount is a Consumption CDS View that provides data about "Format 1007 - Revenue Offsetting Account" in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 11 fields with key fields CO_DIANReportFormat, CompanyCode, FiscalYear, AccountingDocument.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem AccountingDocumentItem from

Parameters (2)

NameTypeDefault
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to

Annotations (12)

NameValueLevelField
AbapCatalog.buffering.status #NOT_ALLOWED view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PCOSTRPRVNOFFACC view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Format 1007 - Revenue Offsetting Account view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.sizeCategory #L view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY CO_DIANReportFormat
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode
KEY FiscalYear
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument
OffsettingAccountType
OffsettingAccountasOffsettingAccount
CustomerasCustomer
Supplier
_CompanyCode I_OperationalAcctgDocItem _CompanyCode
_FiscalYear I_OperationalAcctgDocItem _FiscalYear
_JournalEntry I_OperationalAcctgDocItem _JournalEntry
@AbapCatalog: {
  buffering.status: #NOT_ALLOWED,
  compiler.compareFilter: true,
  preserveKey: true,
  sqlViewName: 'PCOSTRPRVNOFFACC'
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Format 1007 - Revenue Offsetting Account'
@ObjectModel: {
  usageType.dataClass: #MIXED,
  usageType.serviceQuality: #P,
  usageType.sizeCategory: #L
}
@VDM: {
  viewType: #CONSUMPTION,
  private: true
}
define view P_CO_DIANStRpRevnOffsetAccount
  with parameters
    P_FromPostingDate : fis_budat_from,
    P_ToPostingDate   : fis_budat_to

  as select from I_OperationalAcctgDocItem as AccountingDocumentItem

{
  key cast( '1007' as ficodian_report_format )                                       as CO_DIANReportFormat,
  key AccountingDocumentItem.CompanyCode                                             as CompanyCode,
  key cast( AccountingDocumentItem.FiscalYear as fis_gjahr_no_conv preserving type ) as FiscalYear,
  key AccountingDocumentItem.AccountingDocument                                      as AccountingDocument,
      min( AccountingDocumentItem.OffsettingAccountType )                            as OffsettingAccountType, -- Partner Type
      min( AccountingDocumentItem.OffsettingAccount )                                as OffsettingAccount,     -- BP Account
      min( AccountingDocumentItem.Customer)                                          as Customer,
      min( AccountingDocumentItem.Supplier)                                          as Supplier,
      AccountingDocumentItem._CompanyCode                                            as _CompanyCode,
      AccountingDocumentItem._FiscalYear                                             as _FiscalYear,
      AccountingDocumentItem._JournalEntry                                           as _JournalEntry
}
where
           AccountingDocumentItem.PostingDate           between $parameters.P_FromPostingDate and $parameters.P_ToPostingDate
  and(
    (
      (
           AccountingDocumentItem.OffsettingAccountType = 'D' -- Customer
        or AccountingDocumentItem.OffsettingAccountType = 'K' -- Vendor
      )
      and  AccountingDocumentItem.FinancialAccountType  = 'S' -- G/L Account
    )
    or(
           AccountingDocumentItem.FinancialAccountType  = 'K' -- Customer
      or   AccountingDocumentItem.FinancialAccountType  = 'D' -- Vendor
    )
  )
group by
  AccountingDocumentItem.CompanyCode,
  AccountingDocumentItem.FiscalYear,
  AccountingDocumentItem.AccountingDocument,
  AccountingDocumentItem.ChartOfAccounts,
  AccountingDocumentItem.GLAccount,
  AccountingDocumentItem.OffsettingAccountType
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_FISCALYEARFORCOMPANYCODE",
"I_JOURNALENTRY"
],
"BASE":
[
"I_OPERATIONALACCTGDOCITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/