I_TripLayTimeEventsTP

DDL: I_TRIPLAYTIMEEVENTSTP SQL: ILAYTIMEEVNTTP Type: view TRANSACTIONAL

Trip Item Laytime Events

I_TripLayTimeEventsTP is a Transactional CDS View that provides data about "Trip Item Laytime Events" in SAP S/4HANA. It reads from 2 data sources (oit_rsn_code_txt, oij08_tripevent) and exposes 24 fields with key fields TripDoc, TripDocItem, TripEventNumber, TripEventLineType. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
oit_rsn_code_txt b left_outer
oij08_tripevent Event from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_TripItemTP _TripItemTP $projection.TripDoc = _TripItemTP.TripDoc and $projection.TripDocItem = _TripItemTP.TripDocItem
[1..1] I_TripHeadTP _TripHeadTP $projection.TripDoc = _TripHeadTP.TripDoc
[0..1] I_ReasonCodeVH _ReasonCodeVH $projection.ReasonCode = _ReasonCodeVH.ReasonCode and $projection.ReasonCodeDescription = _ReasonCodeVH.ReasonCodeDescription

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName ILAYTIMEEVNTTP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.transactionalProcessingEnabled true view
ObjectModel.createEnabled EXTERNAL_CALCULATION view
ObjectModel.deleteEnabled EXTERNAL_CALCULATION view
ObjectModel.updateEnabled EXTERNAL_CALCULATION view
ObjectModel.writeDraftPersistence ILAYTIMEEVNTTP_D view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Trip Item Laytime Events view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY TripDoc oij08_tripevent trip_id Trip ID
KEY TripDocItem oij08_tripevent trip_item Trip Item Number
KEY TripEventNumber oij08_tripevent event_nr Event number
KEY TripEventLineType oij08_tripevent linetype Type of line
TripEventType oij08_tripevent event Time
EventOpTimePoint oij08_tripevent op_point Op. time point
ReasonCode oij08_tripevent rsncode Reason Code
ReasonCodeDescription oit_rsn_code_txt descr WSS Profile
TripEventRule oij08_tripevent ev_rule Event rule
EventWaiveTime oij08_tripevent add_time Add time
EventWaiveTimeUoM oij08_tripevent add_uom Time UoM
LocationTimeZone _TripItemTP LocationTimeZone
clientNULLastimestampasActualEndDateTime
TripEvtPlannedStartDate oij08_tripevent pstdtf Single-Character Flag
TripEvtPlannedStartTime oij08_tripevent psttmf Single-Character Flag
TripEvtPlannedEndDate oij08_tripevent peddtt Single-Character Flag
TripEvtPlannedEndTime oij08_tripevent pedtmt Single-Character Flag
TripEvtActualStartDate oij08_tripevent astdtf Strt Date-From
TripEvtActualStartTime oij08_tripevent asttmf Strt Time-From
TripEvtActualEndDate oij08_tripevent aeddtt Single-Character Flag
TripEvtActualEndTime oij08_tripevent aedtmt Single-Character Flag
_TripHeadTP _TripHeadTP
_TripItemTP _TripItemTP
_ReasonCodeVH _ReasonCodeVH

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 I_TripLayTimeEventsTP.
-- 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: ILAYTIMEEVNTTP

CREATE VIEW I_TripLayTimeEventsTP AS
SELECT
  Event.trip_id AS TripDoc,
  Event.trip_item AS TripDocItem,
  Event.event_nr AS TripEventNumber,
  Event.linetype AS TripEventLineType,
  Event.event AS TripEventType,
  Event.op_point AS EventOpTimePoint,
  Event.rsncode AS ReasonCode,
  b.descr AS ReasonCodeDescription,
  Event.ev_rule AS TripEventRule,
  Event.add_time AS EventWaiveTime,
  Event.add_uom AS EventWaiveTimeUoM,
  _TripItemTP.LocationTimeZone AS LocationTimeZone,
  cast( dats_tims_to_tstmp( Event.aeddtt, Event.aedtmt, 'UTC', $session.client, 'NULL' ) as timestamp ) as ActualEndDateTime AS clientNULLastimestampasActualEndDateTime,
  Event.pstdtf AS TripEvtPlannedStartDate,
  Event.psttmf AS TripEvtPlannedStartTime,
  Event.peddtt AS TripEvtPlannedEndDate,
  Event.pedtmt AS TripEvtPlannedEndTime,
  Event.astdtf AS TripEvtActualStartDate,
  Event.asttmf AS TripEvtActualStartTime,
  Event.aeddtt AS TripEvtActualEndDate,
  Event.aedtmt AS TripEvtActualEndTime
FROM oij08_tripevent AS Event
LEFT OUTER JOIN oit_rsn_code_txt AS b ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_TripItemTP AS _TripItemTP ON TripDoc = _TripItemTP.TripDoc AND TripDocItem = _TripItemTP.TripDocItem  -- association [1..1]
LEFT OUTER JOIN I_TripHeadTP AS _TripHeadTP ON TripDoc = _TripHeadTP.TripDoc  -- association [1..1]
LEFT OUTER JOIN I_ReasonCodeVH AS _ReasonCodeVH ON ReasonCode = _ReasonCodeVH.ReasonCode AND ReasonCodeDescription = _ReasonCodeVH.ReasonCodeDescription  -- association [0..1]
;