I_BUS_RULE_MAIN

DDL: I_BUS_RULE_MAIN SQL: BUS_RULE1 Type: view Package: S_ILM_BUS_RULES_MANAGE

CDS Test for rules

I_BUS_RULE_MAIN is a CDS View that provides data about "CDS Test for rules" in SAP S/4HANA. It reads from 4 data sources (lrm_t_con_t, lrm_bus_rule_det, lrm_t_con_t, lrm_bus_rule_txt) and exposes 10 fields with key field rule_id. It has 2 associations to related views. Part of development package S_ILM_BUS_RULES_MANAGE.

Data Sources (4)

SourceAliasJoin Type
lrm_t_con_t c inner
lrm_bus_rule_det d inner
lrm_t_con_t l inner
lrm_bus_rule_txt t left_outer

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_Rule_Purpose _Purpose $projection.rule_id = _Purpose.rule_id
[0..*] I_Genrules _GenRules $projection.rule_id = _GenRules.RuleId

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName BUS_RULE1 view
AbapCatalog.compiler.compareFilter true view
ClientDependent true view
EndUserText.label CDS Test for rules view
ObjectModel.writeActivePersistence lrm_bus_rule view
ObjectModel.createEnabled true view
ObjectModel.deleteEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.compositionRoot true view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY rule_id r rule_id Rule ID
start_date r rule_start_date DeterStartDate
end_date r rule_end_date DeterminEndDate
rule_status r rule_status
createPurpose
auth_grp r auth_group AuthorizGroup
ret_unit
res_unit
_Purpose _Purpose
_GenRules _GenRules

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_BUS_RULE_MAIN.
-- 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: BUS_RULE1

CREATE VIEW I_BUS_RULE_MAIN AS
SELECT
  r.rule_id AS rule_id,
  r.rule_start_date AS start_date,
  r.rule_end_date AS end_date,
  r.rule_status AS rule_status,
  cast('' as lrm_purpose) AS createPurpose,
  r.auth_group AS auth_grp,
  cast(l.constant_value_t as lrm_retention_unit_t) AS ret_unit,
  cast(c.constant_value_t as lrm_residence_unit_t) AS res_unit
INNER JOIN lrm_bus_rule_det AS d ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN lrm_bus_rule_txt AS t ON /* join condition not captured in parsed metadata */
INNER JOIN lrm_t_con_t AS c ON /* join condition not captured in parsed metadata */
INNER JOIN lrm_t_con_t AS l ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Rule_Purpose AS _Purpose ON rule_id = _Purpose.rule_id  -- association [0..*]
LEFT OUTER JOIN I_Genrules AS _GenRules ON rule_id = _GenRules.RuleId  -- association [0..*]
;