ATOV_REWORK_DEMAND_BASE

DDL: ATOV_REWORK_DEMAND_BASE SQL: ATO_V_RWK_DMNDB Type: view

Rework Demand Base View

ATOV_REWORK_DEMAND_BASE is a CDS View that provides data about "Rework Demand Base View" in SAP S/4HANA. It reads from 1 data source (ATOV_REWORK_DEMAND_SUB_BASE) and exposes 7 fields with key fields Item_Id, Item_Type. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
ATOV_REWORK_DEMAND_SUB_BASE Task from

Associations (3)

CardinalityTargetAliasCondition
[1] ATOV_REWORK_TASK_PRIORITY Priority_Text Priority_Text.Code = Task.Highest_Priority_Code
[1] ATOV_REWORK_TASK_CATEGORY_CNT Number_Of_Categories Number_Of_Categories.item_id = Task.Item_Id and Number_Of_Categories.item_type = Task.Item_Type and Number_Of_Categories.priority = Task.Highest_Priority
[1] ATOV_REWORK_TASK_BASE Single_Category Single_Category.item_id = Task.Item_Id and Single_Category.item_type = Task.Item_Type and Single_Category.priority = Task.Highest_Priority

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName ATO_V_RWK_DMNDB view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.type #INHERITED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Rework Demand Base View view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY Item_Id ATOV_REWORK_DEMAND_SUB_BASE Item_Id Simulation Item ID
KEY Item_Type ATOV_REWORK_DEMAND_SUB_BASE Item_Type Type
Highest_Priority ATOV_REWORK_DEMAND_SUB_BASE Highest_Priority
Priority_Code ATOV_REWORK_DEMAND_SUB_BASE Highest_Priority_Code
Priority_Text Priority_Text Description Well Code Des.
Number_Of_Tasks0thenendasRework
categoryendasRework_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 ATOV_REWORK_DEMAND_BASE.
-- 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: ATO_V_RWK_DMNDB

CREATE VIEW ATOV_REWORK_DEMAND_BASE AS
SELECT
  Task.Item_Id AS Item_Id,
  Task.Item_Type AS Item_Type,
  Task.Highest_Priority AS Highest_Priority,
  Task.Highest_Priority_Code AS Priority_Code,
  Priority_Text.Description AS Priority_Text,
  case when Task.Number_Of_Tasks > 0 then 'X' when Task.Number_Of_Tasks = 0 then '' end as Rework AS Number_Of_Tasks0thenendasRework,
  case when Number_Of_Categories.Number_Of_Categories > 1 then 'MULTIPLE' else Single_Category.category end as Rework_Category AS categoryendasRework_Category
FROM ATOV_REWORK_DEMAND_SUB_BASE AS Task
LEFT OUTER JOIN ATOV_REWORK_TASK_PRIORITY AS Priority_Text ON Priority_Text.Code = Task.Highest_Priority_Code  -- association [1]
LEFT OUTER JOIN ATOV_REWORK_TASK_CATEGORY_CNT AS Number_Of_Categories ON Number_Of_Categories.item_id = Task.Item_Id AND Number_Of_Categories.item_type = Task.Item_Type AND Number_Of_Categories.priority = Task.Highest_Priority  -- association [1]
LEFT OUTER JOIN ATOV_REWORK_TASK_BASE AS Single_Category ON Single_Category.item_id = Task.Item_Id AND Single_Category.item_type = Task.Item_Type AND Single_Category.priority = Task.Highest_Priority  -- association [1]
;