I_SAFTGenLedgerCustomer

DDL: I_SAFTGENLEDGERCUSTOMER SQL: ISAFTGENLEDCUST Type: view COMPOSITE

SAF-T Gen Ledger Customer

I_SAFTGenLedgerCustomer is a Composite CDS View that provides data about "SAF-T Gen Ledger Customer" in SAP S/4HANA. It reads from 2 data sources (I_JournalEntryItem, P_SAFTGLMaxCustomer) and exposes 40 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntryItem a from
P_SAFTGLMaxCustomer GLMaxCustomer inner

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_SAFTCustTaxRegnNmbr _CustLand a.Customer = _CustLand.CustomerNum
[0..1] P_SAFT_CONTACTPERSON _ContactPerson a.Customer = _ContactPerson.Customer

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName ISAFTGENLEDCUST view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
EndUserText.label SAF-T Gen Ledger Customer view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger I_JournalEntryItem SourceLedger Source Ledger
KEY CompanyCode I_JournalEntryItem CompanyCode Receiver Company Code
KEY FiscalYear I_JournalEntryItem FiscalYear G/L Fiscal Year
KEY AccountingDocument I_JournalEntryItem AccountingDocument Journal Entry
KEY LedgerGLLineItem I_JournalEntryItem LedgerGLLineItem Journal Entry Item
KEY Ledger I_JournalEntryItem Ledger Ledger
ChartOfAccounts I_JournalEntryItem ChartOfAccounts Node Class
GLAccount I_JournalEntryItem GLAccount General Ledger
AccountingDocumentCategory I_JournalEntryItem AccountingDocumentCategory Journal Entry Category
PostingDate I_JournalEntryItem PostingDate Posting Date for GR
Customer I_JournalEntryItem Customer Sold-to Party
VATRegistrationendasVATRegistration
TaxNumber1
TaxNumber2
BusinessPartnerName1
BusinessPartnerName2
CityName
PostalCode
Country
IsOneTimeAccount
AddressID
CustomerNum
AuthorizationGroup
Region
ReconciliationAccount
PartnerFirstName _ContactPerson FirstName First Name
PartnerLastName _ContactPerson LastName Last Name
DelivOfGoodsDestCountry
_CustLand _CustLand
_SourceLedger I_JournalEntryItem _SourceLedger
_CustomerCompany
_CompanyCode I_JournalEntryItem _CompanyCode
_FiscalYear I_JournalEntryItem _FiscalYear
_JournalEntry I_JournalEntryItem _JournalEntry
_Ledger I_JournalEntryItem _Ledger
_AddressRepresentation
_Customer I_JournalEntryItem _Customer
_ChartOfAccounts I_JournalEntryItem _ChartOfAccounts
_GLAccountInChartOfAccounts I_JournalEntryItem _GLAccountInChartOfAccounts
_AccountingDocumentCategory I_JournalEntryItem _AccountingDocumentCategory

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 I_SAFTGenLedgerCustomer.
-- 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: ISAFTGENLEDCUST

CREATE VIEW I_SAFTGenLedgerCustomer AS
SELECT
  a.SourceLedger AS SourceLedger,
  a.CompanyCode AS CompanyCode,
  a.FiscalYear AS FiscalYear,
  a.AccountingDocument AS AccountingDocument,
  a.LedgerGLLineItem AS LedgerGLLineItem,
  a.Ledger AS Ledger,
  a.ChartOfAccounts AS ChartOfAccounts,
  a.GLAccount AS GLAccount,
  a.AccountingDocumentCategory AS AccountingDocumentCategory,
  a.PostingDate AS PostingDate,
  a.Customer AS Customer,
  case when a._JournalEntry._OperationalAcctgDocItem[ 1:FinancialAccountType = 'D' ].VATRegistration is not null then case when a._JournalEntry._OperationalAcctgDocItem[ 1:FinancialAccountType = 'D' ].VATRegistration is not initial then a._JournalEntry._OperationalAcctgDocItem[ 1:FinancialAccountType = 'D' ].VATRegistration else a._Customer.VATRegistration end else a._Customer.VATRegistration end as VATRegistration AS VATRegistrationendasVATRegistration,
  a._Customer.TaxNumber1 AS TaxNumber1,
  a._Customer.TaxNumber2 AS TaxNumber2,
  a._Customer.BusinessPartnerName1 AS BusinessPartnerName1,
  a._Customer.BusinessPartnerName2 AS BusinessPartnerName2,
  a._Customer.CityName AS CityName,
  a._Customer.PostalCode AS PostalCode,
  a._Customer.Country AS Country,
  a._Customer.IsOneTimeAccount AS IsOneTimeAccount,
  a._Customer.AddressID AS AddressID,
  a._Customer.Customer AS CustomerNum,
  a._Customer.AuthorizationGroup AS AuthorizationGroup,
  a._Customer.Region AS Region,
  a._Customer._CustomerCompany[ 1:CompanyCode = a.CompanyCode ].ReconciliationAccount AS ReconciliationAccount,
  _ContactPerson.FirstName AS PartnerFirstName,
  _ContactPerson.LastName AS PartnerLastName,
  substring ( a._JournalEntry._OperationalAcctgDocItem[ 1:FinancialAccountType = 'D' ].VATRegistration, 1, 2 ) AS DelivOfGoodsDestCountry,
  a._SourceLedger AS _SourceLedger,
  a._Customer._CustomerCompany AS _CustomerCompany,
  a._CompanyCode AS _CompanyCode,
  a._FiscalYear AS _FiscalYear,
  a._JournalEntry AS _JournalEntry,
  a._Ledger AS _Ledger,
  a._Customer._AddressRepresentation AS _AddressRepresentation,
  a._Customer AS _Customer,
  a._ChartOfAccounts AS _ChartOfAccounts,
  a._GLAccountInChartOfAccounts AS _GLAccountInChartOfAccounts,
  a._AccountingDocumentCategory AS _AccountingDocumentCategory
FROM I_JournalEntryItem AS a
INNER JOIN P_SAFTGLMaxCustomer AS GLMaxCustomer ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SAFTCustTaxRegnNmbr AS _CustLand ON a.Customer = _CustLand.CustomerNum  -- association [0..*]
LEFT OUTER JOIN P_SAFT_CONTACTPERSON AS _ContactPerson ON a.Customer = _ContactPerson.Customer  -- association [0..1]
;