I_SAFTGeneralLedgerOneTimeBP

DDL: I_SAFTGENERALLEDGERONETIMEBP SQL: ISAFTGENLEDOTBP Type: view COMPOSITE

SAFT GLedger One Time Business Partner

I_SAFTGeneralLedgerOneTimeBP is a Composite CDS View that provides data about "SAFT GLedger One Time Business Partner" in SAP S/4HANA. It reads from 3 data sources (P_SAFT_GeneralLedgerOneTimeBP, I_JournalEntryItem, I_JournalEntryItemOneTimeData) and exposes 35 fields with key fields CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem, Ledger. It has 2 associations to related views.

Data Sources (3)

SourceAliasJoin Type
P_SAFT_GeneralLedgerOneTimeBP GenLedBP from
I_JournalEntryItem Journal inner
I_JournalEntryItemOneTimeData OneTimeBP inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_OperationalAcctgDocItem _AccdocItem Journal.CompanyCode = _AccdocItem.CompanyCode and Journal.AccountingDocument = _AccdocItem.AccountingDocument and Journal.FiscalYear = _AccdocItem.FiscalYear and Journal.AccountingDocumentItem = _AccdocItem.AccountingDocumentItem and _AccdocItem.VATRegistration <> ''
[0..1] I_Address_2 _DfltAddrRprstn OneTimeBP.AddressID = _DfltAddrRprstn.AddressID and _DfltAddrRprstn.AddressPersonID is initial and _DfltAddrRprstn.AddressRepresentationCode is initial

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName ISAFTGENLEDOTBP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey 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 SAFT GLedger One Time Business Partner view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_SAFT_GeneralLedgerOneTimeBP CompanyCode Receiver Company Code
KEY FiscalYear P_SAFT_GeneralLedgerOneTimeBP FiscalYear G/L Fiscal Year
KEY AccountingDocument P_SAFT_GeneralLedgerOneTimeBP AccountingDocument Journal Entry
KEY LedgerGLLineItem P_SAFT_GeneralLedgerOneTimeBP LedgerGLLineItem Journal Entry Item
KEY Ledger P_SAFT_GeneralLedgerOneTimeBP 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
BusinessPartnerType BusinessPartnerType Undefined range (can be used for patch levels)
BusinessPartnerNumber P_SAFT_GeneralLedgerOneTimeBP BusinessPartnerNumber
SupplierendendasBusinessPartner
Customer I_JournalEntryItem Customer Sold-to Party
Supplier I_JournalEntryItem Supplier Supplier
AccountingDocumentItem I_JournalEntryItem AccountingDocumentItem Posting View Item
AddressID I_JournalEntryItemOneTimeData AddressID Ship-to address
VATRegistrationendasVATRegistration
CompanyName
StreetAddressName I_JournalEntryItemOneTimeData StreetAddressName Street
StreetPrefixName
AdditionalStreetPrefixName
StreetSuffixName
AdditionalStreetSuffixName
HouseNumber
CityName I_JournalEntryItemOneTimeData CityName Name
PostalCode I_JournalEntryItemOneTimeData PostalCode Postal Code
Country I_JournalEntryItemOneTimeData Country Venue: Ctry/Reg
POBox I_JournalEntryItemOneTimeData POBox PO Box
POBoxPostalCode I_JournalEntryItemOneTimeData POBoxPostalCode PO Box Postal Code
Region I_JournalEntryItemOneTimeData Region Venue Region
RegionNameasRegionName
_DfltAddrRprstn _DfltAddrRprstn
_ChartOfAccounts _ChartOfAccounts
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_AccountingDocumentCategory _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_SAFTGeneralLedgerOneTimeBP.
-- 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: ISAFTGENLEDOTBP

CREATE VIEW I_SAFTGeneralLedgerOneTimeBP AS
SELECT
  GenLedBP.CompanyCode AS CompanyCode,
  GenLedBP.FiscalYear AS FiscalYear,
  GenLedBP.AccountingDocument AS AccountingDocument,
  GenLedBP.LedgerGLLineItem AS LedgerGLLineItem,
  GenLedBP.Ledger AS Ledger,
  Journal.ChartOfAccounts AS ChartOfAccounts,
  Journal.GLAccount AS GLAccount,
  Journal.AccountingDocumentCategory AS AccountingDocumentCategory,
  Journal.PostingDate AS PostingDate,
  BusinessPartnerType,
  GenLedBP.BusinessPartnerNumber AS BusinessPartnerNumber,
  case when Journal.Customer is not initial then Journal.Customer else case when Journal.Supplier is not initial then Journal.Supplier end end as BusinessPartner AS SupplierendendasBusinessPartner,
  Journal.Customer AS Customer,
  Journal.Supplier AS Supplier,
  Journal.AccountingDocumentItem AS AccountingDocumentItem,
  OneTimeBP.AddressID AS AddressID,
  case when OneTimeBP.TaxID1 is not initial then OneTimeBP.TaxID1 else _AccdocItem.VATRegistration end as VATRegistration AS VATRegistrationendasVATRegistration,
  concat( concat( OneTimeBP.BusinessPartnerName1, ' '), OneTimeBP.BusinessPartnerName2 ) AS CompanyName,
  OneTimeBP.StreetAddressName AS StreetAddressName,
  '' AS StreetPrefixName,
  '' AS AdditionalStreetPrefixName,
  '' AS StreetSuffixName,
  '' AS AdditionalStreetSuffixName,
  cast('' as abap.char(10)) AS HouseNumber,
  OneTimeBP.CityName AS CityName,
  OneTimeBP.PostalCode AS PostalCode,
  OneTimeBP.Country AS Country,
  OneTimeBP.POBox AS POBox,
  OneTimeBP.POBoxPostalCode AS POBoxPostalCode,
  OneTimeBP.Region AS Region,
  coalesce(_DfltAddrRprstn._Region._RegionText[1: Language = 'P'].RegionName, coalesce(_DfltAddrRprstn._Region._RegionText[1: Language = 'E'].RegionName, coalesce(_DfltAddrRprstn._Region._RegionText[1: Language = $session.system_language].RegionName, ''))) as RegionName AS RegionNameasRegionName
FROM P_SAFT_GeneralLedgerOneTimeBP AS GenLedBP
INNER JOIN I_JournalEntryItem AS Journal ON /* join condition not captured in parsed metadata */
INNER JOIN I_JournalEntryItemOneTimeData AS OneTimeBP ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_OperationalAcctgDocItem AS _AccdocItem ON Journal.CompanyCode = _AccdocItem.CompanyCode AND Journal.AccountingDocument = _AccdocItem.AccountingDocument AND Journal.FiscalYear = _AccdocItem.FiscalYear AND Journal.AccountingDocumentItem = _AccdocItem.AccountingDocumentItem AND _AccdocItem.VATRegistration <> ''  -- association [0..1]
LEFT OUTER JOIN I_Address_2 AS _DfltAddrRprstn ON OneTimeBP.AddressID = _DfltAddrRprstn.AddressID AND _DfltAddrRprstn.AddressPersonID is initial AND _DfltAddrRprstn.AddressRepresentationCode is initial  -- association [0..1]
;