P_AssgblSuplrForProcmtProd
P_AssgblSuplrForProcmtProd is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_Plant, I_PurchasingInfoRecord) and exposes 8 fields with key fields PurchasingInfoRecord, Product, Supplier. It has 1 association to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_Plant | I_Plant | left_outer |
| I_PurchasingInfoRecord | PurchasingInfoRecord | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_ActiveLogisticalProduct | _ActiveLogisticalProduct | $projection.Product = _ActiveLogisticalProduct.Product |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PASNSUPLPROCPROD | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view |
Fields (8)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingInfoRecord | PurchasingInfoRecord | ||
| KEY | Product | Material | ||
| KEY | Supplier | Supplier | ||
| SupplierName | ||||
| AvailabilityStartDate | ||||
| AvailabilityEndDate | ||||
| _ActiveLogisticalProduct | _ActiveLogisticalProduct | |||
| _Supplier | I_PurchasingInfoRecord | _Supplier |
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PASNSUPLPROCPROD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@VDM.viewType: #CONSUMPTION
@VDM.private: true
define view P_AssgblSuplrForProcmtProd
as select from I_PurchasingInfoRecord as PurchasingInfoRecord
// ensure to provide only real external supplier and no DCs; for real external supplier there is no entry in I_Plant
left outer join I_Plant on PurchasingInfoRecord.Supplier = I_Plant.PlantSupplier
association [1..1] to I_ActiveLogisticalProduct as _ActiveLogisticalProduct on $projection.Product = _ActiveLogisticalProduct.Product
{
key PurchasingInfoRecord,
key Material as Product,
key Supplier,
PurchasingInfoRecord._Supplier.SupplierName as SupplierName,
// non existing dates are transformed to valid dates that provide the maximal time range
case when AvailabilityStartDate = '00000000' then '00010101' else AvailabilityStartDate end as AvailabilityStartDate,
case when AvailabilityEndDate = '00000000' then '99991231' else AvailabilityEndDate end as AvailabilityEndDate,
/* Exposed associations */
_ActiveLogisticalProduct,
PurchasingInfoRecord._Supplier
}
where
// supplier is still in business
PurchasingInfoRecord._Supplier.IsBusinessPurposeCompleted <> 'X'
// and there is no corrresponding entry in I_Plant
and I_Plant.Plant is null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PLANT",
"I_PURCHASINGINFORECORD",
"I_SUPPLIER"
],
"ASSOCIATED":
[
"I_ACTIVELOGISTICALPRODUCT",
"I_SUPPLIER"
],
"BASE":
[
"I_PURCHASINGINFORECORD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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