P_InspSpecificationFieldCtrl

DDL: P_INSPSPECIFICATIONFIELDCTRL SQL: PINSPSPECFC Type: view COMPOSITE

P_InspSpecificationFieldCtrl is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_InspSpecificationVersion) and exposes 3 fields with key fields InspectionSpecificationPlant, InspectionSpecification, InspectionSpecificationVersion.

Data Sources (1)

SourceAliasJoin Type
I_InspSpecificationVersion I_InspSpecificationVersion from

Parameters (1)

NameTypeDefault
P_ApplicationMode qbemod

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PINSPSPECFC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #A view
Metadata.ignorePropagatedAnnotations true view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY InspectionSpecificationPlant InspectionSpecificationPlant
KEY InspectionSpecification InspectionSpecification
KEY InspectionSpecificationVersion InspectionSpecificationVersion
@AbapCatalog.sqlViewName: 'PINSPSPECFC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: {
    viewType: #COMPOSITE,
    private: true
}
@ObjectModel.usageType: {
    dataClass: #MASTER,
    sizeCategory: #M, //expected number of rows < 100.000

    serviceQuality: #A 
}
@Metadata.ignorePropagatedAnnotations: true

define view P_InspSpecificationFieldCtrl 
//P_MODE = R : Read-Only Modus, U: Update Modus, I: Insert

//Output = 0:Hidden, 1:Read-Only, 3:Option, 7:Mandatory

  with parameters P_ApplicationMode : qbemod 
  as select from I_InspSpecificationVersion 
  
{
   key InspectionSpecificationPlant,
   key InspectionSpecification,
   key InspectionSpecificationVersion,
   
// Active fields for quantitative characteristic

 /* Fields depending on  InspSpecIsQuantitative  */
    //InspSpecTargetValue

    case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecTargetValue
    //InspectionSpecificationUnit

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspectionSpecificationUnit
    //InspSpecDecimalPlaces

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecDecimalPlaces  
    //  InspSpecDeterminationRule

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecDeterminationRule
    //  InspSpecIsDetnRuleActive

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecIsDetnRuleActive
    // InspToleranceSpecification

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspToleranceSpecification
    // InspSpecToleranceChgValidFrom

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecToleranceChgValidFrom
    // InspSpecToleranceChgValidTo

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecToleranceChgValidTo
    //InspSpecIsUpperLimitRequired

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecIsUpperLimitRequired
    //InspSpecIsLowerLimitRequired

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecIsLowerLimitRequired
    //InspSpecIsTargetValueInLimit

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecIsTargetValueInLimit
    //InspSpecIsSampleQtyAdditive

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecIsSampleQtyAdditive
    //InspSpecIsSamplingProcedRqd

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecIsSamplingProcedRqd
    // InspSpecIsMeasuredValueRqd

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecIsMeasuredValueRqd
    // InspSpecResultCalculation

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecResultCalculation
    //InspSpecTargetValueText

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecTargetValueText
    //InspSpecToleranceLimitsText

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecToleranceLimitsText  
    //InspSpecPlausibilityLimitsText

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecPlausibilityLimitsText  
    //InspSpecFirstSpecLimitsText

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecFirstSpecLimitsText
    //InspSpecSecondSpecLimitsText

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecSecondSpecLimitsText
//    // InspSpecDefectCodeGrpRjcnLower

//    ,case I_InspSpecificationVersion.InspSpecIsQuantitative

//      when 'X' then

//        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

//      else 0

//    end as InspSpecDefectCodeGrpRjcnLower

//    // InspSpecDefectCodeRjcnLower

//    ,case I_InspSpecificationVersion.InspSpecIsQuantitative

//      when 'X' then

//        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

//      else 0

//    end as InspSpecDefectCodeRjcnLower

//    // InspSpecDefectCodeGrpRjcnUpper

//    ,case I_InspSpecificationVersion.InspSpecIsQuantitative

//      when 'X' then

//        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

//      else 0

//    end as InspSpecDefectCodeGrpRjcnUpper

//    // InspSpecDefectCodeRjcnUpper

//    ,case I_InspSpecificationVersion.InspSpecIsQuantitative

//      when 'X' then

//        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

//      else 0

//    end as InspSpecDefectCodeRjcnUpper

    
  /* Fields depending on  InspSpecIsLowerLimitRequired  */
    // InspSpecLowerLimit

    ,case I_InspSpecificationVersion.InspSpecIsLowerLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecLowerLimit
    // InspSpecLowerSpecLimitChange

    ,case I_InspSpecificationVersion.InspSpecIsLowerLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecLowerSpecLimitChange
    //InspSpecLowerSpecLmtChangeTxt

    ,case I_InspSpecificationVersion.InspSpecIsLowerLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecLowerSpecLmtChangeTxt
    // InspSpecDefectCodeGrpRjcnLower

    ,case I_InspSpecificationVersion.InspSpecIsLowerLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecDefectCodeGrpRjcnLower
    // InspSpecDefectCodeRjcnLower

    ,case I_InspSpecificationVersion.InspSpecIsLowerLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecDefectCodeRjcnLower
    
  /* Fields depending on  InspSpecIsUpperLimitRequired  */
    //InspSpecUpperSpecLmtChangeTxt

    ,case I_InspSpecificationVersion.InspSpecIsUpperLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecUpperSpecLmtChangeTxt
    // InspSpecUpperLimit

    ,case I_InspSpecificationVersion.InspSpecIsUpperLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecUpperLimit
    // InspSpecUpperSpecLimitChange

    ,case I_InspSpecificationVersion.InspSpecIsUpperLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecUpperSpecLimitChange
    // InspSpecDefectCodeGrpRjcnUpper

    ,case I_InspSpecificationVersion.InspSpecIsUpperLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecDefectCodeGrpRjcnUpper
    // InspSpecDefectCodeRjcnUpper

    ,case I_InspSpecificationVersion.InspSpecIsUpperLimitRequired
      when 'X' then
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

      else 0
    end as InspSpecDefectCodeRjcnUpper

// Active fields for non-quantitative characteristic

    //InspSpecIsSelectedSetRequired

    ,case I_InspSpecificationVersion.InspSpecIsQuantitative
      when 'X' then 0
      else
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

    end as InspSpecIsSelectedSetRequired
    
// Class Characteristic (depending if corresponding field for the internalId is initial or not)

    ,case I_InspSpecificationVersion.CharcInternalID
      when '0000000000' then 0
      else
        case :P_ApplicationMode when 'I' then 3 when 'U' then 3 else 1 end //Optional or Read-Only

    end as Characteristic

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INSPSPECIFICATIONVERSION"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/