fac_cds_uh_version

DDL: FAC_CDS_UH_VERSION SQL: FACV_UH_VRSN Type: view Package: UH_CORE

Universal Hierarchy Version

fac_cds_uh_version is a CDS View that provides data about "Universal Hierarchy Version" in SAP S/4HANA. It reads from 5 data sources (uhdt_job_log, uhdt_job_log, uhdt_hier, uhdt_hid, uhdt_vrsn) and exposes 39 fields with key field VersionId. It has 6 associations to related views. It is exposed through 13 OData services (ASQL_F2918, ASQL_F4359, ASQL_F4966, ...). Part of development package UH_CORE.

Data Sources (5)

SourceAliasJoin Type
uhdt_job_log actjob left_outer
uhdt_job_log downloadjob left_outer
uhdt_hier h left_outer
uhdt_hid hid left_outer
uhdt_vrsn v from

Associations (6)

CardinalityTargetAliasCondition
[1..1] fac_cds_uh_category to_category $projection.HierarchyCategory = to_category.CategoryKey
[1..*] fac_cds_uh_node to_node $projection.calVersionId = to_node.VersionId
[1..*] fac_cds_uh_clfd_value to_clfd_value $projection.VersionId = to_clfd_value.ObjectId
[1..1] fac_cds_uh_futb_hd_multiattr to_merged_attrvals $projection.VersionId = to_merged_attrvals.Ver_Id
[0..*] FAC_CDS_UH_CD to_changelog $projection.VersionId = to_changelog.VersionId
[1..1] FAC_CDS_FUNCTBL_VRSN_MULTITAG to_vrsntag $projection.VersionId = to_vrsntag.ver_id

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName FACV_UH_VRSN view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Universal Hierarchy Version view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view

OData Services (13)

ServiceBindingVersionContractRelease
ASQL_F2918 ASQL_F2918 C2 NOT_RELEASED
ASQL_F4359 ASQL_F4359 C2 NOT_RELEASED
ASQL_F4966 ASQL_F4966 C2 NOT_RELEASED
ASQL_F4973 ASQL_F4973 C2 NOT_RELEASED
ASQL_F5794 ASQL_F5794 C2 NOT_RELEASED
ASQL_F6748 ASQL_F6748 C2 NOT_RELEASED
ASQL_F7781 ASQL_F7781 C2 NOT_RELEASED
ASQL_F7782 ASQL_F7782 C2 NOT_RELEASED
ASQL_F7783 ASQL_F7783 C2 NOT_RELEASED
ASQL_F7898 ASQL_F7898 C2 NOT_RELEASED
ASQL_F7995 ASQL_F7995 C2 NOT_RELEASED
ASQL_F8219 ASQL_F8219 C2 NOT_RELEASED
ASQL_F8220 ASQL_F8220 C2 NOT_RELEASED

Fields (39)

KeyFieldSource TableSource FieldDescription
KEY VersionId uhdt_vrsn ver_id Version ID
VersionParentId ver_pid Parent Version ID
ValidityStartDate ver_vldfm Valid From
ValidityEndDate ver_vldto Valid To
VersionMessage ver_msg Note
VersionNumber ver_nbr Version Number
VersionIndex ver_idx Version Sequence Ind
HierarchyId uhdt_vrsn hier_hid Hierarchy ID
HierarchyCategory uhdt_vrsn hier_catg Type
UpdatedAt uhdt_vrsn updated_at Version Update Time
UpdatedBy uhdt_vrsn updated_by Version Updated By
CreatedAt uhdt_vrsn created_at Uploaded On
CreatedBy uhdt_vrsn created_by Version Created By
HierarchyNodeIsTimeDependent uhdt_vrsn node_timedep
HierarchyText uhdt_hier hier_desc Description
clientNULLasCreatedOn
LockedBy locked_by User Name
LockedAt locked_at Version Locked At
AllowLegacyTCodeUsage allow_legacy_tcode_usage Use By Legacy TCode
ver_idendascalVersionId
CategoryText to_category CategoryText
AttributeValues to_merged_attrvals AttributeValues
MAINTENANCE_LANG maintenance_lang Language
to_node to_node
to_category to_category
to_changelog to_changelog
HierarchyTags
HierarchyTagsText to_vrsntag hier_tagst
to_vrsntag to_vrsntag
IsPrivate uhdt_hid isprivate Private Hierarchy
ViaJob
ActJobName uhdt_job_log jobname Name of Send Process
ActJobCount uhdt_job_log jobcount Job number
ActJobStatus uhdt_job_log status Workflow Status
ActJobAction uhdt_job_log action User action
DownloadJobName uhdt_job_log jobname Name of Send Process
DownloadJobCount uhdt_job_log jobcount Job number
DownloadJobStatus uhdt_job_log status Workflow Status
DownloadJobAction uhdt_job_log action User action

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 fac_cds_uh_version.
-- 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: FACV_UH_VRSN

CREATE VIEW fac_cds_uh_version AS
SELECT
  v.ver_id AS VersionId,
  ver_pid AS VersionParentId,
  ver_vldfm AS ValidityStartDate,
  ver_vldto AS ValidityEndDate,
  ver_msg AS VersionMessage,
  ver_nbr AS VersionNumber,
  ver_idx AS VersionIndex,
  v.hier_hid AS HierarchyId,
  v.hier_catg AS HierarchyCategory,
  v.updated_at AS UpdatedAt,
  v.updated_by AS UpdatedBy,
  v.created_at AS CreatedAt,
  v.created_by AS CreatedBy,
  v.node_timedep AS HierarchyNodeIsTimeDependent,
  h.hier_desc AS HierarchyText,
  tstmp_to_dats( v.created_at, abap_user_timezone( $session.user,$session.client,'NULL' ), $session.client, 'NULL' ) as CreatedOn AS clientNULLasCreatedOn,
  locked_by AS LockedBy,
  locked_at AS LockedAt,
  allow_legacy_tcode_usage AS AllowLegacyTCodeUsage,
  case when locked_by <> '' and locked_by <> $session.user then concat(v.ver_id, 'T') else v.ver_id end as calVersionId AS ver_idendascalVersionId,
  to_category.CategoryText AS CategoryText,
  to_merged_attrvals.AttributeValues AS AttributeValues,
  MAINTENANCE_LANG,
  to_node,
  to_category,
  to_changelog,
  concat(concat(',',to_vrsntag.hier_tags),',') AS HierarchyTags,
  to_vrsntag.hier_tagst AS HierarchyTagsText,
  to_vrsntag,
  hid.isprivate AS IsPrivate,
  '' AS ViaJob,
  actjob.jobname AS ActJobName,
  actjob.jobcount AS ActJobCount,
  actjob.status AS ActJobStatus,
  actjob.action AS ActJobAction,
  downloadjob.jobname AS DownloadJobName,
  downloadjob.jobcount AS DownloadJobCount,
  downloadjob.status AS DownloadJobStatus,
  downloadjob.action AS DownloadJobAction
FROM uhdt_vrsn AS v
LEFT OUTER JOIN uhdt_hier AS h ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN uhdt_hid AS hid ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN uhdt_job_log AS actjob ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN uhdt_job_log AS downloadjob ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN fac_cds_uh_category AS to_category ON HierarchyCategory = to_category.CategoryKey  -- association [1..1]
LEFT OUTER JOIN fac_cds_uh_node AS to_node ON calVersionId = to_node.VersionId  -- association [1..*]
LEFT OUTER JOIN fac_cds_uh_clfd_value AS to_clfd_value ON VersionId = to_clfd_value.ObjectId  -- association [1..*]
LEFT OUTER JOIN fac_cds_uh_futb_hd_multiattr AS to_merged_attrvals ON VersionId = to_merged_attrvals.Ver_Id  -- association [1..1]
LEFT OUTER JOIN FAC_CDS_UH_CD AS to_changelog ON VersionId = to_changelog.VersionId  -- association [0..*]
LEFT OUTER JOIN FAC_CDS_FUNCTBL_VRSN_MULTITAG AS to_vrsntag ON VersionId = to_vrsntag.ver_id  -- association [1..1]
;