I_ChangeRecdRefTmplRoutingTP_2

DDL: I_CHANGERECDREFTMPLROUTINGTP_2 SQL: ICRREFTMPLRTGTP2 Type: view TRANSACTIONAL

Change Record Reference Object Template Routing

I_ChangeRecdRefTmplRoutingTP_2 is a Transactional CDS View that provides data about "Change Record Reference Object Template Routing" in SAP S/4HANA. It reads from 1 data source (I_ChgRecdRefTmplRoutingBsc) and exposes 17 fields with key field ChangeRecordReferenceUUID. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_ChgRecdRefTmplRoutingBsc reference_template_routing from

Associations (1)

CardinalityTargetAliasCondition
[0..1] E_ChgRecdRefTmplRoutingBsc _TmplRoutingExtension $projection.ChangeRecordReferenceUUID = _TmplRoutingExtension.ChangeRecordReferenceUUID

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName ICRREFTMPLRTGTP2 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.preserveKey true view
VDM.viewType #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XXL view
EndUserText.label Change Record Reference Object Template Routing view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY ChangeRecordReferenceUUID I_ChgRecdRefTmplRoutingBsc ChangeRecordReferenceUUID
ChangeRecordUUID I_ChgRecdRefTmplRoutingBsc ChangeRecordUUID
ChangeRecord I_ChgRecdRefTmplRoutingBsc ChangeRecord
ChangeRecordReferenceType I_ChgRecdRefTmplRoutingBsc ChangeRecordReferenceType
ChangeRecordReferenceSubtype I_ChgRecdRefTmplRoutingBsc ChangeRecordReferenceSubtype
ChangeRecordRefObjectUUID I_ChgRecdRefTmplRoutingBsc ChangeRecordRefObjectUUID
ChangeRecordReference I_ChgRecdRefTmplRoutingBsc ChangeRecordReference
ParentChangeRecordRefUUID I_ChgRecdRefTmplRoutingBsc ParentChangeRecordRefUUID
IsMainReference I_ChgRecdRefTmplRoutingBsc IsMainReference
CreatedByUser I_ChgRecdRefTmplRoutingBsc CreatedByUser
CreationDateTime I_ChgRecdRefTmplRoutingBsc CreationDateTime
LastChangedByUser I_ChgRecdRefTmplRoutingBsc LastChangedByUser
LastChangeDateTime I_ChgRecdRefTmplRoutingBsc LastChangeDateTime
ChangeRecordItemRelevance I_ChgRecdRefTmplRoutingBsc ChangeRecordItemRelevance
ChangeRecordVirtualRefInd I_ChgRecdRefTmplRoutingBsc ChangeRecordVirtualRefInd
Plant Routing Plant
_ChangeRecordAPITP _ChangeRecordAPITP
@AbapCatalog.sqlViewName: 'ICRREFTMPLRTGTP2'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey:true
@VDM.viewType: #TRANSACTIONAL
@ObjectModel.usageType: {serviceQuality: #C,
                         dataClass: #MIXED,
                         sizeCategory: #XXL}
@EndUserText.label: 'Change Record Reference Object Template Routing'
@VDM.lifecycle.contract.type:#SAP_INTERNAL_API
define view I_ChangeRecdRefTmplRoutingTP_2
  as select from           I_ChgRecdRefTmplRoutingBsc as reference_template_routing
    left outer to one join I_ProductionRoutingVersion as Routing on  reference_template_routing.ChgRecRefInternalKey1 = Routing.BillOfOperationsType
                                                                 and reference_template_routing.ChgRecRefInternalKey2 = Routing.BillOfOperationsGroup
                                                                 and reference_template_routing.ChgRecRefInternalKey3 = Routing.BillOfOperationsVariant
                                                                 and reference_template_routing.ChgRecRefInternalKey4 = Routing.BillOfOperationsVersion
  association        to parent I_ChangeRecordTP_2  as _ChangeRecordAPITP    on $projection.ChangeRecordUUID = _ChangeRecordAPITP.ChangeRecordUUID
  association [0..1] to E_ChgRecdRefTmplRoutingBsc as _TmplRoutingExtension on $projection.ChangeRecordReferenceUUID = _TmplRoutingExtension.ChangeRecordReferenceUUID

{
  key   reference_template_routing.ChangeRecordReferenceUUID,
        case
           when Routing.BillOfOperationsType is null then cast(SUBSTRING( reference_template_routing.ChangeRecordReference, 1, 1) as plnty)
           else cast(Routing.BillOfOperationsType as plnty)
        end   as BillOfOperationsType,

        case
            when Routing.BillOfOperationsGroup is null then  cast(SUBSTRING( reference_template_routing.ChangeRecordReference, 2, 9) as mpe_rtg_reft_group)
            else cast(Routing.BillOfOperationsGroup as mpe_rtg_reft_group)
        end   as ShopFloorRtgTemplateGroup,

        case
          when Routing.BillOfOperationsVariant is null then cast (SUBSTRING( reference_template_routing.ChangeRecordReference, 10, 2) as mpe_rtg_reft_variant)
          else cast(Routing.BillOfOperationsVariant as mpe_rtg_reft_variant)
         end  as ShopFloorRtgTemplateGrpVariant,

        case
          when Routing.BillOfOperationsVersion is null then cast (SUBSTRING( reference_template_routing.ChangeRecordReference, 12, 4) as mpe_rtg_reft_version)
          else cast(Routing.BillOfOperationsVersion as mpe_rtg_reft_version)
          end as ShopFloorRtgTemplateVersion,

        reference_template_routing.ChangeRecordUUID,
        reference_template_routing.ChangeRecord,
        reference_template_routing.ChangeRecordReferenceType,
        reference_template_routing.ChangeRecordReferenceSubtype,
        reference_template_routing.ChangeRecordRefObjectUUID,
        reference_template_routing.ChangeRecordReference,
        reference_template_routing.ParentChangeRecordRefUUID,
        reference_template_routing.IsMainReference,
        reference_template_routing.CreatedByUser,
        reference_template_routing.CreationDateTime,
        reference_template_routing.LastChangedByUser,
        reference_template_routing.LastChangeDateTime,
        reference_template_routing.ChangeRecordItemRelevance,
        reference_template_routing.ChangeRecordVirtualRefInd,
        Routing.Plant,
        _ChangeRecordAPITP
}
where
  (
   reference_template_routing.ChangeRecordReferenceType = 'TER'
//       Routing.BillOfOperationsType                           = 'F' //F: Task list type for Template Routing

//    or Routing.BillOfOperationsType                           is null

  )
  and (reference_template_routing.ChangeRecordReference !=''  or  Routing._BillOfOperations.ShopFloorRtgTemplateCategory = ''  )// Category = '' is category for Reference Templates

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLOFOPERATIONS",
"I_CHGRECDREFTMPLROUTINGBSC",
"I_PRODUCTIONROUTINGVERSION"
],
"ASSOCIATED":
[
"E_CHGRECDREFTMPLROUTINGBSC",
"I_CHANGERECORDTP_2"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/