@EndUserText: {label: 'Transportation Order: Execution'}
@ObjectModel: {representativeKey: 'TransportationOrderEventUUID',
usageType: {serviceQuality: #B,
sizeCategory: #XXL,
dataClass: #TRANSACTIONAL}}
@VDM: {viewType: #BASIC}
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl: {authorizationCheck: #PRIVILEGED_ONLY,
personalData.blocking: #('TRANSACTIONAL_DATA'),
privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser',
'_TransportationOrderItem', '_TransportationOrderStop' ]}
@Metadata.allowExtensions: true
define view entity I_TranspOrdExecution
as select from /scmtms/d_torexe
/* VDM-based Associations */
association [1..1] to I_TransportationOrder as _TransportationOrder on $projection.TransportationOrderUUID = _TransportationOrder.TransportationOrderUUID
association [0..1] to I_TransportationOrderItem as _TransportationOrderItem on $projection.TransportationOrderItemUUID = _TransportationOrderItem.TransportationOrderItemUUID
association [0..1] to I_TransportationOrderStop as _TransportationOrderStop on $projection.TransportationOrderStopUUID = _TransportationOrderStop.TransportationOrderStopUUID
/* Foreign Key and Text Associations */
association [0..1] to I_TranspOrdEventCode as _TranspOrdEventCode on $projection.TranspOrdEventCode = _TranspOrdEventCode.TranspOrdEventCode
association [0..1] to I_TranspOrdEventCode as _TranspOrdReferenceEventCode on $projection.TranspOrdReferenceEventCode = _TranspOrdReferenceEventCode.TranspOrdEventCode
association [0..1] to I_TranspOrdEventStatus as _TranspOrdEventStatus on $projection.TranspOrdEventStatus = _TranspOrdEventStatus.TranspOrdEventStatus
association [0..1] to I_TranspOrdHasQtyDiscrepancy as _TranspOrdHasQtyDiscrepancy on $projection.TranspOrdHasQtyDiscrepancy = _TranspOrdHasQtyDiscrepancy.TranspOrdHasQtyDiscrepancy
association [0..1] to I_TranspOrdIsDiscrepant as _TranspOrdIsDiscrepant on $projection.TranspOrdIsDiscrepant = _TranspOrdIsDiscrepant.TranspOrdIsDiscrepant
association [0..1] to I_DiscrepancyType as _DiscrepancyType on $projection.DiscrepancyType = _DiscrepancyType.DiscrepancyType
association [0..1] to I_TranspOrdIsDscrptWthoutBlk as _TranspOrdIsDscrptWthoutBlk on $projection.TranspOrdIsDscrptWthoutBlk = _TranspOrdIsDscrptWthoutBlk.TranspOrdIsDscrptWthoutBlk
association [0..1] to I_TranspExecDscrcySubCat as _TranspExecDscrcySubCat on $projection.TranspOrdExecDscrcySubCat = _TranspExecDscrcySubCat.TranspOrdExecDscrcySubCat
association [0..1] to I_TransportationActivity as _TransportationActivity on $projection.TransportationActivity = _TransportationActivity.TransportationActivity
association [0..1] to I_TranspOrdEventIsRecalled as _TranspOrdEventIsRecalled on $projection.TranspOrdEventIsRecalled = _TranspOrdEventIsRecalled.TranspOrdEventIsRecalled
association [0..1] to I_LocationBasic as _LocationAdditional on $projection.LocationAdditionalUUID = _LocationAdditional.LocationAdditionalUUID
association [0..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_User as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.UserID
association [0..1] to I_UnitOfMeasure as _TranspOrdExecGrossWeightUnit on $projection.TranspOrdExecGrossWeightUnit = _TranspOrdExecGrossWeightUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecGrossVolumeUnit on $projection.TranspOrdExecGrossVolumeUnit = _TranspOrdExecGrossVolumeUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecNetWeightUnit on $projection.TranspOrdExecNetWeightUnit = _TranspOrdExecNetWeightUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecQuantityUnit on $projection.TranspOrdExecQuantityUnit = _TranspOrdExecQuantityUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecAltvQtyUnit on $projection.TranspOrdExecAltvQtyUnit = _TranspOrdExecAltvQtyUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecBaseQtyUnit on $projection.TranspOrdExecBaseQtyUnit = _TranspOrdExecBaseQtyUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecTareWeightUnit on $projection.TranspOrdExecTareWeightUnit = _TranspOrdExecTareWeightUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecNumberOfCtnsUnit on $projection.TranspOrdExecNumberOfCtnsUnit = _TranspOrdExecNumberOfCtnsUnit.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecDngrsGdsExmppUoM on $projection.TranspOrdExecDngrsGdsExmppUnit = _TranspOrdExecDngrsGdsExmppUoM.UnitOfMeasure
association [0..1] to I_UnitOfMeasure as _TranspOrdExecLengthUnit on $projection.TranspOrdExecLengthUnit = _TranspOrdExecLengthUnit.UnitOfMeasure
association [0..1] to I_TranspOrdExecInfoSource as _TranspOrdExecInfoSource on $projection.TranspOrdExecInfoSource = _TranspOrdExecInfoSource.TranspOrdExecInfoSource
{
//Header and Links (BOBF)
@ObjectModel.text.element: [ 'TranspOrdExecution' ]
key db_key as TransportationOrderEventUUID,
@ObjectModel.foreignKey.association: '_TransportationOrder'
cast(parent_key as /scmtms/vdm_tor_db_key preserving type) as TransportationOrderUUID,
@Semantics.text: true
cast(execution_id as /scmtms/vdm_execution_id preserving type) as TranspOrdExecution,
@ObjectModel.foreignKey.association: '_TransportationOrderStop'
torstopuuid as TransportationOrderStopUUID,
@ObjectModel.foreignKey.association: '_TransportationOrderItem'
toritmuuid as TransportationOrderItemUUID,
// Admin
@Semantics.user.createdBy: true
created_by as CreatedByUser,
cast(created_on as /scmtms/vdm_tm_tstmp_crt preserving type) as CreationDateTime,
@Semantics.user.lastChangedBy: true
changed_by as LastChangedByUser,
cast(changed_on as /scmtms/vdm_tm_tstmp_cht preserving type) as ChangedDateTime,
//Event
@ObjectModel.foreignKey.association: '_TranspOrdEventCode'
event_code as TranspOrdEventCode,
@ObjectModel.foreignKey.association: '_TranspOrdEventStatus'
event_status as TranspOrdEventStatus,
@ObjectModel.foreignKey.association: '_TransportationActivity'
trans_activity as TransportationActivity,
@ObjectModel.foreignKey.association: '_TranspOrdEventIsRecalled'
cast(event_revoked as /scmtms/event_revoked preserving type) as TranspOrdEventIsRecalled,
event_reason_code as TranspOrdEventReasonCode,
@Semantics.text: true
event_reason as TranspOrdEventReasonDesc,
@ObjectModel.foreignKey.association: '_TranspOrdExecInfoSource'
cast(execinfo_source as /scmtms/execinfo_source preserving type) as TranspOrdExecInfoSource,
@ObjectModel.foreignKey.association: '_TranspOrdReferenceEventCode'
ref_event_code as TranspOrdReferenceEventCode,
//Duration and Dates
cast(actual_date as /scmtms/vdm_event_actl_dtetme preserving type) as TranspOrdEvtActualDateTime,
cast(actual_tzone as /scmtms/vdm_actual_timezone preserving type) as TranspOrdEvtActualDateTimeZone,
cast(exp_end_date as /scmtms/vdm_expd_end_datetime preserving type) as TranspOrdEvtExpdEndDateTime,
cast(estimated_date as /scmtms/vdm_estimated_datetime preserving type) as TranspOrdEvtEstimatedDateTime,
//Location
cast (ext_loc_uuid as /scmtms/vdm_location_adtl_uuid preserving type) as LocationAdditionalUUID,
cast (_LocationAdditional.LocationUUID as /scmtms/vdm_location_uuid preserving type) as LocationUUID,
@Semantics.geoLocation.latitude: true
geolat as GeographicalLocationLatitude,
@Semantics.geoLocation.longitude: true
geolon as GeographicalLocationLongitude,
geoalt as GeographicalLocationAltitude,
//Discrepancy
@ObjectModel.foreignKey.association: '_TranspOrdHasQtyDiscrepancy'
qty_discrepancy as TranspOrdHasQtyDiscrepancy,
@ObjectModel.foreignKey.association: '_TranspOrdIsDiscrepant'
discrepancy as TranspOrdIsDiscrepant,
@ObjectModel.foreignKey.association: '_DiscrepancyType'
discr_type as DiscrepancyType,
@ObjectModel.foreignKey.association: '_TranspOrdIsDscrptWthoutBlk'
discr_no_block as TranspOrdIsDscrptWthoutBlk,
discr_inside_tlr as TranspOrdIsDiscrepantWithinTol,
@ObjectModel.foreignKey.association: '_TranspExecDscrcySubCat'
dsc_subcat as TranspOrdExecDscrcySubCat,
//Quantities (for Discrepacy only)
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecGrossWeightUnit'
//scmtms/quantity_13_3
cast(gro_wei_val as /scmtms/vdm_exec_grss_wgt preserving type) as TranspOrdExecGrossWeight,
@ObjectModel.foreignKey.association: '_TranspOrdExecGrossWeightUnit'
cast(gro_wei_uni as /scmtms/vdm_exec_grss_wgt_unit preserving type) as TranspOrdExecGrossWeightUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecGrossVolumeUnit'
cast(gro_vol_val as /scmtms/vdm_exec_grss_vol preserving type) as TranspOrdExecGrossVolume,
@ObjectModel.foreignKey.association: '_TranspOrdExecGrossVolumeUnit'
cast(gro_vol_uni as /scmtms/vdm_exec_grss_vol_unit preserving type) as TranspOrdExecGrossVolumeUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecNetWeightUnit'
cast(net_wei_val as /scmtms/vdm_exec_net_wgt preserving type) as TranspOrdExecNetWeight,
@ObjectModel.foreignKey.association: '_TranspOrdExecNetWeightUnit'
cast(net_wei_uni as /scmtms/vdm_exec_net_wgt_unit preserving type) as TranspOrdExecNetWeightUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecQuantityUnit'
cast(qua_pcs_val as /scmtms/vdm_exec_qty preserving type) as TranspOrdExecQuantity,
@ObjectModel.foreignKey.association: '_TranspOrdExecQuantityUnit'
cast(qua_pcs_uni as /scmtms/vdm_exec_qty_unit preserving type) as TranspOrdExecQuantityUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecAltvQtyUnit'
cast(qua_pcs2_val as /scmtms/vdm_exec_qty_altv preserving type) as TranspOrdExecAltvQty,
@ObjectModel.foreignKey.association: '_TranspOrdExecAltvQtyUnit'
cast(qua_pcs2_uni as /scmtms/vdm_exec_qty_altv_unit preserving type) as TranspOrdExecAltvQtyUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecBaseQtyUnit'
cast(base_uom_val as /scmtms/vdm_exec_qty_base preserving type) as TranspOrdExecBaseQty,
@ObjectModel.foreignKey.association: '_TranspOrdExecBaseQtyUnit'
cast(base_uom_uni as /scmtms/vdm_exec_qty_base_unit preserving type) as TranspOrdExecBaseQtyUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecTareWeightUnit'
cast(pkgun_wei_val as /scmtms/vdm_exec_tare_wgt preserving type) as TranspOrdExecTareWeight,
@ObjectModel.foreignKey.association: '_TranspOrdExecTareWeightUnit'
cast(pkgun_wei_uni as /scmtms/vdm_exec_tare_wgt_unit preserving type) as TranspOrdExecTareWeightUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecNumberOfCtnsUnit'
cast(cont_cnt_val as /scmtms/vdm_exec_ctn_nmbr preserving type) as TranspOrdExecNumberOfCtns,
@ObjectModel.foreignKey.association: '_TranspOrdExecNumberOfCtnsUnit'
cast(cont_cnt_uni as /scmtms/vdm_exec_ctn_nmbr_unit preserving type) as TranspOrdExecNumberOfCtnsUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecDngrsGdsExmppUnit'
cast(dg_adr_pts_val as /scmtms/vdm_dngrsgd_exmpp preserving type) as TranspOrdExecDngrsGdsExmpp,
@ObjectModel.foreignKey.association: '_TranspOrdExecDngrsGdsExmppUoM'
cast(dg_adr_pts_uni as /scmtms/vdm_dngrsgd_exmpp_unit preserving type) as TranspOrdExecDngrsGdsExmppUnit,
slac_val as ShippersLoadAndCountQuantity,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecLengthUnit'
cast(length as /scmtms/vdm_exec_length preserving type) as TranspOrdExecLength,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecLengthUnit'
cast(width as /scmtms/vdm_exec_width preserving type) as TranspOrdExecWidth,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecLengthUnit'
cast(height as /scmtms/vdm_exec_height preserving type) as TranspOrdExecHeight,
@ObjectModel.foreignKey.association: '_TranspOrdExecLengthUnit'
cast(measuom as /scmtms/vdm_exec_length_unit preserving type) as TranspOrdExecLengthUnit,
@Semantics.quantity.unitOfMeasure: 'TranspOrdExecLengthUnit'
cast (net_duration as /scmtms/vdm_net_duration) as TranspOrdExecutionNetDuration,
recording_method as TranspOrdExecRecordingMethod,
recording_person as TranspOrdExecPersnRespRecg,
cast(exec_role_cat as /scmtms/vdm_partner_function preserving type ) as TranspOrdExecPartnerFunction,
/* Associations */
@ObjectModel.association.type: [ #TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT ]
_TransportationOrder,
_TransportationOrderStop,
_TransportationOrderItem,
_LocationAdditional,
_TranspOrdEventCode,
_TranspOrdReferenceEventCode,
_TranspOrdEventStatus,
_TransportationActivity,
_TranspOrdEventIsRecalled,
_TranspOrdHasQtyDiscrepancy,
_TranspOrdIsDiscrepant,
_DiscrepancyType,
_TranspOrdIsDscrptWthoutBlk,
_TranspExecDscrcySubCat,
_CreatedByUser,
_LastChangedByUser,
_TranspOrdExecGrossWeightUnit,
_TranspOrdExecGrossVolumeUnit,
_TranspOrdExecNetWeightUnit,
_TranspOrdExecQuantityUnit,
_TranspOrdExecAltvQtyUnit,
_TranspOrdExecBaseQtyUnit,
_TranspOrdExecTareWeightUnit,
_TranspOrdExecNumberOfCtnsUnit,
_TranspOrdExecDngrsGdsExmppUoM,
_TranspOrdExecLengthUnit,
_TranspOrdExecInfoSource
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_LOCATIONBASIC",
"/SCMTMS/D_TOREXE"
],
"ASSOCIATED":
[
"I_DISCREPANCYTYPE",
"I_LOCATIONBASIC",
"I_TRANSPEXECDSCRCYSUBCAT",
"I_TRANSPORDEVENTCODE",
"I_TRANSPORDEVENTISRECALLED",
"I_TRANSPORDEVENTSTATUS",
"I_TRANSPORDEXECINFOSOURCE",
"I_TRANSPORDHASQTYDISCREPANCY",
"I_TRANSPORDISDISCREPANT",
"I_TRANSPORDISDSCRPTWTHOUTBLK",
"I_TRANSPORTATIONACTIVITY",
"I_TRANSPORTATIONORDER",
"I_TRANSPORTATIONORDERITEM",
"I_TRANSPORTATIONORDERSTOP",
"I_UNITOFMEASURE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/