P_LU_SAFTJournalItemBP

DDL: P_LU_SAFTJOURNALITEMBP SQL: PLUSAFTJIBP Type: view COMPOSITE

P_LU_SAFTJournalItemBP is a Composite CDS View in SAP S/4HANA. It reads from 9 data sources and exposes 66 fields with key fields CompanyCode, Ledger, FiscalYear, BusinessPartner, BusinessPartnerType.

Data Sources (9)

SourceAliasJoin Type
I_BusinessPartner BP inner
I_BusinessPartner BP inner
P_BPCurrentAddress BPAddress inner
P_BPCurrentAddress BPAddress inner
I_Customer Customer inner
I_LU_SAFTJournalEntry JournalLineItem from
I_LU_SAFTJournalEntry JournalLineItem union
I_Supplier Supplier inner
I_SupplierToBusinessPartner SupToBP inner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PLUSAFTJIBP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK 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 (66)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_LU_SAFTJournalEntry CompanyCode Receiver Company Code
KEY Ledger I_LU_SAFTJournalEntry Ledger Ledger
KEY FiscalYear I_LU_SAFTJournalEntry FiscalYear G/L Fiscal Year
KEY BusinessPartner I_BusinessPartner BusinessPartner Issuing Authority
KEY BusinessPartnerType
KEY AccountingDocument I_LU_SAFTJournalEntry AccountingDocument Journal Entry
KEY LedgerGLLineItem I_LU_SAFTJournalEntry LedgerGLLineItem Journal Entry Item
PostingDate I_LU_SAFTJournalEntry PostingDate Posting Date for GR
AccountingDocumentCategory I_LU_SAFTJournalEntry AccountingDocumentCategory Journal Entry Category
AccountingDocumentItem I_LU_SAFTJournalEntry AccountingDocumentItem Posting View Item
SAFTGeneralLedgerAccountID
IsOneTimeAccount I_Customer IsOneTimeAccount One-time acct
AuthorizationGroup I_Customer AuthorizationGroup AuthorizGroup
TaxNumber1 I_Customer TaxNumber1 VAT Reg. No.
TaxNumber2 I_Customer TaxNumber2 Tax Number 2
DelivOfGoodsDestCountry I_LU_SAFTJournalEntry DelivOfGoodsDestCountry Dest. C/R
GLAccount I_LU_SAFTJournalEntry GLAccount General Ledger
ChartOfAccounts I_LU_SAFTJournalEntry ChartOfAccounts Node Class
Customer I_Customer Customer Sold-to Party
Supplier Supplier
CompanyCodeCountry I_LU_SAFTJournalEntry CompanyCodeCountry Reporting Ctry/Reg.
AddressID P_BPCurrentAddress AddressID Ship-to address
BusinessPartnerName2endendasCompanyName
StreetAddressNameendendasStreetName
HouseNumberelseendasHouseNumber
CityNameendendasCityName
PostalCodeendendasPostalCode
RegionendendasRegion
CountryendendasCountry
SupplierToPartner
_CompanyCode I_LU_SAFTJournalEntry _CompanyCode
_FiscalYear I_LU_SAFTJournalEntry _FiscalYear
CompanyCodeasCompanyCode
KEY Ledger I_LU_SAFTJournalEntry Ledger Ledger
KEY FiscalYear I_LU_SAFTJournalEntry FiscalYear G/L Fiscal Year
KEY BusinessPartner I_BusinessPartner BusinessPartner Issuing Authority
KEY BusinessPartnerType
KEY AccountingDocument I_LU_SAFTJournalEntry AccountingDocument Journal Entry
KEY LedgerGLLineItem I_LU_SAFTJournalEntry LedgerGLLineItem Journal Entry Item
PostingDate I_LU_SAFTJournalEntry PostingDate Posting Date for GR
AccountingDocumentCategory I_LU_SAFTJournalEntry AccountingDocumentCategory Journal Entry Category
AccountingDocumentItem I_LU_SAFTJournalEntry AccountingDocumentItem Posting View Item
SAFTGeneralLedgerAccountID
IsOneTimeAccount I_Supplier IsOneTimeAccount One-time acct
AuthorizationGroup I_Supplier AuthorizationGroup AuthorizGroup
TaxNumber1 I_Supplier TaxNumber1 VAT Reg. No.
TaxNumber2 I_Supplier TaxNumber2 Tax Number 2
DelivOfGoodsDestCountry Dest. C/R
GLAccount I_LU_SAFTJournalEntry GLAccount General Ledger
ChartOfAccounts I_LU_SAFTJournalEntry ChartOfAccounts Node Class
Customer Sold-to Party
Supplier I_Supplier Supplier Supplier
CompanyCodeCountry I_LU_SAFTJournalEntry CompanyCodeCountry Reporting Ctry/Reg.
AddressID P_BPCurrentAddress AddressID Ship-to address
BusinessPartnerName2endendasCompanyName
StreetAddressNameendendasStreetName
HouseNumberelseendasHouseNumber
CityNameendendasCityName
PostalCodeendendasPostalCode
RegionendendasRegion
CountryendendasCountry
BusinessPartnerCustomer
char35asSupplierToPartner
_CompanyCode I_LU_SAFTJournalEntry _CompanyCode
_FiscalYear I_LU_SAFTJournalEntry _FiscalYear
_Ledger I_LU_SAFTJournalEntry _Ledger

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 P_LU_SAFTJournalItemBP.
-- 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: PLUSAFTJIBP

CREATE VIEW P_LU_SAFTJournalItemBP AS
SELECT
  JournalLineItem.CompanyCode AS CompanyCode,
  JournalLineItem.Ledger AS Ledger,
  JournalLineItem.FiscalYear AS FiscalYear,
  BP.BusinessPartner AS BusinessPartner,
  '0001' AS BusinessPartnerType,
  JournalLineItem.AccountingDocument AS AccountingDocument,
  JournalLineItem.LedgerGLLineItem AS LedgerGLLineItem,
  JournalLineItem.PostingDate AS PostingDate,
  JournalLineItem.AccountingDocumentCategory AS AccountingDocumentCategory,
  JournalLineItem.AccountingDocumentItem AS AccountingDocumentItem,
  cast(concat(JournalLineItem.CompanyCode, concat('_', JournalLineItem.GLAccount)) as abap.char(70)) AS SAFTGeneralLedgerAccountID,
  Customer.IsOneTimeAccount AS IsOneTimeAccount,
  Customer.AuthorizationGroup AS AuthorizationGroup,
  Customer.TaxNumber1 AS TaxNumber1,
  Customer.TaxNumber2 AS TaxNumber2,
  JournalLineItem.DelivOfGoodsDestCountry AS DelivOfGoodsDestCountry,
  JournalLineItem.GLAccount AS GLAccount,
  JournalLineItem.ChartOfAccounts AS ChartOfAccounts,
  Customer.Customer AS Customer,
  cast('' as abap.char(10)) AS Supplier,
  JournalLineItem.CompanyCodeCountry AS CompanyCodeCountry,
  BPAddress.AddressID AS AddressID,
  case when Customer.IsOneTimeAccount is initial then concat( concat( BPAddress.BusinessPartnerName1, ' '), BPAddress.BusinessPartnerName2 ) else case when OneTimeBP.TaxID1 is initial and JournalLineItem.VATRegistration is initial then concat( concat( BPAddress.BusinessPartnerName1, ' '), BPAddress.BusinessPartnerName2 ) else concat( concat( OneTimeBP.BusinessPartnerName1, ' '), OneTimeBP.BusinessPartnerName2 ) end end as CompanyName AS BusinessPartnerName2endendasCompanyName,
  case when Customer.IsOneTimeAccount is initial then BPAddress.StreetName else case when OneTimeBP.TaxID1 is initial and JournalLineItem.VATRegistration is initial then BPAddress.StreetName else OneTimeBP.StreetAddressName end end as StreetName AS StreetAddressNameendendasStreetName,
  case when Customer.IsOneTimeAccount is initial then BPAddress.HouseNumber else '' end as HouseNumber AS HouseNumberelseendasHouseNumber,
  case when Customer.IsOneTimeAccount is initial then BPAddress.CityName else case when OneTimeBP.TaxID1 is initial and JournalLineItem.VATRegistration is initial then BPAddress.CityName else OneTimeBP.CityName end end as CityName AS CityNameendendasCityName,
  case when Customer.IsOneTimeAccount is initial then BPAddress.PostalCode else case when OneTimeBP.TaxID1 is initial and JournalLineItem.VATRegistration is initial then BPAddress.PostalCode else OneTimeBP.PostalCode end end as PostalCode AS PostalCodeendendasPostalCode,
  case when Customer.IsOneTimeAccount is initial then BPAddress.Region else case when OneTimeBP.TaxID1 is initial and JournalLineItem.VATRegistration is initial then BPAddress.Region else OneTimeBP.Region end end as Region AS RegionendendasRegion,
  case when Customer.IsOneTimeAccount is initial then BPAddress.Country else case when OneTimeBP.TaxID1 is initial and JournalLineItem.VATRegistration is initial then BPAddress.Country else OneTimeBP.Country end end as Country AS CountryendendasCountry,
  cast('' as abap.char(45)) AS SupplierToPartner,
  JournalLineItem._CompanyCode AS _CompanyCode,
  JournalLineItem._FiscalYear AS _FiscalYear,
  JournalLineItem._Ledger AS CompanyCodeasCompanyCode,
  '' AS BusinessPartnerCustomer,
  cast(case when Supplier.IsOneTimeAccount is initial then case when JournalLineItem.DelivOfGoodsDestCountry = JournalLineItem.CompanyCodeCountry then concat(JournalLineItem.CompanyCode, concat ('_' , concat(Supplier.Supplier, concat('_', JournalLineItem.GLAccount)))) else concat(JournalLineItem.CompanyCode, concat ('_' , concat(Supplier.Supplier, concat('/' , concat(JournalLineItem.DelivOfGoodsDestCountry, concat('_', JournalLineItem.GLAccount)))))) end else case when OneTimeBP.TaxID1 is not initial then concat(JournalLineItem.CompanyCode, concat ('_' , concat(Supplier.Supplier, concat('/', OneTimeBP.TaxID1)))) else case when JournalLineItem.VATRegistration is not initial then concat(JournalLineItem.CompanyCode, concat ('_' , concat(Supplier.Supplier, concat('/', JournalLineItem.VATRegistration)))) else concat(JournalLineItem.CompanyCode, concat ('_' , concat(Supplier.Supplier, concat('/', '999999990')))) end end end as abap.char(35)) as SupplierToPartner AS char35asSupplierToPartner,
  JournalLineItem._Ledger AS _Ledger
FROM I_LU_SAFTJournalEntry AS JournalLineItem
INNER JOIN I_BusinessPartner AS BP ON /* join condition not captured in parsed metadata */
INNER JOIN P_BPCurrentAddress AS BPAddress ON /* join condition not captured in parsed metadata */
INNER JOIN I_Customer AS Customer ON /* join condition not captured in parsed metadata */
INNER JOIN I_SupplierToBusinessPartner AS SupToBP ON /* join condition not captured in parsed metadata */
INNER JOIN I_Supplier AS Supplier ON /* join condition not captured in parsed metadata */
-- UNION with additional select branch(es): I_LU_SAFTJournalEntry
;