P_SA_CompanyCode_Address
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 12 fields with key field CompanyCode.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | I_CompanyCode | from |
| I_CountryText | I_CountryText | inner |
| I_OrganizationAddress | I_OrganizationAddress | inner |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| 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 (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| CompanyCodeName | CompanyCodeName | Company Name | ||
| VATRegistration | VATRegistration | VAT Registration No. | ||
| 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 |
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.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
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 */
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA