P_ChmlCmplncReqMktCntryAll

DDL: P_CHMLCMPLNCREQMKTCNTRYALL Type: view COMPOSITE

P_ChmlCmplncReqMktCntryAll is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncMktCvrg, I_ChmlCmplncReqMkt) and exposes 9 fields with key fields ChmlCmplncRequestUUID, Country, ChmlCmplncBusinessProcess, Country, ChmlCmplncBusinessProcess. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
I_ChmlCmplncMktCvrg _ChmlCmplncMktCvrg union
I_ChmlCmplncReqMkt I_ChmlCmplncReqMkt from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_ChmlCmplncReq _ChmlCmplncReq $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PCRQMREQCTRYBPA view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY ChmlCmplncRequestUUID _ChmlCmplncReqJoined ChmlCmplncRequestUUID
KEY Country _ChmlCmplncReqMkt Country
KEY ChmlCmplncBusinessProcess
_Country _Country
ChmlCmplncRequestUUID
KEY Country I_ChmlCmplncMktCvrg Country
KEY ChmlCmplncBusinessProcess
_Country I_ChmlCmplncMktCvrg _Country
_ChmlCmplncReq _ChmlCmplncReq
@AbapCatalog:
{
 sqlViewName: 'PCRQMREQCTRYBPA',
 compiler.compareFilter: true,
 preserveKey: true
}

@AccessControl:
{
  authorizationCheck: #NOT_REQUIRED
}

--Client Handling of the view
@ClientHandling.algorithm: #SESSION_VARIABLE

--VDM view type
@VDM.viewType: #COMPOSITE
@VDM.private: true

/*-----------------------------------------------------------------------------------
  Retrieves a distinct list of all involved market countries for a chemical compliance
  request which involves
    1. Already existing as assessments at the CCI/UP for All business processes
    2. Requested countries of a chemcial compliance Request
--------------------------------------------------------------------------------------*/

define view P_ChmlCmplncReqMktCntryAll

  as select from I_ChmlCmplncReqMkt _ChmlCmplncReqMkt
    join         I_ChmlCmplncReq as _ChmlCmplncReqJoined on _ChmlCmplncReqMkt.ChmlCmplncRequestUUID = _ChmlCmplncReqJoined.ChmlCmplncRequestUUID

  association [1..1] to I_ChmlCmplncReq as _ChmlCmplncReq on $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID
{
  key          _ChmlCmplncReqJoined.ChmlCmplncRequestUUID,
  key          _ChmlCmplncReqMkt.Country,
  key          'ALL' as ChmlCmplncBusinessProcess,

               _Country,
               _ChmlCmplncReq
}
union select from I_ChmlCmplncMktCvrg as _ChmlCmplncMktCvrg

  join            I_ChmlCmplncReq     as _ChmlCmplncReqJoined on _ChmlCmplncMktCvrg.ChmlCmplncInfoUUID = _ChmlCmplncReqJoined.ChmlCmplncProdUUID
 
association [1..1] to I_ChmlCmplncReq as _ChmlCmplncReq on $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID

{
  key         _ChmlCmplncReqJoined.ChmlCmplncRequestUUID,
  key         _ChmlCmplncMktCvrg.Country,
  key         'ALL' as ChmlCmplncBusinessProcess,

              _ChmlCmplncMktCvrg._Country,
              _ChmlCmplncReq
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCMKTCVRG",
"I_CHMLCMPLNCREQ",
"I_CHMLCMPLNCREQMKT"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCREQ",
"I_COUNTRY"
],
"BASE":
[
"I_CHMLCMPLNCREQMKT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/