P_MfgExecEventHistOrderPrep

DDL: P_MFGEXECEVENTHISTORDERPREP SQL: PMPEEXECHISTORDP Type: view COMPOSITE Package: MPE_EXEC_COMMON

Order Execution Event History Preparation

P_MfgExecEventHistOrderPrep is a Composite CDS View that provides data about "Order Execution Event History Preparation" in SAP S/4HANA. It reads from 2 data sources (P_MfgQualityTaskHistory, P_MfgExecEventHistOrdHdrHold) and exposes 428 fields with key fields MfgExecDocumentCategory, ManufacturingExecutionDocument, MfgExecutionDocumentItem, MfgProcgExecAction, ManufacturingOrder. Part of development package MPE_EXEC_COMMON.

Data Sources (2)

SourceAliasJoin Type
P_MfgQualityTaskHistory FollowUpAction union_all
P_MfgExecEventHistOrdHdrHold hold from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PMPEEXECHISTORDP view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
VDM.private true view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view

Fields (428)

KeyFieldSource TableSource FieldDescription
KEY MfgExecDocumentCategory
KEY ManufacturingExecutionDocument P_MfgExecEventHistOrdHdrHold ProductionHold Serial.Mat. ID
KEY MfgExecutionDocumentItem P_MfgExecEventHistOrdHdrHold ProductionHoldItem
KEY MfgProcgExecAction P_MfgExecEventHistOrdHdrHold MfgProcgExecAction
KEY ManufacturingOrder P_MfgExecEventHistOrdHdrHold ManufacturingOrder Order
KEY OrderOperationInternalID
KEY InspectionCharacteristic
KEY InspectionSubsetInternalID
KEY InspResultValueInternalID
KEY ChangeDocDatabaseTableField
KEY ChangeDocument Document Number
MfgObjectLogEventType
EventDateTime P_MfgExecEventHistOrdHdrHold EventDateTime Timestamp
ShopFloorExecutionUser P_MfgExecEventHistOrdHdrHold ShopFloorExecutionUser
CreatedByUser P_MfgExecEventHistOrdHdrHold CreatedByUser User Name
CreationDateTime P_MfgExecEventHistOrdHdrHold CreationDateTime Timestamp
SortField
ShopFloorItem P_MfgExecEventHistOrdHdrHold ShopFloorItem Serial.Mat. ID
OperationActivitySFIGroup P_MfgExecEventHistOrdHdrHold OperationActivitySFIGroup
OpActyNtwkInstance P_MfgExecEventHistOrdHdrHold OpActyNtwkInstance Instance ID
OpActyNtwkElement P_MfgExecEventHistOrdHdrHold OpActyNtwkElement Element Number
OperationActivityName
OpActyNtwkSegmentType
OperationActivityNetwork
OpActyNtwkVersionCounter
OpActyNtwkElementExternalID Op. Activity
OperationActivity Operation Activity
OperationActyVersionCounter OA Version
StatusAndActionSchema
ManufacturingOrderSequence Visit Sequence
ManufacturingOrderOperation Transaction
MfgOrderOperationText Description
WorkCenterInternalID
WorkCenterTypeCode Object Type
WorkCenterPlant
DefectInternalID P_MfgExecEventHistOrdHdrHold DefectInternalID Internal Defect ID
Notification P_MfgExecEventHistOrdHdrHold Notification Notification
NotificationItem P_MfgExecEventHistOrdHdrHold NotificationItem
MaterialComponent
MaterialComponentName
AssembledShopFloorItem
AssembledSerialNumber
AssembledMfrSerialNumber
AssembledBatch
ReferenceDesignatorValue Ref. Designator
ReplacedShopFloorItem
ReplacedSerialNumber
ReplacedBatch
MfgOrderSplitChildOrder
BOMExplosionDate
Defect
DefectText
QltyTaskFollowUpAction
BusinessProcessConfirmedQty
ProductionUnit
MfgActionReasonCodeGroupCtlg P_MfgExecEventHistOrdHdrHold MfgActionReasonCodeGroupCtlg
MfgActionReasonCodeGroup P_MfgExecEventHistOrdHdrHold MfgActionReasonCodeGroup
ManufacturingActionReasonCode P_MfgExecEventHistOrdHdrHold ManufacturingActionReasonCode
MfgExecutionDocumentNote note MfgExecutionDocumentNote
InspectionSpecificationText
ChangeDocPreviousFieldValue
ChangeDocNewFieldValue
InspectionResultMeanValue
InspectionResultMeasuredValue
CharacteristicAttributeCode
InspectionValuationResult
InspectionSpecificationUnit Unit of Meas.
InspSpecDecimalPlaces
SystemMessageNumber P_MfgExecEventHistOrdHdrHold SystemMessageNumber Message Number
SystemMessageIdentification P_MfgExecEventHistOrdHdrHold SystemMessageIdentification Message ID
MfgExecHistMsgVarblField1 P_MfgExecEventHistOrdHdrHold MfgExecHistMsgVarblField1
MfgExecHistMsgVarblField2 P_MfgExecEventHistOrdHdrHold MfgExecHistMsgVarblField2
MfgExecHistMsgVarblField3 P_MfgExecEventHistOrdHdrHold MfgExecHistMsgVarblField3
KEY ManufacturingExecutionDocument crrtn AssemblyCorrectionDocument Serial.Mat. ID
KEY MfgExecutionDocumentItem
KEY MfgProcgExecAction crrtn MfgProcgExecAction
KEY ManufacturingOrder crrtn ManufacturingOrder Order
KEY OrderOperationInternalID
KEY InspectionCharacteristic
KEY InspectionSubsetInternalID
KEY InspResultValueInternalID
KEY ChangeDocDatabaseTableField
KEY ChangeDocument Document Number
MfgObjectLogEventType
EventDateTime Timestamp
ShopFloorExecutionUser
CreatedByUser User Name
CreationDateTime Timestamp
SortField
ShopFloorItem crrtn ShopFloorItem Serial.Mat. ID
OperationActivitySFIGroup
OpActyNtwkInstance Instance ID
OpActyNtwkElement Element Number
OperationActivityName
OpActyNtwkSegmentType
OperationActivityNetwork
OpActyNtwkVersionCounter
OpActyNtwkElementExternalID Op. Activity
OperationActivity Operation Activity
OperationActyVersionCounter OA Version
StatusAndActionSchema
ManufacturingOrderSequence Visit Sequence
ManufacturingOrderOperation Transaction
MfgOrderOperationText Description
WorkCenterInternalID
WorkCenterTypeCode Object Type
WorkCenterPlant
DefectInternalID Internal Defect ID
Notification Notification
NotificationItem
MaterialComponent crrtn MaterialComponent
MaterialComponentName crrtn MaterialComponentName
AssembledShopFloorItem crrtn AssembledShopFloorItem
AssembledSerialNumber
AssembledMfrSerialNumber
AssembledBatch crrtn AssembledBatch
ReferenceDesignatorValue crrtn ReferenceDesignatorValue Ref. Designator
ReplacedShopFloorItem crrtn ReplacedShopFloorItem
ReplacedSerialNumber crrtn ReplacedSerialNumber
ReplacedBatch crrtn ReplacedBatch
MfgOrderSplitChildOrder
BOMExplosionDate
Defect
DefectText
QltyTaskFollowUpAction
BusinessProcessConfirmedQty
ProductionUnit crrtn EntryUnit
MfgActionReasonCodeGroupCtlg crrtn MfgActionReasonCodeGroupCtlg
MfgActionReasonCodeGroup crrtn MfgActionReasonCodeGroup
ManufacturingActionReasonCode crrtn ManufacturingActionReasonCode
MfgExecutionDocumentNote crrtn MfgExecutionDocumentNote
InspectionSpecificationText
ChangeDocPreviousFieldValue
ChangeDocNewFieldValue
InspectionResultMeanValue
InspectionResultMeasuredValue
CharacteristicAttributeCode
InspectionValuationResult
InspectionSpecificationUnit Unit of Meas.
InspSpecDecimalPlaces
SystemMessageNumber crrtn SystemMessageNumber Message Number
SystemMessageIdentification crrtn SystemMessageIdentification Message ID
MfgExecHistMsgVarblField1 crrtn MfgExecHistMsgVarblField1
MfgExecHistMsgVarblField2 crrtn MfgExecHistMsgVarblField2
MfgExecHistMsgVarblField3 crrtn MfgExecHistMsgVarblField3
KEY ManufacturingExecutionDocument log ManufacturingObjectLog Serial.Mat. ID
KEY MfgExecutionDocumentItem
KEY MfgProcgExecAction
KEY ManufacturingOrder log ManufacturingOrder Order
KEY OrderOperationInternalID
KEY InspectionCharacteristic
KEY InspectionSubsetInternalID
KEY InspResultValueInternalID
KEY ChangeDocDatabaseTableField
KEY ChangeDocument Document Number
MfgObjectLogEventType log MfgObjectLogEventType
EventDateTime Timestamp
ShopFloorExecutionUser
CreatedByUser User Name
CreationDateTime Timestamp
ShopFloorItem log ShopFloorItem Serial.Mat. ID
OperationActivitySFIGroup
OpActyNtwkInstance Instance ID
OpActyNtwkElement Element Number
OperationActivityName
OpActyNtwkSegmentType
OperationActivityNetwork
OpActyNtwkVersionCounter
OpActyNtwkElementExternalID Op. Activity
OperationActivity Operation Activity
OperationActyVersionCounter OA Version
StatusAndActionSchema
ManufacturingOrderSequence Visit Sequence
ManufacturingOrderOperation Transaction
MfgOrderOperationText Description
WorkCenterInternalID
WorkCenterTypeCode Object Type
WorkCenterPlant
DefectInternalID Internal Defect ID
Notification Notification
NotificationItem
MaterialComponent
MaterialComponentName
AssembledShopFloorItem
AssembledSerialNumber
AssembledMfrSerialNumber
AssembledBatch
ReferenceDesignatorValue Ref. Designator
ReplacedShopFloorItem
ReplacedSerialNumber
ReplacedBatch
MfgOrderSplitChildOrder log MfgOrderSplitChildOrder
BOMExplosionDate log BOMExplosionDate
Defect
DefectText
QltyTaskFollowUpAction
ProductionUnit log ProductionUnit
MfgActionReasonCodeGroupCtlg log MfgActionReasonCodeGroupCtlg
MfgActionReasonCodeGroup log MfgActionReasonCodeGroup
ManufacturingActionReasonCode log ManufacturingActionReasonCode
MfgExecutionDocumentNote note MfgExecutionDocumentNote
InspectionSpecificationText
ChangeDocPreviousFieldValue
ChangeDocNewFieldValue
InspectionResultMeanValue
InspectionResultMeasuredValue
CharacteristicAttributeCode
InspectionValuationResult
InspectionSpecificationUnit Unit of Meas.
InspSpecDecimalPlaces
SystemMessageNumber log SystemMessageNumber Message Number
SystemMessageIdentification log SystemMessageIdentification Message ID
MfgExecHistMsgVarblField1 log MfgExecHistMsgVarblField1
MfgExecHistMsgVarblField2 log MfgExecHistMsgVarblField2
MfgExecHistMsgVarblField3 log MfgExecHistMsgVarblField3
KEY ManufacturingExecutionDocument sfi ShopFloorItem Serial.Mat. ID
KEY MfgExecutionDocumentItem
KEY MfgProcgExecAction
KEY ManufacturingOrder sfi ManufacturingOrder Order
KEY OrderOperationInternalID
KEY InspectionCharacteristic
KEY InspectionSubsetInternalID
KEY InspResultValueInternalID
KEY ChangeDocDatabaseTableField
KEY ChangeDocument Document Number
MfgObjectLogEventType
EventDateTime Timestamp
ShopFloorExecutionUser
CreatedByUser User Name
CreationDateTime Timestamp
SortField
ShopFloorItem sfi ShopFloorItem Serial.Mat. ID
OperationActivitySFIGroup
OpActyNtwkInstance Instance ID
OpActyNtwkElement Element Number
OperationActivityName
OpActyNtwkSegmentType
OperationActivityNetwork
OpActyNtwkVersionCounter
OpActyNtwkElementExternalID Op. Activity
OperationActivity Operation Activity
OperationActyVersionCounter OA Version
StatusAndActionSchema
ManufacturingOrderSequence Visit Sequence
ManufacturingOrderOperation Transaction
MfgOrderOperationText Description
WorkCenterInternalID
WorkCenterTypeCode Object Type
WorkCenterPlant
DefectInternalID Internal Defect ID
Notification Notification
NotificationItem
MaterialComponent
MaterialComponentName
AssembledShopFloorItem
AssembledSerialNumber
AssembledMfrSerialNumber
AssembledBatch
ReferenceDesignatorValue Ref. Designator
ReplacedShopFloorItem
ReplacedSerialNumber
ReplacedBatch
MfgOrderSplitChildOrder
BOMExplosionDate
Defect
DefectText
QltyTaskFollowUpAction
BusinessProcessConfirmedQty
ProductionUnit
MfgActionReasonCodeGroupCtlg
MfgActionReasonCodeGroup
ManufacturingActionReasonCode
MfgExecutionDocumentNote
InspectionSpecificationText
ChangeDocPreviousFieldValue
ChangeDocNewFieldValue
InspectionResultMeanValue
InspectionResultMeasuredValue
CharacteristicAttributeCode
InspectionValuationResult
InspectionSpecificationUnit Unit of Meas.
InspSpecDecimalPlaces
SystemMessageNumber Message Number
SystemMessageIdentification Message ID
MfgExecHistMsgVarblField1 7
MfgExecHistMsgVarblField2 17
MfgExecHistMsgVarblField3 0
KEY ManufacturingExecutionDocument Serial.Mat. ID
KEY MfgExecutionDocumentItem
KEY ManufacturingOrder P_MfgQualityTaskHistory ProductionOrder Order
KEY OrderOperationInternalID
KEY InspectionCharacteristic
KEY InspectionSubsetInternalID
KEY InspResultValueInternalID
KEY ChangeDocDatabaseTableField
KEY ChangeDocument Document Number
MfgObjectLogEventType
clientNULLasEventDateTime
ShopFloorExecutionUser
CreatedByUser User Name
clientNULLasCreationDateTime
SortField
ShopFloorItem Serial.Mat. ID
OperationActivitySFIGroup
OpActyNtwkInstance Instance ID
OpActyNtwkElement Element Number
OperationActivityName
OpActyNtwkSegmentType
OperationActivityNetwork
OpActyNtwkVersionCounter
OpActyNtwkElementExternalID Op. Activity
OperationActivity Operation Activity
OperationActyVersionCounter OA Version
StatusAndActionSchema
ManufacturingOrderSequence Visit Sequence
ManufacturingOrderOperation Transaction
MfgOrderOperationText Description
WorkCenterInternalID
WorkCenterTypeCode Object Type
WorkCenterPlant
DefectInternalID Internal Defect ID
Notification P_MfgQualityTaskHistory Notification Notification
NotificationItem P_MfgQualityTaskHistory NotificationItem
MaterialComponent
MaterialComponentName
AssembledShopFloorItem
AssembledSerialNumber
AssembledMfrSerialNumber
AssembledBatch
ReferenceDesignatorValue Ref. Designator
ReplacedShopFloorItem
ReplacedSerialNumber
ReplacedBatch
MfgOrderSplitChildOrder
BOMExplosionDate
Defect P_MfgQualityTaskHistory Defect
DefectText P_MfgQualityTaskHistory DefectText
QltyTaskFollowUpAction P_MfgQualityTaskHistory QltyTaskFollowUpAction
BusinessProcessConfirmedQty
ProductionUnit
MfgActionReasonCodeGroupCtlg
MfgActionReasonCodeGroup
ManufacturingActionReasonCode
MfgExecutionDocumentNote
InspectionSpecificationText
ChangeDocPreviousFieldValue
ChangeDocNewFieldValue
InspectionResultMeanValue
InspectionResultMeasuredValue
CharacteristicAttributeCode
InspectionValuationResult
InspectionSpecificationUnit Unit of Meas.
InspSpecDecimalPlaces
SystemMessageIdentification Message ID
MfgExecHistMsgVarblField1 35
KEY ManufacturingExecutionDocument Serial.Mat. ID
KEY MfgExecutionDocumentItem
KEY MfgProcgExecAction h MfgProcgExecAction
KEY ManufacturingOrder h ManufacturingOrder Order
OrderInternalID
KEY OrderOperationInternalID h OrderOperationInternalID
KEY InspectionCharacteristic h InspectionCharacteristic
KEY InspectionSubsetInternalID h InspectionSubsetInternalID
KEY InspResultValueInternalID h InspResultValueInternalID
KEY ChangeDocDatabaseTableField h ChangeDocDatabaseTableField
KEY ChangeDocument h ChangeDocument Document Number
MfgObjectLogEventType
EventDateTime h CreationDateTime Timestamp
ShopFloorExecutionUser
CreatedByUser h CreatedByUser User Name
CreationDateTime h CreationDateTime Timestamp
SortField
ShopFloorItem h ShopFloorItem Serial.Mat. ID
OperationActivitySFIGroup
OpActyNtwkInstance h OpActyNtwkInstance Instance ID
OpActyNtwkElement h OpActyNtwkElement Element Number
OperationActivityName h OperationActivityName
OpActyNtwkSegmentType h OpActyNtwkSegmentType
OperationActivityNetwork h OperationActivityNetwork
OpActyNtwkVersionCounter h OpActyNtwkVersionCounter
OpActyNtwkElementExternalID h OpActyNtwkElementExternalID Op. Activity
OperationActivity h OperationActivity Operation Activity
OperationActyVersionCounter h OperationActyVersionCounter OA Version
StatusAndActionSchema h StatusAndActionSchema
ManufacturingOrderSequence Visit Sequence
ManufacturingOrderOperation Transaction
MfgOrderOperationText Description
WorkCenterInternalID
WorkCenterTypeCode h WorkCenterTypeCode Object Type
DefectInternalID Internal Defect ID
Notification Notification
NotificationItem
MaterialComponent
MaterialComponentName
AssembledShopFloorItem
AssembledSerialNumber
AssembledMfrSerialNumber
AssembledBatch
ReferenceDesignatorValue Ref. Designator
ReplacedShopFloorItem
ReplacedSerialNumber
ReplacedBatch
MfgOrderSplitChildOrder
BOMExplosionDate
Defect
DefectText
QltyTaskFollowUpAction
BusinessProcessConfirmedQty
ProductionUnit
MfgActionReasonCodeGroupCtlg
MfgActionReasonCodeGroup
ManufacturingActionReasonCode
MfgExecutionDocumentNote
InspectionSpecificationText h InspectionSpecificationText
ChangeDocPreviousFieldValue h ChangeDocPreviousFieldValue
ChangeDocNewFieldValue h ChangeDocNewFieldValue
InspectionResultMeanValue h InspectionResultMeanValue
InspectionResultMeasuredValue h InspectionResultMeasuredValue
CharacteristicAttributeCode h CharacteristicAttributeCode
InspectionValuationResult h InspectionValuationResult
InspectionSpecificationUnit h InspectionSpecificationUnit Unit of Meas.
InspSpecDecimalPlaces h InspSpecDecimalPlaces
SystemMessageNumber h SystemMessageNumber Message Number
SystemMessageIdentification h SystemMessageIdentification Message ID
MfgExecHistMsgVarblField1 h MfgExecHistMsgVarblField1
MfgExecHistMsgVarblField2 h MfgExecHistMsgVarblField2
MfgExecHistMsgVarblField3 h MfgExecHistMsgVarblField3
MfgExecHistMsgVarblField4 h MfgExecHistMsgVarblField4

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_MfgExecEventHistOrderPrep.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PMPEEXECHISTORDP

CREATE VIEW P_MfgExecEventHistOrderPrep AS
SELECT
  cast (5 as mpe_exec_doc_category preserving type) AS MfgExecDocumentCategory,
  hold.ProductionHold AS ManufacturingExecutionDocument,
  hold.ProductionHoldItem AS MfgExecutionDocumentItem,
  hold.MfgProcgExecAction AS MfgProcgExecAction,
  hold.ManufacturingOrder AS ManufacturingOrder,
  cast('00000000' as operationinternalid preserving type) AS OrderOperationInternalID,
  cast('0000' as qmerknrp preserving type ) AS InspectionCharacteristic,
  cast('000000' as qstipronr preserving type ) AS InspectionSubsetInternalID,
  cast('00000000' as qdetailerg preserving type ) AS InspResultValueInternalID,
  cast('' as fieldname) AS ChangeDocDatabaseTableField,
  cast('' as cdchangenr) AS ChangeDocument,
  cast(0 as mpe_log_event) AS MfgObjectLogEventType,
  hold.EventDateTime AS EventDateTime,
  hold.ShopFloorExecutionUser AS ShopFloorExecutionUser,
  hold.CreatedByUser AS CreatedByUser,
  hold.CreationDateTime AS CreationDateTime,
  cast(700 as rszsort) AS SortField,
  hold.ShopFloorItem AS ShopFloorItem,
  hold.OperationActivitySFIGroup AS OperationActivitySFIGroup,
  hold.OpActyNtwkInstance AS OpActyNtwkInstance,
  hold.OpActyNtwkElement AS OpActyNtwkElement,
  cast('' as mpe_oa_description) AS OperationActivityName,
  cast('0' as mpe_oan_segment_type preserving type) AS OpActyNtwkSegmentType,
  cast(0 as mpe_oan_id) AS OperationActivityNetwork,
  cast(0 as mpe_oan_version_no) AS OpActyNtwkVersionCounter,
  cast('' as mpe_oan_element_number_ext) AS OpActyNtwkElementExternalID,
  cast(0 as mpe_oa_id) AS OperationActivity,
  cast(0 as mpe_oa_version_no) AS OperationActyVersionCounter,
  cast('' as mpe_sasname_type) AS StatusAndActionSchema,
  cast('' as manufacturingordersequence) AS ManufacturingOrderSequence,
  cast('' as manufacturingorderoperation) AS ManufacturingOrderOperation,
  cast('' as mfgorderoperationtext) AS MfgOrderOperationText,
  cast('00000000' as pph_arbid) AS WorkCenterInternalID,
  cast('' as productionresourcetype) AS WorkCenterTypeCode,
  cast('' as mpe_wrk_ctr_plant) AS WorkCenterPlant,
  hold.DefectInternalID AS DefectInternalID,
  hold.Notification AS Notification,
  hold.NotificationItem AS NotificationItem,
  cast('' as mpe_component_matnr) AS MaterialComponent,
  cast('' as maktx) AS MaterialComponentName,
  cast(0 as mpe_assembled_sfi_id) AS AssembledShopFloorItem,
  cast('' as mpe_assembled_sernr) AS AssembledSerialNumber,
  cast('' as mpe_assembled_mfr_sernr) AS AssembledMfrSerialNumber,
  cast('' as mpe_assembled_batch) AS AssembledBatch,
  cast('' as vmp_ref_des) AS ReferenceDesignatorValue,
  cast(0 as mpe_assembled_sfi_id) AS ReplacedShopFloorItem,
  cast('' as mpe_replaced_sernr) AS ReplacedSerialNumber,
  cast('' as mpe_replaced_batch) AS ReplacedBatch,
  cast('' as split_caufnr) AS MfgOrderSplitChildOrder,
  cast('00000000' as co_aufld) AS BOMExplosionDate,
  cast('' as qdefectid) AS Defect,
  cast('' as vdm_qfetxt) AS DefectText,
  cast('' as qmfolact) AS QltyTaskFollowUpAction,
  cast(0 as co_iprzs) AS BusinessProcessConfirmedQty,
  cast('' as mpe_log_unit) AS ProductionUnit,
  hold.MfgActionReasonCodeGroupCtlg AS MfgActionReasonCodeGroupCtlg,
  hold.MfgActionReasonCodeGroup AS MfgActionReasonCodeGroup,
  hold.ManufacturingActionReasonCode AS ManufacturingActionReasonCode,
  note.MfgExecutionDocumentNote AS MfgExecutionDocumentNote,
  cast('' as vdm_qmkkurztxt) AS InspectionSpecificationText,
  cast('' as cdfldvalo) AS ChangeDocPreviousFieldValue,
  cast('' as cdfldvaln ) AS ChangeDocNewFieldValue,
  cast(0 as qmittelwrt) AS InspectionResultMeanValue,
  cast(0 as qmesswert) AS InspectionResultMeasuredValue,
  cast(' ' as qcode preserving type ) AS CharacteristicAttributeCode,
  cast('' as qmbewertg preserving type ) AS InspectionValuationResult,
  cast('' as qmasseh ) AS InspectionSpecificationUnit,
  cast(0 as qnkstellof preserving type ) AS InspSpecDecimalPlaces,
  hold.SystemMessageNumber AS SystemMessageNumber,
  hold.SystemMessageIdentification AS SystemMessageIdentification,
  hold.MfgExecHistMsgVarblField1 AS MfgExecHistMsgVarblField1,
  hold.MfgExecHistMsgVarblField2 AS MfgExecHistMsgVarblField2,
  hold.MfgExecHistMsgVarblField3 AS MfgExecHistMsgVarblField3,
  dats_tims_to_tstmp(FollowUpAction.CreationDate,FollowUpAction.CreationTime,abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as EventDateTime AS clientNULLasEventDateTime,
  dats_tims_to_tstmp(FollowUpAction.CreationDate,FollowUpAction.CreationTime,abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as CreationDateTime AS clientNULLasCreationDateTime,
  h.MfgExecHistMsgVarblField4 AS MfgExecHistMsgVarblField4
FROM P_MfgExecEventHistOrdHdrHold AS hold
-- UNION ALL with additional select branch(es): P_MfgQualityTaskHistory
;