C_QltyInfoRecdWthExceptionCalc

DDL: C_QLTYINFORECDWTHEXCEPTIONCALC SQL: CQINFOEXPCALC Type: view CONSUMPTION

Q- Info Record with Exception Calculation

C_QltyInfoRecdWthExceptionCalc is a Consumption CDS View that provides data about "Q- Info Record with Exception Calculation" in SAP S/4HANA. It reads from 1 data source (I_QualityInProcurement) and exposes 12 fields with key fields Material, QltyInProcmtIntID.

Data Sources (1)

SourceAliasJoin Type
I_QualityInProcurement I_QualityInProcurement from

Parameters (1)

NameTypeDefault
P_CurrentDate dats

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CQINFOEXPCALC view
EndUserText.label Q- Info Record with Exception Calculation view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY Material Material
KEY QltyInProcmtIntID QltyInProcmtIntID
QltyInProcmtReleaseValidTo QltyInProcmtReleaseValidTo
ProcurementBlock ProcurementBlock
SupplierProcurementBlock SupplierProcurementBlock
QualityInfoRecordExcptnSpanCnt
QltyInfoRecdBlkStsCnt
Plant Plant
InspectionLotType InspectionLotType
Supplier Supplier
_Supplier _Supplier
_ProductPlantQtManagement _ProductPlantQtManagement
@AbapCatalog.sqlViewName: 'CQINFOEXPCALC'
@EndUserText.label: 'Q- Info Record with Exception Calculation'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType: { serviceQuality: #C, sizeCategory: #S, dataClass: #TRANSACTIONAL }
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@AccessControl.personalData.blocking: #NOT_REQUIRED
define view C_QltyInfoRecdWthExceptionCalc
  with parameters
    P_CurrentDate : dats
  as select from I_QualityInProcurement
{
  key Material,
  key QltyInProcmtIntID,
      QltyInProcmtReleaseValidTo,
      ProcurementBlock,
      SupplierProcurementBlock,

      case
      when ( SupplierProcurementBlock != '')
      then  cast ('1' as vdm_qltyinforecordblockstatus )
      when (ProcurementBlock != '')
      then  cast ('2' as vdm_qltyinforecordblockstatus )
      end                                                                                             as QltyInfoRecdBlkSts,

      case
      when (QltyInProcmtReleaseValidTo < $parameters.P_CurrentDate)
      then  cast ('1' as vdm_qmduration )
      when (QltyInProcmtReleaseValidTo >= $parameters.P_CurrentDate) and (QltyInProcmtReleaseValidTo <= dats_add_days($parameters.P_CurrentDate , 7, 'UNCHANGED'))
      then  cast ('2' as vdm_qmduration)
      when (QltyInProcmtReleaseValidTo > dats_add_days($parameters.P_CurrentDate , 7, 'UNCHANGED')) and (QltyInProcmtReleaseValidTo <= dats_add_days($parameters.P_CurrentDate , 30, 'UNCHANGED'))
      then  cast ('3' as vdm_qmduration)
      end                                                                                             as QualityInfoRecordExcptnSpan,

      cast(cast('1' as abap.int4) as vdm_qltyinforecdwthexcptncnt preserving type)                    as QualityInfoRecordExcptnSpanCnt,
      cast (cast('1' as abap.int4) as vdm_qltyinforecdblockstatuscnt preserving type)                 as QltyInfoRecdBlkStsCnt,

      //Fields for filters

      Plant,
      InspectionLotType,
      Supplier,

      //Assosciations for DCL

      _Supplier,
      _ProductPlantQtManagement
}
where
     IsDeleted = ''
  or IsDeleted is null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_QUALITYINPROCUREMENT"
],
"ASSOCIATED":
[
"I_PRODUCTPLANTQTMANAGEMENT",
"I_SUPPLIER"
],
"BASE":
[
"I_QUALITYINPROCUREMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/