C_InspLotWithRsltRecgStatus

DDL: C_INSPLOTWITHRSLTRECGSTATUS SQL: CINSPLOTRRSTATUS Type: view CONSUMPTION

Results Recording Status

C_InspLotWithRsltRecgStatus is a Consumption CDS View that provides data about "Results Recording Status" in SAP S/4HANA. It reads from 1 data source (I_InspectionLot) and exposes 5 fields with key field InspectionLot.

Data Sources (1)

SourceAliasJoin Type
I_InspectionLot _InspectionLot from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CINSPLOTRRSTATUS view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Results Recording Status view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY InspectionLot I_InspectionLot InspectionLot
MatlQualityAuthorizationGroup I_InspectionLot MatlQualityAuthorizationGroup
InspectionLotType I_InspectionLot InspectionLotType
Plant I_InspectionLot Plant
IsBusinessPurposeCompleted I_InspectionLot IsBusinessPurposeCompleted
@AbapCatalog.sqlViewName: 'CINSPLOTRRSTATUS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Results Recording Status'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality:  #C
@ObjectModel.usageType.sizeCategory: #L
define view C_InspLotWithRsltRecgStatus
  as select from           I_InspectionLot           as _InspectionLot
    left outer to one join I_InspectionLotAggregate  as _InspLotAggrgt           on _InspectionLot.InspectionLot = _InspLotAggrgt.InspectionLot
    left outer to one join P_InspectionLotWithStatus as _InspectionLotWithStatus on _InspectionLot.InspectionLot = _InspectionLotWithStatus.InspectionLot
  
  //association [0..1] to C_InspLotRsltRecgStatusT as _InspLotRsltRecgStatusText on  $projection.InspLotRsltRecgStatus = _InspLotRsltRecgStatusText.InspLotRsltRecgStatus


{
  key _InspectionLot.InspectionLot,
      _InspectionLot.MatlQualityAuthorizationGroup,
      @Consumption.filter.hidden: true //Added this for Duplicate Inspection type filter is showing in RR application

      _InspectionLot.InspectionLotType,
      @Consumption.filter.hidden: true
      _InspectionLot.Plant,
      _InspectionLot.IsBusinessPurposeCompleted,
      @UI.lineItem: [{ label: 'Recording Status'}]
      @EndUserText.label: 'Results Recording Status'
      @UI.selectionField: [{ position: 1 }]
      
//      @ObjectModel.text.association: '_InspLotRsltRecgStatusText'

//      @UI.textArrangement: #TEXT_ONLY

//      @ObjectModel: {

//        readOnly: true,

//        foreignKey: {

//          association: '_InspLotRsltRecgStatusText' }

//      }

      @Consumption.valueHelpDefinition: [{ entity:{ name: 'I_InspLotRsltRecgStatus', element: 'InspLotRsltRecgStatus'} }]
      // @Consumption.valueHelpDefinition: [{entity: {name: 'C_InspLotRsltRecgStatusT',element: 'InspLotRsltRecgStatus'} }]


 
      case
          when _InspectionLot.InspectionLotHasUsageDecision <> 'X' and
               _InspectionLotWithStatus.InspLotStatusRsltsConfirmed  is null
          then cast ('1' as vdm_qminsplotrsltrecgstatus) // Not Started


          when _InspectionLot.InspectionLotHasUsageDecision <> 'X' and
               _InspectionLotWithStatus.InspLotStatusRsltsConfirmed is not null and
               _InspectionLotWithStatus.InspLotStsShrtTrmInspCmpltd is null
          then cast('2' as vdm_qminsplotrsltrecgstatus) // in process


          when  _InspectionLot.InspectionLotHasUsageDecision <> 'X' and
                _InspectionLotWithStatus.InspLotStsShrtTrmInspCmpltd is not null and
                ( _InspectionLotWithStatus.InspLotStsDefectsRecorded is not null or
                 _InspLotAggrgt.InspCharRejectedCount > 0 )
              then cast('3' as vdm_qminsplotrsltrecgstatus) // completed with deviations


          when _InspectionLot.InspectionLotHasUsageDecision <> 'X' and
               _InspectionLotWithStatus.InspLotStsShrtTrmInspCmpltd is not null
          then cast ('4' as vdm_qminsplotrsltrecgstatus) // completed


          else ''
      end as InspLotRsltRecgStatus
     

//      @Consumption.filter.hidden: true

//      _InspLotRsltRecgStatusText


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