DHCDC_RT_AccessPlanDetailBase

DDL: DHCDC_RT_ACCESSPLANDETAILBASE Type: view_entity Package: SADI_CDC_RT

Access Plan Details

DHCDC_RT_AccessPlanDetailBase is a CDS View that provides data about "Access Plan Details" in SAP S/4HANA. It reads from 3 data sources (dhcdc_rtacdprttn, dhcdc_rtcalcstat, DHCDC_RT_PortionInformation) and exposes 8 fields with key fields objname, objtype, acd_id, partition_id, acp_id. Part of development package SADI_CDC_RT.

Data Sources (3)

SourceAliasJoin Type
dhcdc_rtacdprttn acd from
dhcdc_rtcalcstat acp left_outer
DHCDC_RT_PortionInformation t1 left_outer

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Access Plan Details view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY objname objinfo objname
KEY objtype objinfo objtype
KEY acd_id dhcdc_rtacdprttn acd_id
KEY partition_id dhcdc_rtacdprttn partition_id
KEY acp_id dhcdc_rtcalcstat acp_id
status_acd dhcdc_rtacdprttn status_acd
status_acp dhcdc_rtcalcstat status_acp
portions DHCDC_RT_PortionInformation portions_count
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Access Plan Details'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
define view entity DHCDC_RT_AccessPlanDetailBase 
  as select from    dhcdc_rtacdprttn             as acd
   join            dhcdc_rtobjcalc              as objinfo   on acd.acd_id = objinfo.acd_id
    left outer join dhcdc_rtcalcstat             as acp       on  acd.acd_id       = acp.acd_id
                                                              and acd.partition_id = acp.partition_id
    left outer join DHCDC_RT_PortionInformation as t1        on  t1.subscriber_id = objinfo.subscriber_id
                                                              and t1.objname       = objinfo.objname
                                                              and t1.objtype       = objinfo.objtype
                                                              and t1.acp_id        = acp.acp_id
{
  key objinfo.subscriber_id,
  key objinfo.objname,
  key objinfo.objtype,
  key acd.acd_id,
  key acd.partition_id,
  key acp.acp_id,

      acd.status_acd,
      acp.status_acp,
      case
           when acd.status_acd = ''  then 'K'    // Status: Delimitation Not Started

           when acd.status_acd = 'S' or acd.status_acd = 'I' then 'L'    // Status: Delimitation in Progress

           when acd.status_acd = 'E' then 'M'    // Status: Delimitation Error

           when acd.status_acd = 'F' and acp.status_acp = '' then 'O'    // Status: Ready for Calculation

           when acp.status_acp = 'I' or acp.status_acp = 'S' then 'C'  // Status: In Calculation

           when acp.status_acp = 'E' then 'E'  // Status: Calculation Error

           when acp.status_acp = 'F' and
                t1.portion_finished + t1.portion_in_process + t1.portion_error = 0 then 'R' // Status: Ready for Transfer

           when acp.status_acp = 'F' and t1.portion_error > 0 then 'F'  // Status: Transfer Error

           when acp.status_acp = 'F' and
                t1.portion_finished = t1.portions_count then 'X' // Status: Transfer Finished

           when acp.status_acp = 'F' and
                (t1.portion_in_process > 0 or t1.portion_finished <> t1.portions_count) then 'T' // Status: In Transfer

           else '' // Status: undefined, probably ACP doesn't exists

      end                                                        as process_status_acp,
      t1.portions_count                                          as portions,
      t1.portion_finished,
      t1.portion_in_process,
      t1.portion_error
}