A_VMSVehicleHistory

DDL: A_VMSVEHICLEHISTORY SQL: AVMSVHIS Type: view COMPOSITE

Vehicle History

A_VMSVehicleHistory is a Composite CDS View that provides data about "Vehicle History" in SAP S/4HANA. It reads from 2 data sources (I_SAPClient, I_VMSVehicleHistory) and exposes 23 fields with key fields VMSVehicleUUID, VMSVehicleActionDateTime. It has 9 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_SAPClient _SAPClient inner
I_VMSVehicleHistory I_VMSVehicleHistory from

Associations (9)

CardinalityTargetAliasCondition
[0..1] A_VMSVehicleLocation _VMSVehicleLocation I_VMSVehicleHistory.VMSVehicleLocation = _VMSVehicleLocation.AddressNumber
[1..*] A_VMSVehicleStatusText _VMSVehOldPrimaryStatusText _VMSVehOldPrimaryStatusText.VMSVehicleStatus = $projection.VMSVehicleOldPrimaryStatus
[1..*] A_VMSVehicleStatusText _VMSVehNewPrimaryStatusText _VMSVehNewPrimaryStatusText.VMSVehicleStatus = $projection.VMSVehicleNewPrimaryStatus
[1..*] A_VMSVehicleStatusText _VMSVehOldSecondaryStatusText _VMSVehOldSecondaryStatusText.VMSVehicleStatus = $projection.VMSVehicleOldSecondaryStatus
[1..*] A_VMSVehicleStatusText _VMSVehNewSecondaryStatusText _VMSVehNewSecondaryStatusText.VMSVehicleStatus = $projection.VMSVehicleNewSecondaryStatus
[1..*] A_VMSVehicleActionText _VMSVehicleActionText _VMSVehicleActionText.VMSVehicleAction = $projection.VMSVehicleAction
[1..*] A_VMSVehicleActionText _VMSVehInterlinkingActionText _VMSVehInterlinkingActionText.VMSVehicleAction = $projection.VMSVehicleInterLinkingAction
[1..*] A_VMSVehicleLocationText _LocationText $projection.vmsvehiclelocation = _LocationText.VMSVehicleLocation
[1..1] E_VMSVehicleHistory _Extension $projection.VMSVehicleUUID = _Extension.VMSVehicleUUID and $projection.VMSVehicleActionDateTime = _Extension.VMSVehicleActionDateTime

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName AVMSVHIS view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Vehicle History view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
Metadata.ignorePropagatedAnnotations true view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY VMSVehicleUUID VMSVehicleUUID Vehicle GUID
KEY VMSVehicleActionDateTime VMSVehicleActionDateTime Time Stamp
VMSVehicleActionDocType VMSVehicleActionDocType Action Document Type
ConfigurationNumber ConfigurationNumber Int. object no.
VMSVehicleInterLinkingAction VMSVehicleInterLinkingAction Interlink. Actn
VMSVehicleAction VMSVehicleAction User action
VMSVehiclePrimActionControl VMSVehiclePrimActionControl Action Control
VMSVehicleOldPrimaryStatus VMSVehicleOldPrimaryStatus Primary Status
VMSVehicleNewPrimaryStatus VMSVehicleNewPrimaryStatus Primary Status
VMSVehicleSecdryActionControl VMSVehicleSecdryActionControl Action Control
VMSVehicleOldSecondaryStatus VMSVehicleOldSecondaryStatus Primary Status
VMSVehicleNewSecondaryStatus VMSVehicleNewSecondaryStatus Primary Status
VMSVehicleLocation _VMSVehicleLocation VMSVehicleLocation Vehicle Location
VMSVehicleCustomer VMSVehicleCustomer Stock customer
CreatedByUserName CreatedByUserName Person Resp.
_VMSVehOldPrimaryStatusText _VMSVehOldPrimaryStatusText
_VMSVehInterlinkingActionText _VMSVehInterlinkingActionText
_VMSVehNewPrimaryStatusText _VMSVehNewPrimaryStatusText
_VMSVehOldSecondaryStatusText _VMSVehOldSecondaryStatusText
_VMSVehNewSecondaryStatusText _VMSVehNewSecondaryStatusText
_VMSVehicleActionText _VMSVehicleActionText
_LocationText _LocationText
LogicalSystem I_SAPClient LogicalSystem Logical System

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 A_VMSVehicleHistory.
-- 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: AVMSVHIS

CREATE VIEW A_VMSVehicleHistory AS
SELECT
  VMSVehicleUUID,
  VMSVehicleActionDateTime,
  VMSVehicleActionDocType,
  ConfigurationNumber,
  VMSVehicleInterLinkingAction,
  VMSVehicleAction,
  VMSVehiclePrimActionControl,
  VMSVehicleOldPrimaryStatus,
  VMSVehicleNewPrimaryStatus,
  VMSVehicleSecdryActionControl,
  VMSVehicleOldSecondaryStatus,
  VMSVehicleNewSecondaryStatus,
  _VMSVehicleLocation.VMSVehicleLocation AS VMSVehicleLocation,
  VMSVehicleCustomer,
  CreatedByUserName,
  _SAPClient.LogicalSystem AS LogicalSystem
FROM I_VMSVehicleHistory
INNER JOIN I_SAPClient AS _SAPClient ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN A_VMSVehicleLocation AS _VMSVehicleLocation ON I_VMSVehicleHistory.VMSVehicleLocation = _VMSVehicleLocation.AddressNumber  -- association [0..1]
LEFT OUTER JOIN A_VMSVehicleStatusText AS _VMSVehOldPrimaryStatusText ON _VMSVehOldPrimaryStatusText.VMSVehicleStatus = VMSVehicleOldPrimaryStatus  -- association [1..*]
LEFT OUTER JOIN A_VMSVehicleStatusText AS _VMSVehNewPrimaryStatusText ON _VMSVehNewPrimaryStatusText.VMSVehicleStatus = VMSVehicleNewPrimaryStatus  -- association [1..*]
LEFT OUTER JOIN A_VMSVehicleStatusText AS _VMSVehOldSecondaryStatusText ON _VMSVehOldSecondaryStatusText.VMSVehicleStatus = VMSVehicleOldSecondaryStatus  -- association [1..*]
LEFT OUTER JOIN A_VMSVehicleStatusText AS _VMSVehNewSecondaryStatusText ON _VMSVehNewSecondaryStatusText.VMSVehicleStatus = VMSVehicleNewSecondaryStatus  -- association [1..*]
LEFT OUTER JOIN A_VMSVehicleActionText AS _VMSVehicleActionText ON _VMSVehicleActionText.VMSVehicleAction = VMSVehicleAction  -- association [1..*]
LEFT OUTER JOIN A_VMSVehicleActionText AS _VMSVehInterlinkingActionText ON _VMSVehInterlinkingActionText.VMSVehicleAction = VMSVehicleInterLinkingAction  -- association [1..*]
LEFT OUTER JOIN A_VMSVehicleLocationText AS _LocationText ON vmsvehiclelocation = _LocationText.VMSVehicleLocation  -- association [1..*]
LEFT OUTER JOIN E_VMSVehicleHistory AS _Extension ON VMSVehicleUUID = _Extension.VMSVehicleUUID AND VMSVehicleActionDateTime = _Extension.VMSVehicleActionDateTime  -- association [1..1]
;