@AbapCatalog.sqlViewName: 'IMFGORDHDRCONF'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_User', '_LongText']
@Analytics.dataCategory:#DIMENSION
@Analytics.internalName: #LOCAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@ClientHandling.type: #CLIENT_DEPENDENT
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.representativeKey: 'MfgOrderConfirmationCount'
@ObjectModel.semanticKey: ['MfgOrderConfirmation', 'MfgOrderConfirmationCount']
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC
@EndUserText.label: 'Manufacturing Order Header Confirmation'
/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ] } */
define view I_MfgOrderHeaderConfirmation
as select from I_OrderConfirmation
association [1..1] to I_MfgOrder as _MfgOrder on $projection.ManufacturingOrder = _MfgOrder.ManufacturingOrder
association [1..1] to I_ManufacturingOrder as _ManufacturingOrder on $projection.ManufacturingOrder = _ManufacturingOrder.ManufacturingOrder
association [1..1] to I_MfgOrderCategory as _MfgOrderCategory on $projection.ManufacturingOrderCategory = _MfgOrderCategory.ManufacturingOrderCategory
association [1..1] to I_MfgOrderType as _MfgOrderType on $projection.ManufacturingOrderType = _MfgOrderType.ManufacturingOrderType
{
// Key
@ObjectModel.foreignKey.association: '_ConfirmationGroup'
key ConfirmationGroup as MfgOrderConfirmation,
@ObjectModel.text.element: ['ConfirmationText']
key OrderConfirmation as MfgOrderConfirmationCount,
// Order Data
@ObjectModel.foreignKey.association: '_MfgOrder'
cast(OrderID as manufacturingorder preserving type) as ManufacturingOrder,
@ObjectModel.foreignKey.association: '_MfgOrderCategory'
cast(OrderCategory as manufacturingordercategory preserving type) as ManufacturingOrderCategory,
@ObjectModel.foreignKey.association: '_MfgOrderType'
cast(OrderType as manufacturingordertype preserving type) as ManufacturingOrderType,
@ObjectModel.foreignKey.association: '_ProductionPlant'
ProductionPlant,
// Text
@Semantics.text: true
ConfirmationText,
@ObjectModel.foreignKey.association: '_Language'
Language,
@ObjectModel.foreignKey.association: '_LongTextIndicator'
LongTextExists,
// Attributes
@ObjectModel.foreignKey.association: '_FinalConfirmationType'
FinalConfirmationType,
IsFinalConfirmation,
OpenReservationsIsCleared,
IsReversed,
IsReversal,
CancldMfgOrderConfCount,
// Admin
@Semantics.systemDate.createdAt: true
ConfirmationEntryDate as MfgOrderConfirmationEntryDate,
@Semantics.systemTime.createdAt: true
ConfirmationEntryTime as MfgOrderConfirmationEntryTime,
@Semantics.user.createdBy: true
EnteredByUser,
@Semantics.systemDate.lastChangedAt: true
LastChangeDate,
@Semantics.user.lastChangedBy: true
LastChangedByUser,
@Semantics.systemDate.createdAt: true
ConfirmationExternalEntryDate,
@Semantics.systemTime.createdAt: true
ConfirmationExternalEntryTime,
EnteredByExternalUser,
ExternalSystemConfirmation,
@ObjectModel.foreignKey.association: '_ConfirmationApplOrigin'
ConfirmationApplicationOrigin,
@ObjectModel.foreignKey.association: '_ConfirmationType'
OrderConfirmationType,
@ObjectModel.foreignKey.association: '_ConfirmationRecordType'
OrderConfirmationRecordType,
// Assignments
@ObjectModel.foreignKey.association: '_Plant'
Plant,
@ObjectModel.foreignKey.association: '_MaterialDocument3'
MaterialDocument,
@ObjectModel.foreignKey.association: '_MaterialDocumentYear'
MaterialDocumentYear,
// Assignments FI/CO
@ObjectModel.foreignKey.association: '_BusinessArea'
BusinessArea,
@ObjectModel.foreignKey.association: '_CompanyCode'
CompanyCode,
@ObjectModel.foreignKey.association: '_ControllingArea'
ControllingArea,
-- @ObjectModel.foreignKey.association: '_ProfitCenter'
ProfitCenter,
@ObjectModel.foreignKey.association: '_ProductCostCollector'
ProductCostCollector,
// Dates
@Semantics.businessDate.at: true
PostingDate,
@ObjectModel.foreignKey.association: '_PostingDateYear'
PostingDateYear,
// Quantities and UoM
@Semantics.unitOfMeasure: true
ConfirmationUnit,
@Semantics.quantity.unitOfMeasure: 'ConfirmationUnit'
@Aggregation.default: #SUM
ConfirmationYieldQuantity,
@Semantics.quantity.unitOfMeasure: 'ConfirmationUnit'
@Aggregation.default: #SUM
ConfirmationScrapQuantity,
@Semantics.quantity.unitOfMeasure: 'ConfirmationUnit'
@Aggregation.default: #SUM
ConfirmationReworkQuantity,
@Semantics.quantity.unitOfMeasure: 'ConfirmationUnit'
@Aggregation.default: #SUM
ConfirmationTotalQuantity,
@ObjectModel.foreignKey.association: '_VarianceReason'
VarianceReasonCode,
// Associations
_ConfirmationGroup,
_ManufacturingOrder,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_ManufacturingOrder'
_MfgOrder,
_MfgOrderCategory,
_MfgOrderType,
_ConfirmationUnit,
_Plant,
_ProductionPlant,
_User,
_Language,
_FinalConfirmationType,
_ConfirmationType,
_ConfirmationRecordType,
_ConfirmationApplOrigin,
_BusinessArea,
_CompanyCode,
_ControllingArea,
_ProductCostCollector,
_VarianceReason,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_MaterialDocument3'
_MaterialDocument,
_MaterialDocument3,
_MaterialDocumentYear,
_PostingDate,
_PostingDateYear,
_LongTextIndicator,
_LongText
}
where OrderOperationInternalID = '00000000' //Conf. on Header Level only
and ( ConfirmationApplicationOrigin = '2' or
ConfirmationApplicationOrigin = '6' ); //Manufacturing orders only
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ORDERCONFIRMATION"
],
"ASSOCIATED":
[
"I_BUSINESSAREA",
"I_CALENDARDATE",
"I_CALENDARYEAR",
"I_COMPANYCODE",
"I_CONFIRMATIONAPPLORIGIN",
"I_CONFIRMATIONGROUP",
"I_CONFIRMATIONRECORDTYPE",
"I_CONTROLLINGAREA",
"I_FINALCONFIRMATIONTYPE",
"I_INDICATOR",
"I_LANGUAGE",
"I_MANUFACTURINGORDER",
"I_MATERIALDOCUMENTHEADER",
"I_MATERIALDOCUMENTHEADER_2",
"I_MATERIALDOCUMENTYEAR",
"I_MFGORDER",
"I_MFGORDERCATEGORY",
"I_MFGORDERTYPE",
"I_ORDERCONFIRMATIONTYPE",
"I_ORDERCONFLONGTEXT",
"I_PLANT",
"I_PRODUCTCOSTCTRLGORDER",
"I_UNITOFMEASURE",
"I_USER",
"I_VARIANCEREASON"
],
"BASE":
[
"I_ORDERCONFIRMATION"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/