A_ProductionOrderComponent_4

DDL: A_PRODUCTIONORDERCOMPONENT_4 Type: view_entity COMPOSITE Package: ODATA_PP_API_PRODORDER_2

Production Order Components Using RAP BO

A_ProductionOrderComponent_4 is a Composite CDS View that provides data about "Production Order Components Using RAP BO" in SAP S/4HANA. It reads from 1 data source (I_MfgOrderOperationComponent) and exposes 60 fields with key fields Reservation, ReservationItem, ReservationRecordType. It has 1 association to related views. Part of development package ODATA_PP_API_PRODORDER_2.

Data Sources (1)

SourceAliasJoin Type
I_MfgOrderOperationComponent I_MfgOrderOperationComponent from

Associations (1)

CardinalityTargetAliasCondition
[1..1] E_ReservationDocumentItem _Extension $projection.Reservation = _Extension.Reservation and $projection.ReservationItem = _Extension.ReservationItem and $projection.ReservationRecordType = _Extension.RecordType

Annotations (11)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Production Order Components Using RAP BO view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled 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 (60)

KeyFieldSource TableSource FieldDescription
KEY Reservation Reservation
KEY ReservationItem ReservationItem
KEY ReservationRecordType RecordType
MaterialGroup MaterialGroup
Material Material
Plant Plant
ManufacturingOrderCategory ManufacturingOrderCategory
ManufacturingOrderType ManufacturingOrderType
ManufacturingOrder
ManufacturingOrderSequence ManufacturingOrderSequence
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
MatlCompFreeDefinedAttribute SortField
BillOfMaterialCategory BillOfMaterialCategory
BOMItem BOMItem
BOMItemCategory BOMItemCategory
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
LastChangeTimeendasLastChangeDateTime
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Production Order Components Using RAP BO'
@VDM.viewType: #COMPOSITE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.updateEnabled: true
@ObjectModel.deleteEnabled: true //CE2308

@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_REMOTE_API

define view entity A_ProductionOrderComponent_4
  as select from I_MfgOrderOperationComponent
  association [1..1] to E_ReservationDocumentItem     as _Extension   // Extensibility CE 2102

                                                      on  $projection.Reservation     = _Extension.Reservation
                                                      and $projection.ReservationItem = _Extension.ReservationItem
                                                      and $projection.ReservationRecordType = _Extension.RecordType
                                                     
{
      // Key

  @ObjectModel.sapObjectNodeTypeReference: 'ReservationDocument'
  key Reservation,
  key ReservationItem,
  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,
      cast( ManufacturingOrderOperation as vdm_vornr preserving type ) as 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 as MatlCompFreeDefinedAttribute, // Solves ATC error with different length for GFN SortField  

                     
      // Assignments BOM

      BillOfMaterialCategory,
       
      BOMItem,    
      BOMItemCategory,
      cast ( BillOfMaterialItemNumber as vdm_sposn preserving type ) as 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,
      
      // eTag for Update CE2201

      @Semantics.durationInSeconds: true
      @Semantics.dateTime: false
      case I_MfgOrderOperationComponent._MfgOrder.LastChangeDate
        when '00000000' then  // not changed yet, use create

          concat(I_MfgOrderOperationComponent._MfgOrder.MfgOrderCreationDate,
                 I_MfgOrderOperationComponent._MfgOrder.MfgOrderCreationTime)
        else
          concat(I_MfgOrderOperationComponent._MfgOrder.LastChangeDate,
                 I_MfgOrderOperationComponent._MfgOrder.LastChangeTime)
        end                               as LastChangeDateTime
      
}
where
  ManufacturingOrderCategory = '10';