FINCS_UH_SALESORGHIER

DDL: FINCS_UH_SALESORGHIER SQL: FINCS_UH_CS11H Type: view Package: FIN_CS_UH_INTEGRATION

Universal Hierarchy Sales Organization Hierarchy

FINCS_UH_SALESORGHIER is a CDS View that provides data about "Universal Hierarchy Sales Organization Hierarchy" in SAP S/4HANA. It reads from 2 data sources (uhdt_hier, uhdt_vrsn) and exposes 11 fields. It has 1 association to related views. Part of development package FIN_CS_UH_INTEGRATION.

Data Sources (2)

SourceAliasJoin Type
uhdt_hier hier left_outer
uhdt_vrsn version from

Associations (1)

CardinalityTargetAliasCondition
[1..1] fac_cds_uh_category to_category $projection.HierarchyCategory = to_category.CategoryKey

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName FINCS_UH_CS11H view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
EndUserText.label Universal Hierarchy Sales Organization Hierarchy view

Fields (11)

KeyFieldSource TableSource FieldDescription
VersionId uhdt_vrsn ver_id Version ID
ValidityStartDate uhdt_vrsn ver_vldfm Valid From
ValidityEndDate uhdt_vrsn ver_vldto Valid To
VersionMessage uhdt_vrsn ver_msg Note
ver_statusendasVersionStatus
VersionStatusText
HierarchyCategory uhdt_vrsn hier_catg Type
HierarchyId uhdt_vrsn hier_hid Hierarchy ID
HierarchyText uhdt_hier hier_desc Description
HierarchyVersionText
to_category to_category

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 FINCS_UH_SALESORGHIER.
-- 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: FINCS_UH_CS11H

CREATE VIEW FINCS_UH_SALESORGHIER AS
SELECT
  version.ver_id AS VersionId,
  version.ver_vldfm AS ValidityStartDate,
  version.ver_vldto AS ValidityEndDate,
  version.ver_msg AS VersionMessage,
  case when ( ver_status = 'R' or ver_status = 'A' ) and locked_by = $session.user then 'I' else version.ver_status end as VersionStatus AS ver_statusendasVersionStatus,
  cast( '' as vrstxt) AS VersionStatusText,
  version.hier_catg AS HierarchyCategory,
  version.hier_hid AS HierarchyId,
  hier.hier_desc AS HierarchyText,
  cast( concat(concat(version.hier_hid, concat(' (',version.ver_vldfm) ), concat(concat('~',version.ver_vldto), ')') ) as vhdec) AS HierarchyVersionText,
  to_category
FROM uhdt_vrsn AS version
LEFT OUTER JOIN uhdt_hier AS hier 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]
;