P_SourcesOfSupply
P_SourcesOfSupply is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 86 fields with key fields Supplier, Plant, PurchasingOrganization, Material, Plant. It has 10 associations to related views.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| I_PurgInfoRecordWithOrgData | einaEine | union |
| I_PurchasingDocument | ekko | from |
| I_PurchasingDocumentItem | ekpo | inner |
| I_MPPurchasingSourceItem | eord | union |
| I_PurgQuotaArrgmt | equk | union |
| I_PurgQuotaArrgmtItem | equp | inner |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_SupplierMaster | _lfa1 | ekko.Supplier = _lfa1.Supplier |
| [1..1] | I_SupplierCompany | _lfb1 | ekko.Supplier = _lfb1.Supplier and ekko.CompanyCode = _lfb1.CompanyCode |
| [0..1] | I_MaterialText | _matText | $projection.Material = _matText.Material and _matText.Language = $session.system_language ----Extension Associations |
| [1..1] | E_PurchasingDocument | _PurchDocumentExtension | $projection.SourceDocument = _PurchDocumentExtension.PurchasingDocument |
| [1..1] | E_PurchasingDocumentItem | _PurchDocumentItemExtension | $projection.SourceDocument = _PurchDocumentItemExtension.PurchasingDocument and $projection.SourceDocumentItem = _PurchDocumentItemExtension.PurchasingDocumentItem |
| [0..1] | I_Material | _Material | _Material.Material = $projection.Material |
| [1..1] | E_PurchasingInforecord | _PurchasingInforecordExtension | $projection.SourceDocument = _PurchasingInforecordExtension.PurchasingInfoRecord |
| [1..1] | E_PurgInfoRecdOrgPlantData | _PurInfRecOrgPlanDataExtension | $projection.SourceDocument = _PurInfRecOrgPlanDataExtension.PurchasingInfoRecord and $projection.PurchasingOrganization = _PurInfRecOrgPlanDataExtension.PurchasingOrganization and $projection.SourceDocumentItem = _PurInfRecOrgPlanDataExtension.PurchasingInfoRecordCategory and $projection.Plant = _PurInfRecOrgPlanDataExtension.Plant |
| [1..1] | E_MPPurchasingSourceItem | _MPPurchSourceItemExtension | $projection.Material = _MPPurchSourceItemExtension.Material and $projection.Plant = _MPPurchSourceItemExtension.Plant |
| [0..1] | I_Material | _mat | $projection.Material = _mat.Material |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSOS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientDependent | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view |
Fields (86)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Supplier | I_PurchasingDocument | Supplier | Supplier |
| KEY | Plant | I_PurchasingDocumentItem | Plant | Valuation Area |
| KEY | PurchasingOrganization | I_PurchasingDocument | PurchasingOrganization | Purchasing Organization |
| KEY | Material | I_PurchasingDocumentItem | Material | Vehicle Model |
| ManufacturerMaterial | I_PurchasingDocumentItem | ManufacturerMaterial | MPN: Material | |
| MaterialName | _matText | MaterialName | Material Description | |
| MaterialGroup | I_PurchasingDocumentItem | MaterialGroup | Product Group | |
| SourceDocument | I_PurchasingDocument | PurchasingDocument | Quota arr. | |
| SourceDocumentItem | I_PurchasingDocumentItem | PurchasingDocumentItem | Item | |
| PurchasingGroup | I_PurchasingDocument | PurchasingGroup | Purchasing Group | |
| PurchasingDocumentType | I_PurchasingDocument | PurchasingDocumentType | RFQ Type | |
| PurchasingDocumentCategory | I_PurchasingDocumentItem | PurchasingDocumentCategory | Doc. Category | |
| PurInfoRecordCat | Infotype | |||
| QuotaInPercent | Quota in Prcent | |||
| CreationDate | I_PurchasingDocument | CreationDate | Time Stamp | |
| ValidityStartDate | I_PurchasingDocument | ValidityStartDate | Validity Start Date | |
| ValidityEndDate | I_PurchasingDocument | ValidityEndDate | ValidTo | |
| SourceOfSupplyIsFixed | 0 | |||
| SourceOfSupplyIsBlocked | 0 | |||
| QuotaArrangementIsFixed | 0 | |||
| StorageLocation | StorageLocation | StorageLocation | ||
| Supplier | Supplier | |||
| KEY | Plant | I_PurgInfoRecordWithOrgData | Plant | Valuation Area |
| KEY | PurchasingOrganization | I_PurgInfoRecordWithOrgData | PurchasingOrganization | Purchasing Organization |
| KEY | Material | I_PurgInfoRecordWithOrgData | Material | Vehicle Model |
| ManufacturerMaterial | I_PurgInfoRecordWithOrgData | Material | MPN: Material | |
| MaterialName | _matText | MaterialName | Material Description | |
| MaterialGroupendasMaterialGroup | ||||
| SourceDocument | I_PurgInfoRecordWithOrgData | PurchasingInfoRecord | Quota arr. | |
| SourceDocumentItem | Item | |||
| PurchasingGroup | I_PurgInfoRecordWithOrgData | PurchasingGroup | Purchasing Group | |
| PurchasingDocumentType | RFQ Type | |||
| PurchasingDocumentCategory | Doc. Category | |||
| PurInfoRecordCat | I_PurgInfoRecordWithOrgData | PurchasingInfoRecordCategory | Infotype | |
| QuotaInPercent | Quota in Prcent | |||
| PurchasingSourceType | ||||
| CreationDate | I_PurgInfoRecordWithOrgData | CreationDate | Time Stamp | |
| ValidityStartDate | I_PurgInfoRecordWithOrgData | AvailabilityStartDate | Validity Start Date | |
| ValidityEndDate | I_PurgInfoRecordWithOrgData | AvailabilityEndDate | ValidTo | |
| SourceOfSupplyIsFixed | 0 | |||
| SourceOfSupplyIsBlocked | 0 | |||
| QuotaArrangementIsFixed | 0 | |||
| StorageLocation | StorageLocation | |||
| Supplier | Supplier | |||
| KEY | Plant | I_MPPurchasingSourceItem | Plant | Valuation Area |
| KEY | PurchasingOrganization | I_MPPurchasingSourceItem | PurchasingOrganization | Purchasing Organization |
| KEY | Material | I_MPPurchasingSourceItem | Material | Vehicle Model |
| ManufacturerMaterial | I_MPPurchasingSourceItem | ManufacturerMaterial | MPN: Material | |
| MaterialName | _matText | MaterialName | Material Description | |
| MaterialGroup | Product Group | |||
| SourceDocument | I_MPPurchasingSourceItem | PurchaseOutlineAgreement | Quota arr. | |
| SourceDocumentItem | I_MPPurchasingSourceItem | PurchaseOutlineAgreementItem | Item | |
| PurchasingGroup | Purchasing Group | |||
| PurchasingDocumentType | RFQ Type | |||
| PurchasingDocumentCategory | Doc. Category | |||
| PurInfoRecordCat | Infotype | |||
| QuotaInPercent | Quota in Prcent | |||
| PurchasingSourceType | ||||
| CreationDate | I_MPPurchasingSourceItem | CreationDate | Time Stamp | |
| ValidityStartDate | I_MPPurchasingSourceItem | ValidityStartDate | Validity Start Date | |
| ValidityEndDate | I_MPPurchasingSourceItem | ValidityEndDate | ValidTo | |
| QuotaArrangementIsFixed | 0 | |||
| StorageLocation | StorageLocation | |||
| Supplier | Supplier | |||
| KEY | Plant | I_PurgQuotaArrgmt | Plant | Valuation Area |
| KEY | PurchasingOrganization | Purchasing Organization | ||
| KEY | Material | I_PurgQuotaArrgmt | Material | Vehicle Model |
| ManufacturerMaterial | I_PurgQuotaArrgmtItem | ManufacturerMaterial | MPN: Material | |
| MaterialName | _matText | MaterialName | Material Description | |
| MaterialGroup | _mat | MaterialGroup | Product Group | |
| SourceDocument | I_PurgQuotaArrgmt | QuotaArrangement | Quota arr. | |
| SourceDocumentItem | Item | |||
| PurchasingGroup | Purchasing Group | |||
| PurchasingDocumentType | RFQ Type | |||
| PurchasingDocumentCategory | Doc. Category | |||
| PurInfoRecordCat | Infotype | |||
| QuotaInPercent | I_PurgQuotaArrgmtItem | QuotaInPercent | Quota in Prcent | |
| PurchasingSourceType | ||||
| CreationDate | I_PurgQuotaArrgmt | CreationDate | Time Stamp | |
| ValidityStartDate | I_PurgQuotaArrgmt | ValidityStartDate | Validity Start Date | |
| ValidityEndDate | I_PurgQuotaArrgmt | ValidityEndDate | ValidTo | |
| SourceOfSupplyIsFixed | 0 | |||
| SourceOfSupplyIsBlocked | 0 | |||
| QuotaArrangementIsFixed | 1 | |||
| StorageLocation | StorageLocation | |||
| SourceListRecord |
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_SourcesOfSupply.
-- 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: PSOS
CREATE VIEW P_SourcesOfSupply AS
SELECT
ekko.Supplier AS Supplier,
ekpo.Plant AS Plant,
ekko.PurchasingOrganization AS PurchasingOrganization,
ekpo.Material AS Material,
ekpo.ManufacturerMaterial AS ManufacturerMaterial,
_matText.MaterialName AS MaterialName,
ekpo.MaterialGroup AS MaterialGroup,
ekko.PurchasingDocument AS SourceDocument,
ekpo.PurchasingDocumentItem AS SourceDocumentItem,
ekko.PurchasingGroup AS PurchasingGroup,
ekko.PurchasingDocumentType AS PurchasingDocumentType,
ekpo.PurchasingDocumentCategory AS PurchasingDocumentCategory,
cast ( '' as esokz ) AS PurInfoRecordCat,
cast( 0 as quotp) AS QuotaInPercent,
ekko.CreationDate AS CreationDate,
ekko.ValidityStartDate AS ValidityStartDate,
ekko.ValidityEndDate AS ValidityEndDate,
0 AS SourceOfSupplyIsFixed,
0 AS SourceOfSupplyIsBlocked,
0 AS QuotaArrangementIsFixed,
StorageLocation,
case when einaEine.MaterialGroup = '' then _Material.MaterialGroup else einaEine.MaterialGroup end as MaterialGroup AS MaterialGroupendasMaterialGroup,
cast('infrec' as vdm_purchasingsourcetype) AS PurchasingSourceType,
cast ( '' as dzeord) AS SourceListRecord
FROM I_PurchasingDocument AS ekko
INNER JOIN I_PurchasingDocumentItem AS ekpo ON /* join condition not captured in parsed metadata */
INNER JOIN I_PurgQuotaArrgmtItem AS equp ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SupplierMaster AS _lfa1 ON ekko.Supplier = _lfa1.Supplier -- association [1..1]
LEFT OUTER JOIN I_SupplierCompany AS _lfb1 ON ekko.Supplier = _lfb1.Supplier AND ekko.CompanyCode = _lfb1.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_MaterialText AS _matText ON Material = _matText.Material AND _matText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN E_PurchasingDocument AS _PurchDocumentExtension ON SourceDocument = _PurchDocumentExtension.PurchasingDocument -- association [1..1]
LEFT OUTER JOIN E_PurchasingDocumentItem AS _PurchDocumentItemExtension ON SourceDocument = _PurchDocumentItemExtension.PurchasingDocument AND SourceDocumentItem = _PurchDocumentItemExtension.PurchasingDocumentItem -- association [1..1]
LEFT OUTER JOIN I_Material AS _Material ON _Material.Material = Material -- association [0..1]
LEFT OUTER JOIN E_PurchasingInforecord AS _PurchasingInforecordExtension ON SourceDocument = _PurchasingInforecordExtension.PurchasingInfoRecord -- association [1..1]
LEFT OUTER JOIN E_PurgInfoRecdOrgPlantData AS _PurInfRecOrgPlanDataExtension ON SourceDocument = _PurInfRecOrgPlanDataExtension.PurchasingInfoRecord AND PurchasingOrganization = _PurInfRecOrgPlanDataExtension.PurchasingOrganization AND SourceDocumentItem = _PurInfRecOrgPlanDataExtension.PurchasingInfoRecordCategory AND Plant = _PurInfRecOrgPlanDataExtension.Plant -- association [1..1]
LEFT OUTER JOIN E_MPPurchasingSourceItem AS _MPPurchSourceItemExtension ON Material = _MPPurchSourceItemExtension.Material AND Plant = _MPPurchSourceItemExtension.Plant -- association [1..1]
LEFT OUTER JOIN I_Material AS _mat ON Material = _mat.Material -- association [0..1]
-- UNION with additional select branch(es): I_PurgInfoRecordWithOrgData, I_MPPurchasingSourceItem, I_PurgQuotaArrgmt
;
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