I_PH_SuplrCustJournalCube

DDL: I_PH_SUPLRCUSTJOURNALCUBE SQL: IPHSCJRNLCUBE Type: view COMPOSITE Package: GLO_FIN_IS_PH

PH CAS Supplier Customer Journal Cube

I_PH_SuplrCustJournalCube is a Composite CDS View (Cube) that provides data about "PH CAS Supplier Customer Journal Cube" in SAP S/4HANA. It reads from 6 data sources and exposes 21 fields with key fields CompanyCode, AccountingDocument, FiscalYear, Supplier, Customer. Part of development package GLO_FIN_IS_PH.

Data Sources (6)

SourceAliasJoin Type
I_AccountingDocument AccountingDocument left_outer
I_Customer Customer left_outer
P_PH_SuplrCustJournalAmount P_PH_SuplrCustJournalAmount from
P_PH_SuplrCustJrnlTaxAmount PH_BSET_GLO left_outer
I_Supplier Supplier left_outer
P_PH_JrnlWhldgTaxAmount WhldgTaxItem left_outer

Parameters (2)

NameTypeDefault
P_CompanyCode fis_bukrs
P_FinancialAccountType koart

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IPHSCJRNLCUBE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label PH CAS Supplier Customer Journal Cube view
Metadata.allowExtensions true view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode SuplrCustJournalAmount CompanyCode Receiver Company Code
KEY AccountingDocument SuplrCustJournalAmount AccountingDocument Journal Entry
KEY FiscalYear SuplrCustJournalAmount FiscalYear G/L Fiscal Year
KEY Supplier SuplrCustJournalAmount Creditor Supplier
KEY Customer SuplrCustJournalAmount Debtor Debtor
FiscalPeriod SuplrCustJournalAmount FiscalPeriod Tax period
BPCustomerNameendasBusinessPartnerName
PostalCodeasfiph_addrendasAddressID
TaxNumber1endendasVATRegistration
AccountingDocumentType SuplrCustJournalAmount AccountingDocumentType Journal Entry Type
DocumentDate SuplrCustJournalAmount DocumentDate Journal Entry Date
PostingDate SuplrCustJournalAmount PostingDate Posting Date for GR
FinancialAccountType SuplrCustJournalAmount FinancialAccountType Fin. Account Type
OriginalReferenceDocument
TaxCode P_PH_SuplrCustJrnlTaxAmount TaxCode Tax Code
TaxRate P_PH_SuplrCustJrnlTaxAmount TaxRate Tax Rate
TaxRateValidityStartDate P_PH_SuplrCustJrnlTaxAmount TaxRateValidityStartDate Tax Rate Validity Start Date
CompanyCodeCurrency SuplrCustJournalAmount CompanyCodeCurrency Local Currency
TransactionCurrency SuplrCustJournalAmount TransactionCurrency Transaction Currency
BusinessPlace SuplrCustJournalAmount BusinessPlace Business place
CountryCurrencyendasCountryCurrency

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_PH_SuplrCustJournalCube.
-- 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: IPHSCJRNLCUBE
-- Parameters: P_CompanyCode : fis_bukrs, P_FinancialAccountType : koart

CREATE VIEW I_PH_SuplrCustJournalCube AS
SELECT
  SuplrCustJournalAmount.CompanyCode AS CompanyCode,
  SuplrCustJournalAmount.AccountingDocument AS AccountingDocument,
  SuplrCustJournalAmount.FiscalYear AS FiscalYear,
  SuplrCustJournalAmount.Creditor AS Supplier,
  SuplrCustJournalAmount.Debtor AS Customer,
  SuplrCustJournalAmount.FiscalPeriod AS FiscalPeriod,
  case when SuplrCustJournalAmount.Creditor != '' then coalesce(concat_with_space(concat_with_space(concat_with_space(OneTimeAccountBP.OneTimeAccountBPSalutationText ,OneTimeAccountBP.BusinessPartnerName1 , 1) , OneTimeAccountBP.BusinessPartnerName2 , 1) , OneTimeAccountBP.BusinessPartnerName3 , 1) ,Supplier.BPSupplierName ) else coalesce(concat_with_space(concat_with_space(concat_with_space(OneTimeAccountBP.OneTimeAccountBPSalutationText ,OneTimeAccountBP.BusinessPartnerName1 , 1) , OneTimeAccountBP.BusinessPartnerName2 , 1) , OneTimeAccountBP.BusinessPartnerName3 , 1) ,Customer.BPCustomerName ) end as BusinessPartnerName AS BPCustomerNameendasBusinessPartnerName,
  case when SuplrCustJournalAmount.Creditor != '' then cast(coalesce(concat(concat(concat(concat(OneTimeAccountBP.StreetAddressName, ','), concat(OneTimeAccountBP.CityName, ',')), concat(OneTimeAccountBP.Country, ',')), OneTimeAccountBP.PostalCode), concat(concat(concat(concat(concat_with_space(concat_with_space(concat_with_space(concat_with_space(concat_with_space(Supplier._AddressRepresentation.HouseNumber, Supplier._AddressRepresentation.StreetPrefixName1, 1), Supplier._AddressRepresentation.StreetPrefixName2, 1), Supplier._AddressRepresentation.StreetName, 1), Supplier._AddressRepresentation.StreetSuffixName1, 1), Supplier._AddressRepresentation.StreetSuffixName2, 1), ','), concat(Supplier._AddressRepresentation.CityName, ',')), concat(Supplier._AddressRepresentation.Country, ',')),Supplier._AddressRepresentation.PostalCode)) as fiph_addr) else cast(coalesce(concat(concat(concat(concat(OneTimeAccountBP.StreetAddressName, ','), concat(OneTimeAccountBP.CityName, ',')), concat(OneTimeAccountBP.Country, ',')), OneTimeAccountBP.PostalCode), concat(concat(concat(concat(concat_with_space(concat_with_space(concat_with_space(concat_with_space(concat_with_space(Customer._AddressRepresentation.HouseNumber, Customer._AddressRepresentation.StreetPrefixName1, 1), Customer._AddressRepresentation.StreetPrefixName2, 1), Customer._AddressRepresentation.StreetName, 1), Customer._AddressRepresentation.StreetSuffixName1, 1), Customer._AddressRepresentation.StreetSuffixName2, 1), ','), concat(Customer._AddressRepresentation.CityName, ',')), concat(Customer._AddressRepresentation.Country, ',')),Customer._AddressRepresentation.PostalCode)) as fiph_addr) end as AddressID AS PostalCodeasfiph_addrendasAddressID,
  case when SuplrCustJournalAmount.Creditor != '' then case when OneTimeAccountBP.TaxID3 != '' or Supplier.TaxNumber3 !='' then coalesce(OneTimeAccountBP.TaxID3, Supplier.TaxNumber3) else coalesce(OneTimeAccountBP.TaxID1, Supplier.TaxNumber1) end else case when OneTimeAccountBP.TaxID3 != '' or Customer.TaxNumber3 !='' then coalesce(OneTimeAccountBP.TaxID3, Customer.TaxNumber3) else coalesce(OneTimeAccountBP.TaxID1, Customer.TaxNumber1) end end as VATRegistration AS TaxNumber1endendasVATRegistration,
  SuplrCustJournalAmount.AccountingDocumentType AS AccountingDocumentType,
  SuplrCustJournalAmount.DocumentDate AS DocumentDate,
  SuplrCustJournalAmount.PostingDate AS PostingDate,
  SuplrCustJournalAmount.FinancialAccountType AS FinancialAccountType,
  left(AccountingDocument.OriginalReferenceDocument,10) AS OriginalReferenceDocument,
  PH_BSET_GLO.TaxCode AS TaxCode,
  PH_BSET_GLO.TaxRate AS TaxRate,
  PH_BSET_GLO.TaxRateValidityStartDate AS TaxRateValidityStartDate,
  SuplrCustJournalAmount.CompanyCodeCurrency AS CompanyCodeCurrency,
  SuplrCustJournalAmount.TransactionCurrency AS TransactionCurrency,
  SuplrCustJournalAmount.BusinessPlace AS BusinessPlace,
  case when PH_BSET_GLO.CountryCurrency is null then SuplrCustJournalAmount.CompanyCodeCurrency else PH_BSET_GLO.CountryCurrency end as CountryCurrency AS CountryCurrencyendasCountryCurrency
FROM P_PH_SuplrCustJournalAmount
LEFT OUTER JOIN I_Supplier AS Supplier ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Customer AS Customer ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_AccountingDocument AS AccountingDocument ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_PH_SuplrCustJrnlTaxAmount AS PH_BSET_GLO ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_PH_JrnlWhldgTaxAmount AS WhldgTaxItem ON /* join condition not captured in parsed metadata */
;