P_BG_VATPartnerInfo

DDL: P_BG_VATPARTNERINFO Type: view_entity COMPOSITE Package: GLO_FIN_IS_VAT_BG

BG VAT Business Partner Info

P_BG_VATPartnerInfo is a Composite CDS View that provides data about "BG VAT Business Partner Info" in SAP S/4HANA. It reads from 1 data source (I_OperationalAcctgDocItem) and exposes 10 fields with key fields CompanyCode, FiscalYear, AccountingDocument. Part of development package GLO_FIN_IS_VAT_BG.

Data Sources (1)

SourceAliasJoin Type
I_OperationalAcctgDocItem bseg from

Annotations (7)

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

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
Customer Customer Sold-to Party
Supplier Supplier Supplier
CountryelseendasVATRegion
VATRegistration
DelivOfGoodsDestCountry I_OperationalAcctgDocItem DelivOfGoodsDestCountry Dest. C/R
_Customer _Customer
_Supplier _Supplier

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_VATPartnerInfo.
-- 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.

CREATE VIEW P_BG_VATPartnerInfo AS
SELECT
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  Customer,
  Supplier,
  case when bseg.DelivOfGoodsDestCountry is not null and bseg.DelivOfGoodsDestCountry is not initial then bseg.DelivOfGoodsDestCountry when _Customer.Country is not null and _Customer.Country is not initial then _Customer.Country when _Supplier.Country is not null and _Supplier.Country is not initial then _Supplier.Country else '' end as VATRegion AS CountryelseendasVATRegion,
  bseg.DelivOfGoodsDestCountry AS DelivOfGoodsDestCountry
FROM I_OperationalAcctgDocItem AS bseg
;