I_SftyCertApprovalSegment

DDL: I_SFTYCERTAPPROVALSEGMENT SQL: ISFTCRTAPVLSGMT Type: view BASIC

Approval History in Safety Certificate

I_SftyCertApprovalSegment is a Basic CDS View that provides data about "Approval History in Safety Certificate" in SAP S/4HANA. It reads from 2 data sources (I_SafetyCertificateBasic, wcagns) and exposes 23 fields with key fields SafetyCertificateInternalID, NumberOfSftyCertApprovals, SftyCertApprovalSegmentValue. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_SafetyCertificateBasic _SafetyCertificateBasic inner
wcagns wcagns from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_SafetyCertificateApproval _SafetyCertificateApproval _SafetyCertificateApproval.SafetyCertificateInternalID = $projection.SafetyCertificateInternalID and _SafetyCertificateApproval.NumberOfSftyCertApprovals = $projection.NumberOfSftyCertApprovals
[1..1] I_User _CreatedByUser _CreatedByUser.UserID = $projection.SftyCertApprovalEnteredByUser
[1..1] I_User _RejectByUser _RejectByUser.UserID = $projection.SftyCertApprovalDactvtdByUsr

Annotations (16)

NameValueLevelField
AbapCatalog.sqlViewName ISFTCRTAPVLSGMT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Approval History in Safety Certificate view
ObjectModel.representativeKey SftyCertApprovalSegmentValue view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
Search.searchable true view
UI.headerInfo.typeName Approval History view
UI.headerInfo.typeNamePlural Approvals History view
UI.headerInfo.title.type #STANDARD view
UI.headerInfo.title.label Approvals view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY SafetyCertificateInternalID wcagns objnr Val. Obj. No.
KEY NumberOfSftyCertApprovals wcagns counter Version
KEY SftyCertApprovalSegmentValue wcagns counters Counter
SafetyCertificate I_SafetyCertificateBasic SafetyCertificate WC Document
SftyCertApprovalEnteredByUser wcagns genname Approval Approved By
SftyCertApprovalEntryDate wcagns gendatum Created on
SftyCertApprovalEntryTime wcagns gentime Query Generation Time (Cache Invalidation)
clientNULLastimestampasApprovalDateTime
SftyCertApprovedFromDate wcagns genvdate App.fr date
SftyCertApprovedToDate wcagns genbdate App.to date
SftyCertApprovedFromTime wcagns genvtime Entered At
SftyCertApprovedToTime wcagns genbtime AppToTime
SftyCertApprovalDactvtdByUsr wcagns geniname Deactivated by
SftyCertApprvlDeactivationDate wcagns genidate Deactivated on
SftyCertApprvlDeactivationTime wcagns genitime Deactivated at
SftyCertApprvlSgmtIsInactive wcagns geniakt Permit inactive
SftyCertificateApprovalComment wcagns workpermitapprovalcomment Approval Comment
SftyCertificateSubobjectType I_SafetyCertificateBasic SftyCertificateSubobjectType Object Type
SftyCertApprovalDescription _SafetyCertificateApproval SftyCertApprovalDescription Permit Text
countersastdobnameelseendasTextObjectKey
_CreatedByUser _CreatedByUser
_RejectByUser _RejectByUser
_SafetyCertificateApproval _SafetyCertificateApproval

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_SftyCertApprovalSegment.
-- 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: ISFTCRTAPVLSGMT

CREATE VIEW I_SftyCertApprovalSegment AS
SELECT
  wcagns.objnr AS SafetyCertificateInternalID,
  wcagns.counter AS NumberOfSftyCertApprovals,
  wcagns.counters AS SftyCertApprovalSegmentValue,
  _SafetyCertificateBasic.SafetyCertificate AS SafetyCertificate,
  wcagns.genname AS SftyCertApprovalEnteredByUser,
  wcagns.gendatum AS SftyCertApprovalEntryDate,
  wcagns.gentime AS SftyCertApprovalEntryTime,
  cast( dats_tims_to_tstmp(wcagns.gendatum , wcagns.gentime, abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as timestamp ) as ApprovalDateTime AS clientNULLastimestampasApprovalDateTime,
  wcagns.genvdate AS SftyCertApprovedFromDate,
  wcagns.genbdate AS SftyCertApprovedToDate,
  wcagns.genvtime AS SftyCertApprovedFromTime,
  wcagns.genbtime AS SftyCertApprovedToTime,
  wcagns.geniname AS SftyCertApprovalDactvtdByUsr,
  wcagns.genidate AS SftyCertApprvlDeactivationDate,
  wcagns.genitime AS SftyCertApprvlDeactivationTime,
  wcagns.geniakt AS SftyCertApprvlSgmtIsInactive,
  wcagns.workpermitapprovalcomment AS SftyCertificateApprovalComment,
  _SafetyCertificateBasic.SftyCertificateSubobjectType AS SftyCertificateSubobjectType,
  _SafetyCertificateApproval.SftyCertApprovalDescription AS SftyCertApprovalDescription,
  case when _SafetyCertificateApproval.SftyCertHasLongText = 'X' or _SafetyCertificateApproval.SftyCertHasLongText = '' then cast (concat( concat(wcagns.objnr, wcagns.counter ),wcagns.counters ) as tdobname ) else '' end as TextObjectKey AS countersastdobnameelseendasTextObjectKey
FROM wcagns
INNER JOIN I_SafetyCertificateBasic AS _SafetyCertificateBasic ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SafetyCertificateApproval AS _SafetyCertificateApproval ON _SafetyCertificateApproval.SafetyCertificateInternalID = SafetyCertificateInternalID AND _SafetyCertificateApproval.NumberOfSftyCertApprovals = NumberOfSftyCertApprovals  -- association [1..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON _CreatedByUser.UserID = SftyCertApprovalEnteredByUser  -- association [1..1]
LEFT OUTER JOIN I_User AS _RejectByUser ON _RejectByUser.UserID = SftyCertApprovalDactvtdByUsr  -- association [1..1]
;