I_CustomCDSViewRework

DDL: I_CUSTOMCDSVIEWREWORK Type: view_entity Package: SAPS_CCV_DB

Custom CDS View Rework - raw name

I_CustomCDSViewRework is a CDS View that provides data about "Custom CDS View Rework - raw name" in SAP S/4HANA. It reads from 2 data sources (dd02b, atov_bom_rework_demand) and exposes 12 fields with key field EntityName. It has 2 associations to related views. Part of development package SAPS_CCV_DB.

Data Sources (2)

SourceAliasJoin Type
dd02b _EntityHeader from
atov_bom_rework_demand bom inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_CCV_REWORK_TASK_PRIORITY_VH _TaskPriority _TaskPriority.CodeInt = bom.Highest_Priority
[0..1] I_CCV_REWORK_TASK_CATEGORY_VH _TaskCategory _TaskCategory.Code = bom.Rework_Category

Annotations (2)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Custom CDS View Rework - raw name view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY EntityName dd02b strucobjn_raw
ItemType atov_bom_rework_demand item_type
ItemId atov_bom_rework_demand item_id
ReworkIndicator Rework
HighestPriority
HighestPrioritySortOrder atov_bom_rework_demand Highest_Priority_Sort_Order
HighestPriorityText _TaskPriority Description Task Priority
PriorityText atov_bom_rework_demand Priority_Text
Category
CategoryText atov_bom_rework_demand Rework_Category_Text
_TaskPriority _TaskPriority
_TaskCategory _TaskCategory
// ------------------------------------------------------------------------------------------------------------------------------------

// Note

// In case of changes, these must also be made in  => I_CustomCDSViewRework_KeyUpper (used in our value helps of data sources)

// 

// Only the key is different. In our Value Helps we need the UpperCase name, otherwise the CamelCase name

// ------------------------------------------------------------------------------------------------------------------------------------


@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Custom CDS View Rework - raw name'

define view entity I_CustomCDSViewRework
  
  as select from dd02b as _EntityHeader

  inner join atov_bom_rework_demand as bom on  bom.pgmid = 'R3TR'
                                           and bom.object = 'DDLS'   
                                           and bom.object_name = _EntityHeader.strucobjn
                                               and (    bom.item_type = 'CKE'
                                                     or bom.item_type = 'SCBO'
                                                     or bom.item_type = 'SCCL' )
 
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to I_CCV_REWORK_TASK_PRIORITY_VH as _TaskPriority on _TaskPriority.CodeInt = bom.Highest_Priority
  association [0..1] to I_CCV_REWORK_TASK_CATEGORY_VH as _TaskCategory on _TaskCategory.Code = bom.Rework_Category
{

  key _EntityHeader.strucobjn_raw                                              as EntityName,
      bom.item_type                                                            as ItemType,
      bom.item_id                                                              as ItemId,
      @EndUserText.label: 'Rework'
      @Consumption.filter : { selectionType: #SINGLE,  multipleSelections : false}
      cast( bom.Rework as aps_ccv_rework_ind preserving type )                 as ReworkIndicator,
      @ObjectModel.text.element: ['HighestPriorityText']
      cast( bom.Highest_Priority  as aps_ccv_r_task_priority preserving type ) as HighestPriority,
      bom.Highest_Priority_Sort_Order                                          as HighestPrioritySortOrder,
      @EndUserText.label: 'Task Priority'
      @ObjectModel: { foreignKey.association: '_TaskPriority', readOnly: true }
      @Consumption.valueHelpDefinition: [{entity: {name: 'I_CCV_REWORK_TASK_PRIORITY_VH', element: 'Description' } }]      
      _TaskPriority.Description                                                as HighestPriorityText,
      bom.Priority_Text                                                        as PriorityText,
      cast( bom.Rework_Category as aps_ccv_r_task_category preserving type )   as Category,
      @Consumption.valueHelpDefinition: [{entity: {name: 'I_CCV_REWORK_TASK_CATEGORY_VH', element: 'Description' } }]      
      bom.Rework_Category_Text                                                 as CategoryText,

      _TaskPriority,
      _TaskCategory

}
where
  _EntityHeader.as4local = 'A';