P_ChmlCmplMktCovAndReq is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (ehfndv_cci_mcvrg, ehfndv_cci_mreq, ehfndv_cci_prod) and exposes 1 field.
@AbapCatalog:
{
sqlViewName: 'PCCMKTCOVREQ',
compiler.compareFilter: true
}
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #NOT_REQUIRED
}
--Client Handling of the view@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel.usageType.serviceQuality: #B
--VDM view type
@VDM.viewType: #COMPOSITE@VDM.private: true/*----------------------------------------------------------------------------------------------------------------------
KeyFigure-View: Processing status of a CCI from point of view: market coverage.
------------------------------------------------------------------------------------------------------------------------*/defineview P_ChmlCmplMktCovAndReq
asselectfrom ehfndv_cci_mcvrg as _MC
leftouterjoin ehfndv_cci_mreq as _MR on _MC.chmlcmplncinfouuid = _MR.chmlcmplncinfouuid
and _MC.country = _MR.country
leftouterjoin ehfndv_cci_prod as _PROD on _MC.chmlcmplncinfouuid = _PROD.chmlcmplncinfouuid
{
_MC.chmlcmplncinfouuid as chemicalcomplianceuuid,
_PROD.chmlcmplncproduuid as chmlcmplncproduuid,
_MC.country as country,
//request
case _MR.chmlcmplncprodnisreqd
when 'X' then 1
else 0
endas ProductionRequested,
case _MR.chmlcmplncimprtisreqd
when 'X' then 1
else 0
endas ImportRequested,
case _MR.chmlcmplncexprtisreqd
when 'X' then 1
else 0
endas ExportRequested,
case _MR.chmlcmplncsalesisreqd
when 'X' then 1
else 0
endas SalesRequested,
//coverage
case _MC.chmlcmplncprodnallwd
when 'X' then 1
when 'N' then 1
else 0
endas ProductionProcessed,
case _MC.chmlcmplncimprtallwd
when 'X' then 1
when 'N' then 1
else 0
endas ImportProcessed,
case _MC.chmlcmplncexprtallwd
when 'X' then 1
when 'N' then 1
else 0
endas ExportProcessed,
case _MC.chmlcmplncsalesallwd
when 'X' then 1
when 'N' then 1
else 0
endas SalesProcessed,
//unprocessed
case _MR.chmlcmplncprodnisreqd
when 'X' thencase _MC.chmlcmplncprodnallwd
when 'X' then 0
when 'N' then 0
else 1
endelse 0
endas ProductionUnprocessed,
case _MR.chmlcmplncimprtisreqd
when 'X' thencase _MC.chmlcmplncimprtallwd
when 'X' then 0
when 'N' then 0
else 1
endelse 0
endas ImportUnprocessed,
case _MR.chmlcmplncexprtisreqd
when 'X' thencase _MC.chmlcmplncexprtallwd
when 'X' then 0
when 'N' then 0
else 1
endelse 0
endas ExportUnprocessed,
case _MR.chmlcmplncsalesisreqd
when 'X' thencase _MC.chmlcmplncsalesallwd
when 'X' then 0
when 'N' then 0
else 1
endelse 0
endas SalesUnprocessed
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EHFNDV_CCI_MCVRG",
"EHFNDV_CCI_MREQ",
"EHFNDV_CCI_PROD"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/