P_GMAVCData

DDL: P_GMAVCDATA SQL: PGMAVCDATA Type: view BASIC

P_GMAVCData is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (P_GMAVCT_Compat, gmgr) and exposes 15 fields with key fields rbukrs, rrcty, rldnr, ryear, grantee_fy_9.

Data Sources (2)

SourceAliasJoin Type
P_GMAVCT_Compat AVC from
gmgr MD inner

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PGMAVCDATA view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.sizeCategory #L view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY rbukrs rbukrs
KEY rrcty rrcty
KEY rldnr rldnr
KEY ryear ryear
KEY grantee_fy_9 grantee_fy_9
KEY ceffyear_9 ceffyear_9
KEY rgrant_nbr rgrant_nbr
KEY rfund rfund
KEY alloctype_9 alloctype_9
KEY wfstate_9 wfstate_9
KEY rtcur rtcur
curr242endasHSLAmount1
curr242endasHSLAmount0
curr242endasTSLAmount1
curr242endasTSLAmount0
@AbapCatalog.sqlViewName: 'PGMAVCDATA'
@ClientHandling.algorithm: #SESSION_VARIABLE //Inserted by VDM CDS Suite Plugin

@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality:  #P
@ObjectModel.usageType.sizeCategory: #L //Inserted by VDM CDS Suite Plugin

@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
//@EndUserText.label: 'GM Overall AVC Data'

define view P_GMAVCData as select from  P_GMAVCT_Compat as AVC 
  
    inner join gmgr as MD on  MD.grant_nbr    = AVC.rgrant_nbr
                     
{
  key rbukrs,
  key rrcty,
  key rldnr,
  key ryear,        //Sponsor fiscal year

  key grantee_fy_9, //Company Code fiscal year

  key ceffyear_9,   //not used

  key rgrant_nbr,
  key rfund,
  key rsponsored_prog,
  key rsponsored_class,
  key rbdgt_vldty_nbr,
  key alloctype_9,
  key wfstate_9,
  key rtcur, //Grant currency (for TSL fields); HSL fields use Company Code currency


      case rrcty when '0'
           then cast(0 as abap.curr(24,2))
           else cast((hsl01 + hsl02 +
                      hsl03 + hsl04 +
                      hsl05 + hsl06 +
                      hsl07 + hsl08 +
                      hsl09 + hsl10 +
                      hsl11 + hsl12 +
                      hsl13 + hsl14 +
                      hsl15 + hsl16) as abap.curr(24,2))
           end  as HSLAmount1,

      case rrcty when '0'
           then cast((hsl01 + hsl02 +
                      hsl03 + hsl04 +
                      hsl05 + hsl06 +
                      hsl07 + hsl08 +
                      hsl09 + hsl10 +
                      hsl11 + hsl12 +
                      hsl13 + hsl14 +
                      hsl15 + hsl16) as abap.curr(24,2))
           else cast(0 as abap.curr(24,2))
           end  as HSLAmount0,

      case rrcty when '0'
           then cast(0 as abap.curr(24,2))
           else cast((tsl01 + tsl02 +
                      tsl03 + tsl04 +
                      tsl05 + tsl06 +
                      tsl07 + tsl08 +
                      tsl09 + tsl10 +
                      tsl11 + tsl12 +
                      tsl13 + tsl14 +
                      tsl15 + tsl16) as abap.curr(24,2))
           end  as TSLAmount1,

      case rrcty when '0'
           then cast((tsl01 + tsl02 +
                      tsl03 + tsl04 +
                      tsl05 + tsl06 +
                      tsl07 + tsl08 +
                      tsl09 + tsl10 +
                      tsl11 + tsl12 +
                      tsl13 + tsl14 +
                      tsl15 + tsl16) as abap.curr(24,2))
           else cast(0 as abap.curr(24,2))
           end  as TSLAmount0

}


 where 
      (
      AVC.wfstate_9 = 'P' or
      AVC.wfstate_9 = 'R'
      )