P_MfgOrderItem
P_MfgOrderItem is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (afko, afpo) and exposes 16 fields with key fields ManufacturingOrder, ManufacturingOrderItem.
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPPMFGORDITEM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #BASIC | view | |
| VDM.private | true | view |
Fields (16)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ManufacturingOrder | afpo | aufnr | |
| KEY | ManufacturingOrderItem | afpo | posnr | |
| ManufacturingOrderCategory | afpo | dauty | ||
| ManufacturingOrderType | afpo | dauat | ||
| ProductionPlant | afpo | dwerk | ||
| FactoryCalendar | _ProductionPlant | FactoryCalendar | ||
| MRPPlant | afpo | pwerk | ||
| MfgOrderPlannedStartDate | afko | gstrp | ||
| MfgOrderScheduledStartDate | afko | gstrs | ||
| MfgOrderActualStartDate | afko | gstri | ||
| MfgOrderItemPlannedEndDate | afpo | dgltp | ||
| MfgOrderItemScheduledEndDate | afpo | dglts | ||
| MfgOrderItemPlndDeliveryDate | afpo | ltrmp | ||
| MfgOrderItemActualDeliveryDate | afpo | ltrmi | ||
| MaterialGoodsReceiptDuration | afpo | webaz | ||
| _ProductionPlant | _ProductionPlant |
@AbapCatalog.sqlViewName: 'PPPMFGORDITEM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.viewType: #BASIC
@VDM.private: true
define view P_MfgOrderItem
// used for AMDP method (Table Function) determine_item_durations
as select from afpo as afpo
inner join afko as afko on afko.mandt = afpo.mandt
and afko.aufnr = afpo.aufnr
association[1..1] to I_Plant as _ProductionPlant on $projection.ProductionPlant = _ProductionPlant.Plant
{
// Key
key afpo.aufnr as ManufacturingOrder,
key afpo.posnr as ManufacturingOrderItem,
// Category and Type
afpo.dauty as ManufacturingOrderCategory,
afpo.dauat as ManufacturingOrderType,
// Assignments
afpo.dwerk as ProductionPlant,
_ProductionPlant.FactoryCalendar as FactoryCalendar,
afpo.pwerk as MRPPlant,
// Dates
afko.gstrp as MfgOrderPlannedStartDate,
afko.gstrs as MfgOrderScheduledStartDate,
afko.gstri as MfgOrderActualStartDate,
afpo.dgltp as MfgOrderItemPlannedEndDate,
afpo.dglts as MfgOrderItemScheduledEndDate,
afpo.ltrmp as MfgOrderItemPlndDeliveryDate,
afpo.ltrmi as MfgOrderItemActualDeliveryDate,
// others
afpo.webaz as MaterialGoodsReceiptDuration,
// Associations
_ProductionPlant
}
where ( afpo.dauty = '10' or //Manufacturing orders only
afpo.dauty = '40' );
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PLANT",
"AFKO",
"AFPO"
],
"ASSOCIATED":
[
"I_PLANT"
],
"BASE":
[],
"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