P_BG_SAFTSupplier

DDL: P_BG_SAFTSUPPLIER Type: view_entity CONSUMPTION Package: GLO_FIN_IS_SAFT_BG

Supplier Data for BG SAFT

P_BG_SAFTSupplier is a Consumption CDS View that provides data about "Supplier Data for BG SAFT" in SAP S/4HANA. It reads from 6 data sources and exposes 40 fields with key fields SourceLedger, Ledger, CompanyCode, Supplier, TaxID5. Part of development package GLO_FIN_IS_SAFT_BG.

Data Sources (6)

SourceAliasJoin Type
P_BG_SAFTOneTimeSupplier ots inner
P_BG_SAFTSuplrAcctBal P_BG_SAFTSuplrAcctBal inner
P_BG_SAFTSuplrAcctBal P_BG_SAFTSuplrAcctBal inner
I_Supplier Supplier inner
P_BG_SAFTSUPPLIERID SupplierTaxType from
P_BG_SAFTSUPPLIERID SupplierTaxType union_all

Parameters (4)

NameTypeDefault
P_FromPostingDate dats
P_ToPostingDate dats
P_FiscalYear gjahr
P_AlternativeGLAccountIsUsed saft_bg_alt_gl_account_flag

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
VDM.private true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger Balance SourceLedger Source Ledger
KEY Ledger Balance Ledger Ledger
KEY CompanyCode Balance CompanyCode Receiver Company Code
KEY Supplier
KEY TaxID5 P_BG_SAFTSUPPLIERID BPTaxLongNumber VAT Registration No.
KEY BG_SAFTStandardAccount
GLAccount Balance GLAccount General Ledger
BusinessPartner
SupplierName I_Supplier BusinessPartnerName1 Supplier Name
CountryISOCode
Region Address Region Venue Region
PostalCode Address PostalCode Postal Code
CityName Address CityName Name
StreetName Address StreetName Text
HouseNumber Address HouseNumber House Number
Building Address Building Building code
StartingBalanceAmtInRptgCrcy
EndingBalanceAmtInRptgCrcy
P_FromPostingDate
P_ToPostingDate
P_FiscalYear
SourceLedger Source Ledger
KEY Ledger Balance Ledger Ledger
KEY CompanyCode Balance CompanyCode Receiver Company Code
KEY Supplier
KEY TaxID5 P_BG_SAFTOneTimeSupplier VATRegistration VAT Registration No.
KEY BG_SAFTStandardAccount
GLAccount Balance GLAccount General Ledger
BusinessPartner
SupplierName P_BG_SAFTOneTimeSupplier SupplierName Supplier Name
CountryISOCode P_BG_SAFTOneTimeSupplier CountryISOCode
Region P_BG_SAFTOneTimeSupplier Region Venue Region
PostalCode P_BG_SAFTOneTimeSupplier PostalCode Postal Code
CityName P_BG_SAFTOneTimeSupplier CityName Name
StreetName P_BG_SAFTOneTimeSupplier StreetName Text
HouseNumber House Number
Building Building code
StartingBalanceAmtInRptgCrcy
EndingBalanceAmtInRptgCrcy
ReportingCurrency Balance ReportingCurrency Currency

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_BG_SAFTSupplier.
-- 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.
-- Parameters: P_FromPostingDate : dats, P_ToPostingDate : dats, P_FiscalYear : gjahr, P_AlternativeGLAccountIsUsed : saft_bg_alt_gl_account_flag

CREATE VIEW P_BG_SAFTSupplier AS
SELECT
  Balance.SourceLedger AS SourceLedger,
  Balance.Ledger AS Ledger,
  Balance.CompanyCode AS CompanyCode,
  max(Balance.Supplier) AS Supplier,
  SupplierTaxType.BPTaxLongNumber AS TaxID5,
  coalesce(Account.BG_SAFTStandardAccount, Balance.ActiveGLAccount) AS BG_SAFTStandardAccount,
  Balance.GLAccount AS GLAccount,
  max(Supplier._SupplierToBusinessPartner._BusinessPartner.BusinessPartner) AS BusinessPartner,
  Supplier.BusinessPartnerName1 AS SupplierName,
  cast( Address._Country.CountryISOCode as land1 ) AS CountryISOCode,
  Address.Region AS Region,
  Address.PostalCode AS PostalCode,
  Address.CityName AS CityName,
  Address.StreetName AS StreetName,
  Address.HouseNumber AS HouseNumber,
  Address.Building AS Building,
  sum(Balance.StartingBalanceAmtInRptgCrcy) AS StartingBalanceAmtInRptgCrcy,
  sum(Balance.EndingBalanceAmtInRptgCrcy) AS EndingBalanceAmtInRptgCrcy,
  Balance.ReportingCurrency AS P_FromPostingDate,
  P_ToPostingDate: $parameters.P_ToPostingDate AS P_ToPostingDate,
  P_FiscalYear: $parameters.P_FiscalYear AS P_FiscalYear,
  Balance.ReportingCurrency AS ReportingCurrency
FROM P_BG_SAFTSUPPLIERID AS SupplierTaxType
INNER JOIN P_BG_SAFTSuplrAcctBal ON /* join condition not captured in parsed metadata */
INNER JOIN I_Supplier AS Supplier ON /* join condition not captured in parsed metadata */
INNER JOIN P_BG_SAFTOneTimeSupplier AS ots ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_BG_SAFTSUPPLIERID
;