P_LU_SAFTJournal

DDL: P_LU_SAFTJOURNAL SQL: PLUSAFTJOURNAL Type: view COMPOSITE

P_LU_SAFTJournal is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_LU_SAFTGenericSettings, I_JournalEntry) and exposes 5 fields with key fields CompanyCode, JournalEntryType.

Data Sources (2)

SourceAliasJoin Type
I_LU_SAFTGenericSettings GenSettings inner
I_JournalEntry JournalEntry from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PLUSAFTJOURNAL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_JournalEntry CompanyCode
KEY JournalEntryType I_JournalEntry AccountingDocumentType
PostingDate PostingDate
_CompanyCode _CompanyCode
_AccountingDocumentType _AccountingDocumentType
@AbapCatalog.sqlViewName: 'PLUSAFTJOURNAL'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking : #NOT_REQUIRED
define view P_LU_SAFTJournal 
  as select from I_JournalEntry           as JournalEntry
    inner join   I_LU_SAFTGenericSettings as GenSettings on  GenSettings.CompanyCode    =  JournalEntry.CompanyCode
                                                         and GenSettings.FiscalYearFrom <= JournalEntry.FiscalYear
                                                         and GenSettings.FiscalYearTo   >= JournalEntry.FiscalYear
{

      @ObjectModel.foreignKey.association: '_CompanyCode'
  key JournalEntry.CompanyCode,

      @ObjectModel.foreignKey.association: '_AccountingDocumentType'
  key JournalEntry.AccountingDocumentType                                                                                        as JournalEntryType,
      coalesce(JournalEntry._AccountingDocumentTypeText[1: Language = 'F'].AccountingDocumentTypeName,
      coalesce(JournalEntry._AccountingDocumentTypeText[1: Language = 'E'].AccountingDocumentTypeName,
      coalesce(JournalEntry._AccountingDocumentTypeText[1: Language = $session.system_language].AccountingDocumentTypeName,''))) as JournalDescription,

      PostingDate,
      _CompanyCode,
      _AccountingDocumentType

}

where
  (
       JournalEntry.AccountingDocumentCategory =  ''
    or JournalEntry.AccountingDocumentCategory =  'J'
    or JournalEntry.AccountingDocumentCategory =  'U'
    or JournalEntry.AccountingDocumentCategory =  'L'
  )
  and  JournalEntry.GLBusinessTransactionGroup <> '1'
  and  JournalEntry._JournalEntryItem[1: AccountingDocumentItem = '001'].SpecialGLCode <> 'F'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_JOURNALENTRY",
"I_JOURNALENTRYITEM",
"I_LU_SAFTGENERICSETTINGS"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_COMPANYCODE"
],
"BASE":
[
"I_JOURNALENTRY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/