@AbapCatalog.sqlViewName: 'IPPPRTMD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: ['_CreatedByUser', '_LastChangedByUser']
@Analytics.dataCategory: #DIMENSION
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE]
@ObjectModel.representativeKey: 'ProductionResourceInternalID'
@ObjectModel.usageType: {serviceQuality: #A, sizeCategory: #M, dataClass: #MASTER}
@VDM.viewType: #BASIC
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@EndUserText.label: 'Production Resource Tool Master Data'
/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK"] } */
define view I_ProdnRsceToolMasterData
as select from crfh
association [1..1] to I_ProductionResourceType as _ProductionResourceType on $projection.ProductionResourceType = _ProductionResourceType.ProductionResourceType
association [1..1] to I_ProdnRsceToolCategory as _ProdnRsceToolCategory on $projection.ProdnRsceToolCategory = _ProdnRsceToolCategory.ProdnRsceToolCategory
association [1..1] to I_ProdnRsceToolCategory as _ProdnRsceToolCategory_2 on $projection.ProdnRsceToolCategory_2 = _ProdnRsceToolCategory_2.ProdnRsceToolCategory
association [1..1] to I_ProdnRsceToolCategory_2 as _ProdnRsceToolCategory_3 on $projection.ProdnRsceToolCategory_2 = _ProdnRsceToolCategory_3.ProdnRsceToolCategory
association [1..1] to I_ProdnRsceToolGroup as _ProdnRsceToolGroup1 on $projection.ProductionResourceToolGroup1 = _ProdnRsceToolGroup1.ProductionResourceToolGroup
association [1..1] to I_ProdnRsceToolGroup as _ProdnRsceToolGroup2 on $projection.ProductionResourceToolGroup2 = _ProdnRsceToolGroup2.ProductionResourceToolGroup
association [1..1] to I_ProductionResourceUsage as _ProductionResourceUsage on $projection.ProductionResourceUsage = _ProductionResourceUsage.ProductionResourceUsage
association [0..1] to I_ProdnRsceToolControlProfile as _ProdnRsceToolControlProfile on $projection.ProdnRsceToolControlProfile = _ProdnRsceToolControlProfile.ProdnRsceToolControlProfile
association [1..1] to I_ProdnRsceToolStandardText as _ProdnRsceToolStandardText on $projection.ProdnRsceToolStandardTextCode = _ProdnRsceToolStandardText.ProdnRsceToolStandardTextCode
association [0..1] to I_ChangeMaster as _ChangeMaster on $projection.ChangeNumber = _ChangeMaster.ChangeNumber
association [1..1] to I_ProdnRsceToolQtyCalcFormula as _ProdnRsceToolTotQtyCalcFmla on $projection.ProdnRsceToolTotQtyCalcFormula = _ProdnRsceToolTotQtyCalcFmla.ProdnRsceToolQtyCalcFormula
association [1..1] to I_ProdnRsceToolQtyCalcFormula as _ProdnRsceToolUsageQtyCalcFmla on $projection.ProdnRsceToolUsageQtyCalcFmla = _ProdnRsceToolUsageQtyCalcFmla.ProdnRsceToolQtyCalcFormula
association [1..1] to I_OperationDateOffsetRefCode as _StartDateOffsetReferenceCode on $projection.StartDateOffsetReferenceCode = _StartDateOffsetReferenceCode.OperationDateOffsetRefCode
association [1..1] to I_OperationDateOffsetRefCode as _EndDateOffsetReferenceCode on $projection.EndDateOffsetReferenceCode = _EndDateOffsetReferenceCode.OperationDateOffsetRefCode
association [0..1] to I_UnitOfMeasure as _StartDateOffsetDurationUnit on $projection.StartDateOffsetDurationUnit = _StartDateOffsetDurationUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _EndDateOffsetDurationUnit on $projection.EndDateOffsetDurationUnit = _EndDateOffsetDurationUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _ProdnRsceToolBaseUnit on $projection.ProdnRsceToolBaseUnit = _ProdnRsceToolBaseUnit.UnitOfMeasure
association [1..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_User as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.UserID
{
@ObjectModel.foreignKey.association: '_ProductionResourceType'
key cast(crfh.objty as productionresourcetype preserving type) as ProductionResourceType,
// Representative Key
key cast(crfh.objid as pph_fhmid preserving type) as ProductionResourceInternalID,
// Assignments
@API.element.releaseState: #DEPRECATED
@API.element.successor: 'ProdnRsceToolCategory_2'
@ObjectModel.foreignKey.association: '_ProdnRsceToolCategory'
crfh.fhmar as ProdnRsceToolCategory,
@ObjectModel.foreignKey.association: '_ProdnRsceToolCategory_3'
cast(crfh.fhmar as mpe_fhmar preserving type) as ProdnRsceToolCategory_2,
@ObjectModel.foreignKey.association: '_ProdnRsceToolGroup1'
crfh.fgru1 as ProductionResourceToolGroup1,
@ObjectModel.foreignKey.association: '_ProdnRsceToolGroup2'
crfh.fgru2 as ProductionResourceToolGroup2,
@ObjectModel.foreignKey.association: '_ProductionResourceUsage'
crfh.planv as ProductionResourceUsage,
// Technical field, used for Miscellaneous Production Resource Tool only !
crfh.brgru as MiscPRTAuthorizationGroup,
@ObjectModel.foreignKey.association: '_ProdnRsceToolControlProfile'
crfh.steuf as ProdnRsceToolControlProfile,
@ObjectModel.foreignKey.association: '_ChangeMaster'
cast(crfh.aennr as changenumber preserving type) as ChangeNumber,
@ObjectModel.foreignKey.association: '_ProdnRsceToolStandardText'
crfh.ktsch as ProdnRsceToolStandardTextCode,
@ObjectModel.foreignKey.association: '_ProdnRsceToolTotQtyCalcFmla'
crfh.mgform as ProdnRsceToolTotQtyCalcFormula,
@ObjectModel.foreignKey.association: '_ProdnRsceToolUsageQtyCalcFmla'
crfh.ewform as ProdnRsceToolUsageQtyCalcFmla,
@Semantics.unitOfMeasure: true
crfh.baseh as ProdnRsceToolBaseUnit,
// Administrative Data
@Semantics.systemDate.createdAt: true
crfh.andat as CreationDate,
@Semantics.user.createdBy: true
cast(crfh.annam as vdm_createdbyuserid preserving type) as CreatedByUser,
@Semantics.systemDate.lastChangedAt: true
crfh.aedat as LastChangeDate,
@Semantics.user.lastChangedBy: true
crfh.aenam as LastChangedByUser,
// Offset
@ObjectModel.foreignKey.association: '_StartDateOffsetReferenceCode'
cast(crfh.bzoffb as startdateoffsetreferencecode preserving type) as StartDateOffsetReferenceCode,
@Semantics.quantity.unitOfMeasure: 'StartDateOffsetDurationUnit'
@DefaultAggregation: #SUM
cast(crfh.offstb as startdateoffsetduration preserving type) as StartDateOffsetDuration,
@Semantics.unitOfMeasure: true
crfh.ehoffb as StartDateOffsetDurationUnit,
@ObjectModel.foreignKey.association: '_EndDateOffsetReferenceCode'
cast(crfh.bzoffe as enddateoffsetreferencecode preserving type) as EndDateOffsetReferenceCode,
@Semantics.quantity.unitOfMeasure: 'EndDateOffsetDurationUnit'
@DefaultAggregation: #SUM
cast(crfh.offste as enddateoffsetduration preserving type) as EndDateOffsetDuration,
@Semantics.unitOfMeasure: true
crfh.ehoffe as EndDateOffsetDurationUnit,
// Reference Indicators
cast(crfh.offste_ref as vdm_oekzr preserving type) as EndDateOffsetDurnIsReferenced,
cast(crfh.offstb_ref as vdm_obkzr preserving type) as StartDateOffstDurnIsReferenced,
cast(crfh.bzoffe_ref as vdm_bekzr preserving type) as EndDteOffstRefCodeIsReferenced,
cast(crfh.bzoffb_ref as vdm_bbkzr preserving type) as StartDateOffsetRefCodeIsRefcd,
cast(crfh.mgform_ref as vdm_mfkzr preserving type) as PRTTotQtyCalcFmlaIsReferenced,
cast(crfh.ewform_ref as vdm_efkzr preserving type) as PRTUsgeQtyCalcFmlaIsReferenced,
cast(crfh.steuf_ref as vdm_stkzr preserving type) as PRTControlProfileIsReferenced,
cast(crfh.ktsch_ref as vdm_ktkzr preserving type) as PRTStdTextCodeIsReferenced,
//PRT can be Registered at Production Execution
crfh.registrable as ShopFloorRtgPRTIsRegistrable,
// Associations
_ProductionResourceType,
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_ProdnRsceToolCategory_3'
_ProdnRsceToolCategory,
@API.element.releaseState: #DEPRECATED
@API.element.successor: '_ProdnRsceToolCategory_3'
_ProdnRsceToolCategory_2,
_ProdnRsceToolCategory_3, //assoc. to new view w/o conversion exit
_ProdnRsceToolGroup1,
_ProdnRsceToolGroup2,
_ProductionResourceUsage,
_ProdnRsceToolControlProfile,
_ProdnRsceToolStandardText,
_ProdnRsceToolTotQtyCalcFmla,
_ProdnRsceToolUsageQtyCalcFmla,
_StartDateOffsetReferenceCode,
_EndDateOffsetReferenceCode,
_StartDateOffsetDurationUnit,
_EndDateOffsetDurationUnit,
_ProdnRsceToolBaseUnit,
_CreatedByUser,
_LastChangedByUser,
_ChangeMaster
}
where
crfh.objty = 'FH' // Production Resource Tool
and crfh.zaehl = '00000000'
and crfh.loekz = ' ' // not deleted
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"CRFH"
],
"ASSOCIATED":
[
"I_CHANGEMASTER",
"I_OPERATIONDATEOFFSETREFCODE",
"I_PRODNRSCETOOLCATEGORY",
"I_PRODNRSCETOOLCATEGORY_2",
"I_PRODNRSCETOOLCONTROLPROFILE",
"I_PRODNRSCETOOLGROUP",
"I_PRODNRSCETOOLQTYCALCFORMULA",
"I_PRODNRSCETOOLSTANDARDTEXT",
"I_PRODUCTIONRESOURCETYPE",
"I_PRODUCTIONRESOURCEUSAGE",
"I_UNITOFMEASURE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/