R_BatchCharacteristicValueTP

DDL: R_BATCHCHARACTERISTICVALUETP Type: view_entity TRANSACTIONAL

Batch Characteristics Valuation

R_BatchCharacteristicValueTP is a Transactional CDS View that provides data about "Batch Characteristics Valuation" in SAP S/4HANA. It reads from 2 data sources (I_BatchDistinct, I_ClfnObjectCharcValForKeyDate) and exposes 25 fields with key fields Material, BatchIdentifyingPlant, Batch, CharcInternalID, ClfnCharcValuePositionNumber.

Data Sources (2)

SourceAliasJoin Type
I_BatchDistinct Batch inner
I_ClfnObjectCharcValForKeyDate I_ClfnObjectCharcValForKeyDate from

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Batch Characteristics Valuation view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY Material I_BatchDistinct Material
KEY BatchIdentifyingPlant I_BatchDistinct Plant
KEY Batch I_BatchDistinct Batch
KEY CharcInternalID ObjectCharcValue CharcInternalID
KEY ClfnCharcValuePositionNumber ObjectCharcValue CharcValuePositionNumber
CharcValueIntervalType ObjectCharcValue CharcValueDependency
CharcValue ObjectCharcValue CharcValue
CharcFromNumericValue ObjectCharcValue CharcFromNumericValue
CharcFromNumericValueUnit ObjectCharcValue CharcFromNumericValueUnit
CharcToNumericValue ObjectCharcValue CharcToNumericValue
CharcToNumericValueUnit ObjectCharcValue CharcToNumericValueUnit
CharcFromDecimalValue ObjectCharcValue CharcFromDecimalValue
CharcToDecimalValue ObjectCharcValue CharcToDecimalValue
CharcFromAmount ObjectCharcValue CharcFromAmount
CharcToAmount ObjectCharcValue CharcToAmount
Currency ObjectCharcValue Currency
CharcFromDate ObjectCharcValue CharcFromDate
CharcToDate ObjectCharcValue CharcToDate
CharcFromTime ObjectCharcValue CharcFromTime
CharcToTime ObjectCharcValue CharcToTime
CharcAuthor ObjectCharcValue CharacteristicAuthor
_BatchCharacteristicTP _BatchCharacteristicTP
_BatchTP _BatchTP
ClassType
_ClfnCharacteristic ObjectCharcValue _Characteristic
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED

@EndUserText.label: 'Batch Characteristics Valuation'

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #MIXED}

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

define view entity R_BatchCharacteristicValueTP
  as select from I_ClfnObjectCharcValForKeyDate(P_KeyDate: $session.system_date) as ObjectCharcValue
    inner join   I_BatchDistinct                                                 as Batch on ObjectCharcValue.ClfnObjectInternalID = Batch.ClfnObjectInternalID

  association to parent R_BatchCharacteristicTP as _BatchCharacteristicTP on  $projection.Material              = _BatchCharacteristicTP.Material
                                                                          and $projection.BatchIdentifyingPlant = _BatchCharacteristicTP.BatchIdentifyingPlant
                                                                          and $projection.Batch                 = _BatchCharacteristicTP.Batch
                                                                          and $projection.CharcInternalID       = _BatchCharacteristicTP.CharcInternalID

  -- needed for dependent locking in BDEF
  association to 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,
  key ObjectCharcValue.CharcInternalID,
  key ObjectCharcValue.CharcValuePositionNumber as ClfnCharcValuePositionNumber,

      ObjectCharcValue.CharcValueDependency     as CharcValueIntervalType,
      ObjectCharcValue.CharcValue,
      ObjectCharcValue.CharcFromNumericValue,
      ObjectCharcValue.CharcFromNumericValueUnit,
      ObjectCharcValue.CharcToNumericValue,
      ObjectCharcValue.CharcToNumericValueUnit,
      ObjectCharcValue.CharcFromDecimalValue,
      ObjectCharcValue.CharcToDecimalValue,
      @Semantics.amount.currencyCode: 'Currency'
      ObjectCharcValue.CharcFromAmount,
      @Semantics.amount.currencyCode: 'Currency'
      ObjectCharcValue.CharcToAmount,
      ObjectCharcValue.Currency,
      ObjectCharcValue.CharcFromDate,
      ObjectCharcValue.CharcToDate,
      ObjectCharcValue.CharcFromTime,
      ObjectCharcValue.CharcToTime,
      ObjectCharcValue.CharacteristicAuthor     as CharcAuthor,

      case when Batch.LastChangeDateTime = 0 or Batch.LastChangeDateTime is null
        then cast('20170331120000' as lobm_last_changed)
        else Batch.LastChangeDateTime
      end                                       as LastChangeDateTime,

      _BatchCharacteristicTP,
      _BatchTP,

      --Needed for DCL inheritance
      @Consumption.hidden: true
      ObjectCharcValue.ClassType,
      @Consumption.hidden: true
      ObjectCharcValue._Characteristic as _ClfnCharacteristic
}
where
       ObjectCharcValue.ClfnObjectType  = 'O'
  and(
       ObjectCharcValue.ClfnObjectTable = 'MCH1'
    or ObjectCharcValue.ClfnObjectTable = 'MCHA'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BATCHDISTINCT",
"I_CLFNOBJECTCHARCVALFORKEYDATE"
],
"ASSOCIATED":
[
"I_CLFNCHARACTERISTICFORKEYDATE",
"R_BATCHCHARACTERISTICTP",
"R_BATCHTP"
],
"BASE":
[
"I_CLFNOBJECTCHARCVALFORKEYDATE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/