P_SA_CompanyCode_Address

DDL: P_SA_COMPANYCODE_ADDRESS SQL: PSACOMPCODEADDRS Type: view COMPOSITE

P_SA_CompanyCode_Address is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_CompanyCode, I_CountryText, I_OrganizationAddress) and exposes 14 fields with key field CompanyCode.

Data Sources (3)

SourceAliasJoin Type
I_CompanyCode I_CompanyCode from
I_CountryText I_CountryText inner
I_OrganizationAddress I_OrganizationAddress inner

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PSACOMPCODEADDRS view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #CUSTOMIZING view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
CompanyCodeName CompanyCodeName Company Name
VATRegistration VATRegistration VAT Registration No.
AddressRepresentationCode I_OrganizationAddress AddressRepresentationCode Address Version
HouseNumber I_OrganizationAddress HouseNumber House Number
StreetName I_OrganizationAddress StreetName Text
CityName I_OrganizationAddress CityName Name
POBox I_OrganizationAddress POBox PO Box
Country I_OrganizationAddress Country Venue: Ctry/Reg
EmailAddress
PhoneNumber
CompanyName
CountryName1asCompanyCodeAddress
CountryLanguage I_CountryText Language Report Text Language

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_SA_CompanyCode_Address.
-- 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: PSACOMPCODEADDRS

CREATE VIEW P_SA_CompanyCode_Address AS
SELECT
  CompanyCode,
  CompanyCodeName,
  VATRegistration,
  I_OrganizationAddress.AddressRepresentationCode AS AddressRepresentationCode,
  I_OrganizationAddress.HouseNumber AS HouseNumber,
  I_OrganizationAddress.StreetName AS StreetName,
  I_OrganizationAddress.CityName AS CityName,
  I_OrganizationAddress.POBox AS POBox,
  I_OrganizationAddress.Country AS Country,
  I_OrganizationAddress._EmailAddress[EmailAddressIsCurrentDefault = 'X'].EmailAddress AS EmailAddress,
  I_OrganizationAddress._PhoneNumber[PhoneNumberType = '1'].PhoneAreaCodeSubscriberNumber AS PhoneNumber,
  concat_with_space(concat(CompanyCode,'-'), CompanyCodeName , 1) AS CompanyName,
  concat_with_space(concat_with_space( (concat_with_space(concat(I_OrganizationAddress.HouseNumber, ','),concat(I_OrganizationAddress.StreetName, ','),1)), (concat_with_space(concat(I_OrganizationAddress.CityName, ','), concat(I_OrganizationAddress.POBox, ','),1)), 1), I_CountryText.CountryName,1) as CompanyCodeAddress AS CountryName1asCompanyCodeAddress,
  I_CountryText.Language AS CountryLanguage
FROM I_CompanyCode
INNER JOIN I_OrganizationAddress ON /* join condition not captured in parsed metadata */
INNER JOIN I_CountryText ON /* join condition not captured in parsed metadata */
;