C_LU_SAFTGenLedgerLine

DDL: C_LU_SAFTGENLEDGERLINE SQL: CLUSAFTGENLDGRL Type: view CONSUMPTION

SAFT LU General Ledger Lines

C_LU_SAFTGenLedgerLine is a Consumption CDS View that provides data about "SAFT LU General Ledger Lines" in SAP S/4HANA. It reads from 2 data sources (P_LU_SAFTIsAlternateAccount, I_LU_SAFTJournalEntry) and exposes 21 fields with key fields CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem, Ledger.

Data Sources (2)

SourceAliasJoin Type
P_LU_SAFTIsAlternateAccount AlternateAccount inner
I_LU_SAFTJournalEntry JournalEntryItem from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CLUSAFTGENLDGRL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label SAFT LU General Ledger Lines view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_LU_SAFTJournalEntry CompanyCode Receiver Company Code
KEY FiscalYear I_LU_SAFTJournalEntry FiscalYear G/L Fiscal Year
KEY AccountingDocument I_LU_SAFTJournalEntry AccountingDocument Journal Entry
KEY LedgerGLLineItem I_LU_SAFTJournalEntry LedgerGLLineItem Journal Entry Item
KEY Ledger I_LU_SAFTJournalEntry Ledger Ledger
AccountingDocumentItem I_LU_SAFTJournalEntry AccountingDocumentItem Posting View Item
ChartOfAccounts I_LU_SAFTJournalEntry ChartOfAccounts Node Class
PostingDate I_LU_SAFTJournalEntry PostingDate Posting Date for GR
FinancialAccountType I_LU_SAFTJournalEntry FinancialAccountType Fin. Account Type
char70asSAFTGeneralLedgerAccountID
GLAccount I_LU_SAFTJournalEntry GLAccount General Ledger
DocumentItemText I_LU_SAFTJournalEntry DocumentItemText Text
CompanyCodeCurrency I_LU_SAFTJournalEntry CompanyCodeCurrency Local Currency
TaxCodeelseendasTaxCode
Quantity
ExchangeRate I_LU_SAFTJournalEntry ExchangeRate Exchange rate
CAIsDownPaymentRequest
IsReversal I_LU_SAFTJournalEntry IsReversal Reversal doc.
AccountingDocumentItemType I_LU_SAFTJournalEntry AccountingDocumentItemType Line Item ID
AccountingDocumentType I_LU_SAFTJournalEntry AccountingDocumentType Journal Entry Type
AlternativeGLAccount I_LU_SAFTJournalEntry AlternativeGLAccount Group Account

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_LU_SAFTGenLedgerLine.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CLUSAFTGENLDGRL

CREATE VIEW C_LU_SAFTGenLedgerLine AS
SELECT
  JournalEntryItem.CompanyCode AS CompanyCode,
  JournalEntryItem.FiscalYear AS FiscalYear,
  JournalEntryItem.AccountingDocument AS AccountingDocument,
  JournalEntryItem.LedgerGLLineItem AS LedgerGLLineItem,
  JournalEntryItem.Ledger AS Ledger,
  JournalEntryItem.AccountingDocumentItem AS AccountingDocumentItem,
  JournalEntryItem.ChartOfAccounts AS ChartOfAccounts,
  JournalEntryItem.PostingDate AS PostingDate,
  JournalEntryItem.FinancialAccountType AS FinancialAccountType,
  cast(case when AlternateAccount.IsAltAcct is not initial then concat(JournalEntryItem.CompanyCode, concat('_', JournalEntryItem.AlternativeGLAccount)) else concat(JournalEntryItem.CompanyCode, concat('_', JournalEntryItem.GLAccount)) end as abap.char(70)) as SAFTGeneralLedgerAccountID AS char70asSAFTGeneralLedgerAccountID,
  JournalEntryItem.GLAccount AS GLAccount,
  JournalEntryItem.DocumentItemText AS DocumentItemText,
  JournalEntryItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  case when JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.FinancialAccountType = 'S' then JournalEntryItem.TaxCode else ' ' end as TaxCode AS TaxCodeelseendasTaxCode,
  cast( abs(round( JournalEntryItem.Quantity, 0)) as abap.int8 ) AS Quantity,
  JournalEntryItem.ExchangeRate AS ExchangeRate,
  ' ' AS CAIsDownPaymentRequest,
  JournalEntryItem.IsReversal AS IsReversal,
  JournalEntryItem.AccountingDocumentItemType AS AccountingDocumentItemType,
  JournalEntryItem.AccountingDocumentType AS AccountingDocumentType,
  JournalEntryItem.AlternativeGLAccount AS AlternativeGLAccount
FROM I_LU_SAFTJournalEntry AS JournalEntryItem
INNER JOIN P_LU_SAFTIsAlternateAccount AS AlternateAccount ON /* join condition not captured in parsed metadata */
;