P_ALTERNATEPRODLINES
P_ALTERNATEPRODLINES is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (I_ProductionVersion, I_Capacity, P_SchedProdnPlantTimeZone, I_WorkCenter) and exposes 9 fields.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_ProductionVersion | _altprodline | inner |
| I_Capacity | _Capacity | inner |
| P_SchedProdnPlantTimeZone | _timezone | inner |
| I_WorkCenter | _workcenter | inner |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PALTPRODLIN | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (9)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| WorkCenter | _prodline | ProductionLine | ||
| Plant | _prodline | Plant | ||
| Material | _prodline | Material | ||
| AlternateWorkCenter | I_ProductionVersion | ProductionLine | ||
| AlternatePlant | I_ProductionVersion | Plant | ||
| AltWorkCenterInternalID | I_WorkCenter | WorkCenterInternalID | ||
| AltWorkCenterTypeCode | I_WorkCenter | WorkCenterTypeCode | ||
| AltCapacityInternalID | I_WorkCenter | CapacityInternalID | ||
| PlantTimeZone | P_SchedProdnPlantTimeZone | PlantTimeZone |
@AbapCatalog.sqlViewName: 'PALTPRODLIN'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.private: true
@VDM.viewType: #BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_ALTERNATEPRODLINES
as select distinct from I_ProductionVersion as _prodline
inner join I_ProductionVersion as _altprodline on _altprodline.Material = _prodline.Material
and _altprodline.Plant = _prodline.Plant
inner join P_SchedProdnPlantTimeZone as _timezone on _timezone.werks = _altprodline.Plant
inner join I_WorkCenter as _workcenter on _workcenter.WorkCenter = _altprodline.ProductionLine
and _workcenter.Plant = _altprodline.Plant
inner join I_Capacity as _Capacity on _workcenter.CapacityInternalID = _Capacity.CapacityInternalID
and _Capacity.CapacityIsFinite = 'X'
// inner join plpo as _plpo on _plpo.plnty = 'N'
// and _plpo.plnnr = _altprodline.BillOfOperationsGroup
// and _plpo.werks = _altprodline.Plant
// and _plpo.arbid = _workcenter.WorkCenterInternalID
// inner join plas as _plas on _plas.plnty = _plpo.plnty
// and _plas.plnnr = _plpo.plnnr
// and _plas.plnal = _altprodline.BillOfOperationsVariant
// and _plas.plnkn = _plpo.plnkn
// and _plas.zaehl = _plpo.zaehl
{
_prodline.ProductionLine as WorkCenter,
_prodline.Plant as Plant,
_prodline.Material as Material,
_altprodline.ProductionLine as AlternateWorkCenter,
_altprodline.Plant as AlternatePlant,
_workcenter.WorkCenterInternalID as AltWorkCenterInternalID,
_workcenter.WorkCenterTypeCode as AltWorkCenterTypeCode,
_workcenter.CapacityInternalID as AltCapacityInternalID,
// _Plant._Address.AddressTimeZone as PlantTimeZone
_timezone.PlantTimeZone
}
where
_prodline.ProductionLine != ''
and _altprodline.ProductionLine != ''
// and _prodline.ProductionLine != _altprodline.ProductionLine
//@AbapCatalog.sqlViewName: 'PALTPRODLIN'
//@AbapCatalog.compiler.compareFilter: true
//@AccessControl.authorizationCheck: #CHECK
//@VDM.private: true
//@VDM.viewType: #BASIC
//define view P_ALTERNATEPRODLINES
// as select distinct from I_ProductionVersion as _prodline
// inner join I_ProductionVersion as _altprodline on _prodline.Material = _altprodline.Material
// and _prodline.Plant = _altprodline.Plant
// // and _prodline.ProductionVersion != _altprodline.ProductionVersion
//// association [1..1] to I_Plant as _Plant on _Plant.Plant = $projection.AlternatePlant
// association [1..1] to I_WorkCenter as _WorkCenter on _WorkCenter.WorkCenterTypeCode = 'A'
// and $projection.AlternateWorkCenter = _WorkCenter.WorkCenter
//
//{
// _prodline.ProductionLine as WorkCenter,
// _prodline.Plant as Plant,
// _prodline.Material as Material,
// _altprodline.ProductionLine as AlternateWorkCenter,
// _altprodline.Plant as AlternatePlant,
// _WorkCenter.WorkCenterInternalID as AltWorkCenterInternalID,
// _WorkCenter.WorkCenterTypeCode as AltWorkCenterTypeCode,
// _WorkCenter.CapacityInternalID as AltCapacityInternalID,
// _Plant._Address.AddressTimeZone as PlantTimeZone
//}
//where
// _prodline.ProductionLine != ''
// and _altprodline.ProductionLine != ''
//// and _prodline.ProductionLine != _altprodline.ProductionLine
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