I_InspectionOperationStatus

DDL: I_INSPECTIONOPERATIONSTATUS SQL: IINSPOPERATIONST Type: view BASIC

Inspection Operation Status

I_InspectionOperationStatus is a Basic CDS View that provides data about "Inspection Operation Status" in SAP S/4HANA. It reads from 4 data sources (I_InspectionLot, I_InspectionOperation, I_StatusObjectStatusBasic, tqec30) and exposes 8 fields with key fields OrderInternalBillOfOperations, InspPlanOperationInternalID.

Data Sources (4)

SourceAliasJoin Type
I_InspectionLot I_InspectionLot inner
I_InspectionOperation I_InspectionOperation from
I_StatusObjectStatusBasic I_StatusObjectStatusBasic left_outer
tqec30 tqec30 left_outer

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IINSPOPERATIONST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Inspection Operation Status view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view
Metadata.ignorePropagatedAnnotations true view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY OrderInternalBillOfOperations I_InspectionOperation OrderInternalBillOfOperations
KEY InspPlanOperationInternalID I_InspectionOperation InspPlanOperationInternalID
InspectionOpIsCompletionNeeded
MatlQualityAuthorizationGroup
InspectionLotType
Plant
_Plant
_InspectionLotType
@AbapCatalog.sqlViewName: 'IINSPOPERATIONST'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Inspection Operation Status'
@VDM: {
    viewType: #BASIC,
    lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@ObjectModel.supportedCapabilities:
    [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]
@ObjectModel.usageType: {
    dataClass: #MIXED,
    sizeCategory: #L,
    serviceQuality: #D
}
@Metadata.ignorePropagatedAnnotations: true
define view I_InspectionOperationStatus as select from I_InspectionOperation
  inner join I_InspectionLot on I_InspectionLot.InspectionLot = I_InspectionOperation.InspectionLot
  left outer join I_StatusObjectStatusBasic on I_InspectionOperation.StatusObject  = I_StatusObjectStatusBasic.StatusObject 
  left outer join tqec30 
    on tqec30.art = I_InspectionLot.InspectionLotType
    and tqec30.werk = I_InspectionLot.Plant
{
    key I_InspectionOperation.OrderInternalBillOfOperations,
    key I_InspectionOperation.InspPlanOperationInternalID,
    max(tqec30.oper_completion) as InspectionOpIsCompletionNeeded,
    //Logic from QEEA_CHECK_OPERATION_STATUS, but customizing neglected because

    //this seems to be more theoretically: Chars should be there, but aren't.

    max(case I_InspectionOperation.BillOfOperationsType
      when 'Q' then 1
      else 
        case I_StatusObjectStatusBasic.StatusIsInactive
          when 'X' then 0
          else
            case I_StatusObjectStatusBasic.StatusCode
              when 'I0282' then 1
              when 'I0283' then 1
            else 0
            end
        end
    end) as InspOpHasCharc,   
    // fields added for Auth Check in DCL

    @Consumption.hidden: true
    I_InspectionOperation._InspectionLot.MatlQualityAuthorizationGroup,
    @Consumption.hidden: true
    @ObjectModel.foreignKey.association: '_InspectionLotType'
    I_InspectionOperation._InspectionLot.InspectionLotType,
    @Consumption.hidden: true
    @ObjectModel.foreignKey.association: '_Plant'
    I_InspectionOperation._InspectionLot.Plant,
    
    // Associations

    I_InspectionOperation._InspectionLot._Plant,
    I_InspectionOperation._InspectionLot._InspectionLotType
}
group by I_InspectionOperation.OrderInternalBillOfOperations, 
         I_InspectionOperation.InspPlanOperationInternalID  ,
         I_InspectionOperation._InspectionLot.InspectionLotType,
         I_InspectionOperation._InspectionLot.Plant,
         I_InspectionOperation._InspectionLot.MatlQualityAuthorizationGroup
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INSPECTIONLOT",
"I_INSPECTIONOPERATION",
"I_STATUSOBJECTSTATUSBASIC",
"TQEC30"
],
"ASSOCIATED":
[
"I_INSPECTIONLOTTYPE",
"I_PLANT"
],
"BASE":
[
"I_INSPECTIONLOT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/