P_SK_CompanyCodeTaxAbroad

DDL: P_SK_COMPANYCODETAXABROAD Type: view_entity CONSUMPTION

P_SK_CompanyCodeTaxAbroad is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (I_CompanyCode, I_CompanyCode, P_SK_TaxAbroadRegistration) and exposes 33 fields with key fields CompanyCode, ReportingCountry, ReportingCountry. It has 1 association to related views.

Data Sources (3)

SourceAliasJoin Type
I_CompanyCode CompanyCode from
I_CompanyCode CompanyCode inner
P_SK_TaxAbroadRegistration TaxAbroad union

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_Address_2 _Address _Address.AddressID = $projection.AddressID and _Address.AddressPersonID is initial and _Address.AddressRepresentationCode is initial

Annotations (4)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_CompanyCode CompanyCode Receiver Company Code
KEY ReportingCountry I_CompanyCode Country Venue: Ctry/Reg
CompanyCodeCountry I_CompanyCode Country Venue: Ctry/Reg
OrganizationName1 _Address OrganizationName1 Name
OrganizationName2 _Address OrganizationName2 Name 2
OrganizationName3 _Address OrganizationName3 Name 3
OrganizationName4 _Address OrganizationName4 Name 4
StreetName _Address StreetName Text
HouseNumber _Address HouseNumber House Number
PostalCode _Address PostalCode Postal Code
CityName _Address CityName Name
Country _Address Country Venue: Ctry/Reg
EmailAddress
VATRegistration I_CompanyCode VATRegistration VAT Registration No.
VATRegistrationCountry
VATRegistrationWithoutCountry
CompanyCode Receiver Company Code
KEY ReportingCountry P_SK_TaxAbroadRegistration Country Venue: Ctry/Reg
CompanyCodeCountry I_CompanyCode Country Venue: Ctry/Reg
OrganizationName1 Name
OrganizationName2 Name 2
OrganizationName3 Name 3
OrganizationName4 Name 4
StreetName Text
HouseNumber House Number
PostalCode Postal Code
CityName Name
Country Venue: Ctry/Reg
EmailAddress
VATRegistration P_SK_TaxAbroadRegistration VATRegistration VAT Registration No.
VATRegistrationCountry
VATRegistrationWithoutCountry
AddressID P_SK_TaxAbroadRegistration AddressID Ship-to address

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_SK_CompanyCodeTaxAbroad.
-- 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_SK_CompanyCodeTaxAbroad AS
SELECT
  CompanyCode.CompanyCode AS CompanyCode,
  CompanyCode.Country AS ReportingCountry,
  CompanyCode.Country AS CompanyCodeCountry,
  _Address.OrganizationName1 AS OrganizationName1,
  _Address.OrganizationName2 AS OrganizationName2,
  _Address.OrganizationName3 AS OrganizationName3,
  _Address.OrganizationName4 AS OrganizationName4,
  _Address.StreetName AS StreetName,
  _Address.HouseNumber AS HouseNumber,
  _Address.PostalCode AS PostalCode,
  _Address.CityName AS CityName,
  _Address.Country AS Country,
  _Address._CurrentDfltEmailAddress.EmailAddress AS EmailAddress,
  CompanyCode.VATRegistration AS VATRegistration,
  left(CompanyCode.VATRegistration, 2) AS VATRegistrationCountry,
  substring(CompanyCode.VATRegistration, 3, 18) AS VATRegistrationWithoutCountry,
  TaxAbroad.AddressID AS AddressID
FROM I_CompanyCode AS CompanyCode
INNER JOIN I_CompanyCode AS CompanyCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Address_2 AS _Address ON _Address.AddressID = AddressID AND _Address.AddressPersonID is initial AND _Address.AddressRepresentationCode is initial  -- association [0..1]
-- UNION with additional select branch(es): P_SK_TaxAbroadRegistration
;