I_CaseReasons

DDL: I_CASEREASONS SQL: ICASEREASONS Type: view BASIC Package: SRM_GENERAL_VIEWS

Case Reasons

I_CaseReasons (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.

Sales

I_CaseReasons is a Basic CDS View that provides data about "Case Reasons" in SAP S/4HANA. It reads from 1 data source (scmgattr_reason) and exposes 4 fields with key fields CaseType, CaseReason. It has 2 associations to related views. Part of development package SRM_GENERAL_VIEWS.

SAP API Hub

CategoryBasic
StateC1
Line of BusinessSales
Application ComponentBC-SRV-CM
Extensible (Key User)No
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Not Released
PackageSales for SAP S/4HANA Cloud Public Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
scmgattr_reason scmgattr_reason from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_Casetypes _CaseType $projection.CaseType = _CaseType.CaseType
[0..*] I_CaseReasonsText _Text $projection.CaseType = _Text.CaseType and $projection.CaseReason = _Text.CaseReason

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName ICASEREASONS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Case Reasons view
VDM.viewType #BASIC view
ObjectModel.representativeKey CaseReason view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY CaseType scmgattr_reason case_type Usage Type
KEY CaseReason scmgattr_reason reason_code Return/Change Reason
_CaseType _CaseType
_Text _Text

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_CaseReasons.
-- 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: ICASEREASONS

CREATE VIEW I_CaseReasons AS
SELECT
  scmgattr_reason.case_type AS CaseType,
  scmgattr_reason.reason_code AS CaseReason
FROM scmgattr_reason
LEFT OUTER JOIN I_Casetypes AS _CaseType ON CaseType = _CaseType.CaseType  -- association [0..1]
LEFT OUTER JOIN I_CaseReasonsText AS _Text ON CaseType = _Text.CaseType AND CaseReason = _Text.CaseReason  -- association [0..*]
;