I_LU_SAFTJOURNALENTRY
SAFT LU General Ledger Documents
I_LU_SAFTJOURNALENTRY is a CDS View in S/4HANA. SAFT LU General Ledger Documents. It contains 33 fields. 12 CDS views read from this table.
CDS Views using this table (12)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_LU_SAFTGenLedgerLine | view | from | CONSUMPTION | SAFT LU General Ledger Lines |
| I_LU_SAFTJournalItemBP | view | from | COMPOSITE | SAFT LU Document Business Partner |
| I_LU_SAFTJournalItemBP | view | union | COMPOSITE | SAFT LU Document Business Partner |
| P_LU_SAFTDPZeroTaxLine | view | from | COMPOSITE | |
| P_LU_SAFTGeneralLedgerTDT | view | from | COMPOSITE | |
| P_LU_SAFTGLOneTimeBP | view | from | COMPOSITE | |
| P_LU_SAFTGLOneTimeBP | view | union | COMPOSITE | |
| P_LU_SAFTJournalItemBP | view | from | COMPOSITE | |
| P_LU_SAFTJournalItemBP | view | union | COMPOSITE | |
| P_LU_SAFTJournalItemTaxAbs | view | from | COMPOSITE | |
| P_LU_SAFTTaxRatioCalculation | view | from | COMPOSITE | |
| P_LU_SAFTZeroTaxLine | view | from | COMPOSITE |
Fields (33)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | AccountingDocument | AccountingDocument | 9 |
| KEY | CompanyCode | CompanyCode | 9 |
| KEY | FiscalYear | FiscalYear | 9 |
| KEY | Ledger | Ledger | 9 |
| KEY | LedgerGLLineItem | LedgerGLLineItem | 7 |
| _CompanyCode | _CompanyCode | 4 | |
| _CompanyCodeCurrency | _CompanyCodeCurrency | 3 | |
| _FiscalYear | _FiscalYear | 4 | |
| _Ledger | _Ledger | 4 | |
| AccountingDocumentCategory | AccountingDocumentCategory | 1 | |
| AccountingDocumentItem | AccountingDocumentItem | 3 | |
| AccountingDocumentItemType | AccountingDocumentItemType | 5 | |
| AccountingDocumentType | AccountingDocumentType | 4 | |
| AlternativeGLAccount | AlternativeGLAccount | 4 | |
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | 2 | |
| ChartOfAccounts | ChartOfAccounts | 3 | |
| CompanyCodeCountry | CompanyCodeCountry | 1 | |
| CompanyCodeCurrency | CompanyCodeCurrency | 5 | |
| Customer | Customer | 1 | |
| DebitCreditCode | DebitCreditCode | 2 | |
| DelivOfGoodsDestCountry | DelivOfGoodsDestCountry | 1 | |
| DocumentItemText | DocumentItemText | 4 | |
| ExchangeRate | ExchangeRate | 2 | |
| FinancialAccountType | FinancialAccountType | 5 | |
| GLAccount | GLAccount | 3 | |
| IsReversal | IsReversal | 2 | |
| PostingDate | PostingDate | 8 | |
| SpecialGLCode | SpecialGLCode | 1 | |
| Supplier | Supplier | 1 | |
| TaxCalculationProcedure | TaxCalculationProcedure | 2 | |
| TaxCode | TaxCode | 4 | |
| TransactionCurrency | TransactionCurrency | 3 | |
| TransactionTypeDetermination | TransactionTypeDetermination | 1 |
@AbapCatalog.sqlViewName: 'ILUSAFTGLENTRY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AbapCatalog.dataMaintenance: #RESTRICTED
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType. sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'SAFT LU General Ledger Documents'
define view I_LU_SAFTJournalEntry
as select from I_JournalEntry as JournalEntry
inner join I_JournalEntryItem as JournalItem on JournalItem.CompanyCode = JournalEntry.CompanyCode
and JournalItem.FiscalYear = JournalEntry.FiscalYear
and JournalItem.AccountingDocument = JournalEntry.AccountingDocument
inner join I_GLAccountInCompanyCode as GLAccount on GLAccount.GLAccount = JournalItem.GLAccount
and GLAccount.CompanyCode = JournalItem.CompanyCode
inner join I_LU_SAFTGenericSettings as GenSettings on GenSettings.CompanyCode = JournalItem.CompanyCode
and GenSettings.FiscalYearFrom <= JournalItem.FiscalYear
and GenSettings.FiscalYearTo >= JournalItem.FiscalYear
and GenSettings.Ledger = JournalItem.Ledger
left outer to one join I_OperationalAcctgDocItem as AcctgDoc on AcctgDoc.CompanyCode = JournalItem.CompanyCode
and AcctgDoc.AccountingDocument = JournalItem.AccountingDocument
and AcctgDoc.AccountingDocumentItem = JournalItem.AccountingDocumentItem
and AcctgDoc.FiscalYear = JournalItem.FiscalYear
inner join I_CompanyCode as CompanyCode on CompanyCode.CompanyCode = JournalItem.CompanyCode
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key JournalEntry.CompanyCode,
@ObjectModel.foreignKey.association: '_FiscalYear'
key JournalEntry.FiscalYear,
key JournalEntry.AccountingDocument,
@ObjectModel.foreignKey.association: '_Ledger'
key JournalItem.Ledger,
key JournalItem.LedgerGLLineItem,
JournalItem.AccountingDocumentItem,
cast(concat(JournalEntry.CompanyCode, concat ('_', JournalEntry.AccountingDocument)) as abap.char(70)) as DocumentTransaction,
@ObjectModel.foreignKey.association: '_AccountingDocumentType'
JournalEntry.AccountingDocumentType,
JournalEntry.DocumentDate,
JournalEntry.PostingDate,
@ObjectModel.foreignKey.association: '_FiscalPeriod'
JournalEntry.FiscalPeriod,
JournalEntry.AccountingDocumentCategory,
JournalEntry.AccountingDocCreatedByUser,
JournalEntry.AccountingDocumentCreationDate,
cast(abs(JournalEntry.AbsoluteExchangeRate) as fis_absolute_exchangerate preserving type) as ExchangeRate,
JournalItem.Customer,
JournalItem.Supplier,
// MOVED to Key Field
// JournalItem.LedgerGLLineItem,
JournalItem.FinancialAccountType,
JournalItem.ChartOfAccounts,
JournalItem.GLAccount,
JournalItem.SpecialGLCode,
JournalItem.TaxCode,
CompanyCode._Country.TaxCalculationProcedure,
JournalItem.DocumentItemText,
JournalItem.DebitCreditCode,
JournalItem.IsReversal,
JournalItem.Quantity,
@ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
@Semantics.currencyCode:true
JournalItem.CompanyCodeCurrency,
@ObjectModel.foreignKey.association: '_TransactionCurrency'
@Semantics.currencyCode:true
JournalItem.TransactionCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
JournalItem.AmountInCompanyCodeCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
JournalItem.AmountInTransactionCurrency,
//why T? It only be T whenever there are not BSEG docs meaning that is not relevant for tax calculation.
coalesce(AcctgDoc.AccountingDocumentItemType, 'T') as AccountingDocumentItemType,
coalesce(AcctgDoc.VATRegistration, '') as VATRegistration,
CompanyCode.Country as CompanyCodeCountry,
cast(case
when AcctgDoc.VATRegistration is not initial
and AcctgDoc.VATRegistration is not null
then substring ( AcctgDoc.VATRegistration, 1, 2 )
else ''
end as abap.char(3)) as DelivOfGoodsDestCountry,
JournalItem.TransactionTypeDetermination,
GLAccount.AlternativeGLAccount,
AcctgDoc.TaxRateValidityStartDate,
JournalItem.LedgerFiscalYear,
JournalItem.FiscalPeriod as LedgerFiscalPeriod,
JournalEntry._CompanyCode,
JournalEntry._FiscalYear,
JournalEntry._AccountingDocumentType,
JournalEntry._FiscalPeriod,
JournalEntry._AccountingDocumentCategory,
JournalEntry._AccountingDocumentTypeText,
JournalItem._Ledger,
JournalItem._ChartOfAccounts,
JournalItem._DebitCreditCode,
JournalItem._CompanyCodeCurrency,
JournalItem._TransactionCurrency,
JournalItem._Supplier,
JournalItem._Customer
}
where
(
JournalItem.AccountingDocumentCategory = ''
or JournalItem.AccountingDocumentCategory = 'J'
or JournalItem.AccountingDocumentCategory = 'U'
or JournalItem.AccountingDocumentCategory = 'L'
)
and JournalEntry.GLBusinessTransactionGroup <> '1'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_COUNTRY",
"I_GLACCOUNTINCOMPANYCODE",
"I_JOURNALENTRY",
"I_JOURNALENTRYITEM",
"I_LU_SAFTGENERICSETTINGS",
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTCATEGORY",
"I_ACCOUNTINGDOCUMENTTYPE",
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_CHARTOFACCOUNTS",
"I_COMPANYCODE",
"I_CURRENCY",
"I_CUSTOMER",
"I_DEBITCREDITCODE",
"I_FISCALYEARFORCOMPANYCODE",
"I_FISCALYEARPERIODFORCMPNYCODE",
"I_LEDGER",
"I_SUPPLIER"
],
"BASE":
[
"I_JOURNALENTRY",
"I_JOURNALENTRYITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/