P_RO_SAFTAccountMapping

DDL: P_RO_SAFTACCOUNTMAPPING SQL: PROSAFTACTMAP Type: view CONSUMPTION

SAFT RO Account Mapping

P_RO_SAFTAccountMapping is a Consumption CDS View that provides data about "SAFT RO Account Mapping" in SAP S/4HANA. It reads from 4 data sources (I_RO_SAFTAccountMapping, I_RO_SAFTAccountMapping, I_GLAccountLineItemRawData, I_GLAccountLineItemRawData) and exposes 23 fields with key fields Ledger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem.

Data Sources (4)

SourceAliasJoin Type
I_RO_SAFTAccountMapping AccountMapping from
I_RO_SAFTAccountMapping AccountMapping union
I_GLAccountLineItemRawData Acdoca inner
I_GLAccountLineItemRawData Acdoca inner

Parameters (1)

NameTypeDefault
P_AlternativeGLAccountIsUsed saft_ro_alt_gl_account_flag

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PROSAFTACTMAP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label SAFT RO Account Mapping view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY Ledger I_GLAccountLineItemRawData SourceLedger
KEY CompanyCode I_GLAccountLineItemRawData CompanyCode
KEY FiscalYear I_GLAccountLineItemRawData FiscalYear
KEY AccountingDocument I_GLAccountLineItemRawData AccountingDocument
KEY LedgerGLLineItem I_GLAccountLineItemRawData LedgerGLLineItem
KEY ChartOfAccounts I_RO_SAFTAccountMapping ChartOfAccounts
KEY GLAccount I_RO_SAFTAccountMapping GLAccount
RO_SAFTStandardAccount I_RO_SAFTAccountMapping RO_SAFTStandardAccount
RO_SAFTAccountType I_RO_SAFTAccountMapping RO_SAFTAccountType
RO_SAFTAccountTypeText I_RO_SAFTAccountMapping RO_SAFTAccountTypeText
PostingDate I_GLAccountLineItemRawData PostingDate
SourceLedgerasLedger
KEY CompanyCode I_GLAccountLineItemRawData CompanyCode
KEY FiscalYear I_GLAccountLineItemRawData FiscalYear
KEY AccountingDocument I_GLAccountLineItemRawData AccountingDocument
KEY LedgerGLLineItem I_GLAccountLineItemRawData LedgerGLLineItem
KEY ChartOfAccounts I_RO_SAFTAccountMapping ChartOfAccounts
KEY GLAccount I_RO_SAFTAccountMapping GLAccount
RO_SAFTStandardAccount I_RO_SAFTAccountMapping RO_SAFTStandardAccount
RO_SAFTAccountType I_RO_SAFTAccountMapping RO_SAFTAccountType
RO_SAFTAccountTypeText I_RO_SAFTAccountMapping RO_SAFTAccountTypeText
PostingDate I_GLAccountLineItemRawData PostingDate
AccountIsMatched
@AbapCatalog.sqlViewName: 'PROSAFTACTMAP'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.viewType: #CONSUMPTION
@VDM.private:true
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'SAFT RO Account Mapping'
define view P_RO_SAFTAccountMapping
  with parameters
    P_AlternativeGLAccountIsUsed : saft_ro_alt_gl_account_flag
  as select from I_RO_SAFTAccountMapping    as AccountMapping
    inner join   I_GLAccountLineItemRawData as Acdoca on  Acdoca.ChartOfAccounts = AccountMapping.ChartOfAccounts
                                                      and Acdoca.GLAccount       = AccountMapping.GLAccount
{

  key Acdoca.SourceLedger as Ledger,
  key Acdoca.CompanyCode,
  key Acdoca.FiscalYear,
  key Acdoca.AccountingDocument,
  key Acdoca.LedgerGLLineItem,

  key AccountMapping.ChartOfAccounts,
  key AccountMapping.GLAccount,
      AccountMapping.RO_SAFTStandardAccount,
      AccountMapping.RO_SAFTAccountType,

      AccountMapping.RO_SAFTAccountTypeText,
      Acdoca.PostingDate,
      case $parameters.P_AlternativeGLAccountIsUsed
        when 'X' then ''
        else 'X'
      end                                       as AccountIsMatched

}
union select from I_RO_SAFTAccountMapping    as AccountMapping
  inner join      I_GLAccountLineItemRawData as Acdoca on  Acdoca.CountryChartOfAccounts = AccountMapping.ChartOfAccounts
                                                       and Acdoca.AlternativeGLAccount   = AccountMapping.GLAccount
{

  key Acdoca.SourceLedger as Ledger,
  key Acdoca.CompanyCode,
  key Acdoca.FiscalYear,
  key Acdoca.AccountingDocument,
  key Acdoca.LedgerGLLineItem,

  key AccountMapping.ChartOfAccounts,
  key AccountMapping.GLAccount,
      AccountMapping.RO_SAFTStandardAccount,
      AccountMapping.RO_SAFTAccountType,

      AccountMapping.RO_SAFTAccountTypeText,
      Acdoca.PostingDate,
      $parameters.P_AlternativeGLAccountIsUsed                    as AccountIsMatched
}
where Acdoca.AlternativeGLAccount <> ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTLINEITEMRAWDATA",
"I_RO_SAFTACCOUNTMAPPING"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/