R_BatchClassTP

DDL: R_BATCHCLASSTP Type: view_entity TRANSACTIONAL

Batch Class Assignment

R_BatchClassTP is a Transactional CDS View that provides data about "Batch Class Assignment" in SAP S/4HANA. It reads from 2 data sources (I_BatchDistinct, I_ClfnObjectClassForKeyDate) and exposes 7 fields with key fields Material, BatchIdentifyingPlant, Batch.

Data Sources (2)

SourceAliasJoin Type
I_BatchDistinct Batch inner
I_ClfnObjectClassForKeyDate I_ClfnObjectClassForKeyDate from

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Batch Class Assignment view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY Material I_BatchDistinct Material
KEY BatchIdentifyingPlant I_BatchDistinct Plant
KEY Batch I_BatchDistinct Batch
ClassInternalID ObjectClass ClassInternalID
ClassType ObjectClass ClassType
_Class ObjectClass _Class
_BatchTP _BatchTP
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED

@EndUserText.label: 'Batch Class Assignment'

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #MIXED}

@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API

define view entity R_BatchClassTP
  as select from I_ClfnObjectClassForKeyDate(P_KeyDate: $session.system_date) as ObjectClass
    inner join I_BatchDistinct as Batch
      on ObjectClass.ClfnObjectInternalID = Batch.ClfnObjectInternalID
        
    association to parent R_BatchTP as _BatchTP on
      $projection.Material              = _BatchTP.Material and
      $projection.BatchIdentifyingPlant = _BatchTP.BatchIdentifyingPlant and
      $projection.Batch                 = _BatchTP.Batch
  {
    key Batch.Material, 
    key Batch.Plant as BatchIdentifyingPlant,
    key Batch.Batch, 
    
    ObjectClass.ClassInternalID,
    
    case when Batch.LastChangeDateTime = 0 or Batch.LastChangeDateTime is null
      then cast('20170331120000' as lobm_last_changed)
      else Batch.LastChangeDateTime
    end as LastChangeDateTime,

    @Consumption.hidden: true
    ObjectClass.ClassType,
    @Consumption.hidden: true
    ObjectClass._Class,
        
    _BatchTP
  }
  where
    ObjectClass.ClfnObjectTable = 'MCH1' or ObjectClass.ClfnObjectTable = 'MCHA'