A_ProductionOrderComponent_2

DDL: A_PRODUCTIONORDERCOMPONENT_2 Type: view_entity COMPOSITE

Production Order Components

A_ProductionOrderComponent_2 is a Composite CDS View that provides data about "Production Order Components" in SAP S/4HANA. It reads from 1 data source (I_MfgOrderOperationComponent) and exposes 58 fields with key fields Reservation, ReservationItem.

Data Sources (1)

SourceAliasJoin Type
I_MfgOrderOperationComponent I_MfgOrderOperationComponent from

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Production Order Components view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view

Fields (58)

KeyFieldSource TableSource FieldDescription
KEY Reservation Reservation
KEY ReservationItem ReservationItem
MaterialGroup MaterialGroup
Material Material
Plant Plant
ManufacturingOrderCategory ManufacturingOrderCategory
ManufacturingOrderType ManufacturingOrderType
ManufacturingOrder
ManufacturingOrderSequence ManufacturingOrderSequence
ManufacturingOrderOperation ManufacturingOrderOperation
ProductionPlant ProductionPlant
OrderInternalBillOfOperations OrderInternalBillOfOperations
MatlCompRequirementDate MatlCompRequirementDate
MatlCompRequirementTime MatlCompRequirementTime
ReservationIsFinallyIssued ReservationIsFinallyIssued
MatlCompIsMarkedForDeletion
IsBulkMaterialComponent IsBulkMaterialComponent
MatlCompIsMarkedForBackflush MatlCompIsMarkedForBackflush
MaterialCompIsCostRelevant MaterialCompIsCostRelevant
OrderComponentLongText _LongText OrderComponentLongText
SalesOrder SalesOrder
SalesOrderItem SalesOrderItem
SortField SortField
BillOfMaterialCategory BillOfMaterialCategory
BOMItem BOMItem
BOMItemCategory BOMItemCategory
BillOfMaterialItemNumber BillOfMaterialItemNumber
BOMItemDescription BOMItemDescription BOM Item Text
StorageLocation StorageLocation
Batch Batch
GoodsMovementType GoodsMovementType
SupplyArea SupplyArea
GoodsRecipientName GoodsRecipientName
UnloadingPointName UnloadingPointName
MaterialCompIsAlternativeItem MaterialCompIsAlternativeItem
AlternativeItemGroup AlternativeItemGroup
AlternativeItemStrategy AlternativeItemStrategy
AlternativeItemPriority AlternativeItemPriority
UsageProbabilityPercent UsageProbabilityPercent
MaterialComponentIsPhantomItem MaterialComponentIsPhantomItem
LeadTimeOffset LeadTimeOffset
QuantityIsFixed QuantityIsFixed
IsNetScrap IsNetScrap
ComponentScrapInPercent ComponentScrapInPercent
OperationScrapInPercent OperationScrapInPercent
BaseUnit BaseUnit
BaseUnitISOCode _BaseUnit UnitOfMeasureISOCode
BaseUnitSAPCode _BaseUnit UnitOfMeasureSAPCode
RequiredQuantity RequiredQuantity
WithdrawnQuantity WithdrawnQuantity
ConfirmedAvailableQuantity ConfirmedAvailableQuantity
MaterialCompOriginalQuantity MaterialCompOriginalQuantity
EntryUnit EntryUnit
EntryUnitISOCode _EntryUnit UnitOfMeasureISOCode
EntryUnitSAPCode _EntryUnit UnitOfMeasureSAPCode
GoodsMovementEntryQty GoodsMovementEntryQty
Currency Currency
WithdrawnQuantityAmount WithdrawnQuantityAmount
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Production Order Components'
@VDM.viewType: #COMPOSITE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_REMOTE_API

define view entity A_ProductionOrderComponent_2
  as select from I_MfgOrderOperationComponent
                                                      
{
  // Key

  @ObjectModel.sapObjectNodeTypeReference: 'ReservationDocument'
  key Reservation,
  key ReservationItem,
      //Name RecordType as key field is missing here, this should be corrected with Production Order (Version 3) see also Process Order (Version 2)   

      //key RecordType                                          as ReservationRecordType,                      

  
      // Material data

      MaterialGroup,       
      Material, 
      Plant,
       
      // Order and Operation data

      @ObjectModel.sapObjectNodeTypeReference: 'ManufacturingOrderCategory' 
      ManufacturingOrderCategory,
      @ObjectModel.sapObjectNodeTypeReference: 'ManufacturingOrderType'
      ManufacturingOrderType,
      @ObjectModel.sapObjectNodeTypeReference: 'ProductionOrder'      
      cast(ManufacturingOrder                             as vdm_manufacturingorder preserving type) as ManufacturingOrder, 
      ManufacturingOrderSequence,
      ManufacturingOrderOperation,
      ProductionPlant,
      OrderInternalBillOfOperations,        

      // Date and Time                   

      MatlCompRequirementDate,
      MatlCompRequirementTime,       

      // Attributes

      ReservationIsFinallyIssued,
      cast( MatlCompIsMarkedForDeletion as /plmb/lkenz preserving type ) as MatlCompIsMarkedForDeletion,  // CE2208

      IsBulkMaterialComponent, 
      MatlCompIsMarkedForBackflush,
      MaterialCompIsCostRelevant,
      
      // Text

      @Semantics.text:true
      _LongText.OrderComponentLongText,                                                                   // CE2008

       
      // Assignments

      @ObjectModel.sapObjectNodeTypeReference: 'SalesOrder'            
      SalesOrder,
      SalesOrderItem,
      SortField, 
                     
      // Assignments BOM

      BillOfMaterialCategory,
       
      BOMItem,    
      BOMItemCategory,
      BillOfMaterialItemNumber,
      @EndUserText.label: 'BOM Item Text'
      @Semantics.text: true
      BOMItemDescription,      

      // Goods Movement data

      @ObjectModel.sapObjectNodeTypeReference: 'StorageLocation'                   
      StorageLocation,
      Batch,
      case when BatchSplitType = ' '                      // LCOMKF4R 

            and MaterialComponentIsPhantomItem = ' '      // resb-dumps

            and MatlCompIsTextItem             = ' '      // resb-txtps

            and MaterialIsDirectlyProcured     <> 'X'     // resb-dbskz NE 'F'

           then _ProductPlant2.IsInternalBatchManaged     // resb-xchar

           else BatchSplitType end                  as BatchSplitType,
      @ObjectModel.sapObjectNodeTypeReference: 'GoodsMovementType' 
      GoodsMovementType,        
      SupplyArea,        
      @Semantics.text: true  
      GoodsRecipientName,        
      @Semantics.text: true 
      UnloadingPointName,   

      // Alternative item data - added with CE2011

      MaterialCompIsAlternativeItem,
      AlternativeItemGroup,
      AlternativeItemStrategy,
      AlternativeItemPriority,
      UsageProbabilityPercent,
      
      // Phantom assembly

      MaterialComponentIsPhantomItem,        

      // Lead-Time offset

      LeadTimeOffset,

      // Quantities and UoM

      QuantityIsFixed,
      IsNetScrap,
      ComponentScrapInPercent,
      OperationScrapInPercent,
      BaseUnit,
      _BaseUnit.UnitOfMeasureISOCode                as BaseUnitISOCode,             // CE2105

      _BaseUnit.UnitOfMeasureSAPCode                as BaseUnitSAPCode,             // CE2105

      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      RequiredQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      WithdrawnQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      ConfirmedAvailableQuantity,  
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      MaterialCompOriginalQuantity,
      EntryUnit,
      _EntryUnit.UnitOfMeasureISOCode               as EntryUnitISOCode,
      _EntryUnit.UnitOfMeasureSAPCode               as EntryUnitSAPCode,
      @Semantics.quantity.unitOfMeasure: 'EntryUnit'
      GoodsMovementEntryQty,            

      // Amount and Currency

      @ObjectModel.sapObjectNodeTypeReference: 'Currency'
      Currency,
      @Semantics.amount.currencyCode: 'Currency'
      WithdrawnQuantityAmount
      
}
where
//if RecordType is maintained as key field, the Record Type must be deactivated here, this should be corrected with Production Order (Version 3) see also Process Order (Version 2)  

  RecordType = '' and  // scenario where RecordType/RSART <> '' (followup materials) is not supported    

  ManufacturingOrderCategory = '10';