Assoc. MatlBased Compositon In Process and Released for UP
P_AssociatedMatlCmpstnProd is a Consumption CDS View that provides data about "Assoc. MatlBased Compositon In Process and Released for UP" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 8 fields. It has 1 association to related views.
Assoc. MatlBased Compositon In Process and Released for UP
view
AbapCatalog.sqlViewName
PAAMBCMPSUP
view
AbapCatalog.compiler.compareFilter
true
view
AbapCatalog.preserveKey
true
view
AccessControl.authorizationCheck
#NOT_REQUIRED
view
ClientHandling.algorithm
#SESSION_VARIABLE
view
VDM.viewType
#CONSUMPTION
view
VDM.private
true
view
Fields (8)
Key
Field
Source Table
Source Field
Description
ChmlCmplncInfoUUID
ChmlCompositionInProcessUUID
ChmlCmpstnInProcIsActiveEntity
ChmlCompositionReleasedUUID
ReleasedByUser
ChmlCmpstnReldIsActiveEntity
ChmlCompositionTypeasChmlCompositionType
ProdCmplncLegalAreaasProdCmplncLegalArea
@EndUserText.label: 'Assoc. MatlBased Compositon In Process and Released for UP'
-- for Unpackaged Product
@AbapCatalog:
{
-- SQL view name (16 characters)
sqlViewName: 'PAAMBCMPSUP',
--If it's true, the filter conditions are compared and, if they match, the associated join expression is evaluated only once
compiler.compareFilter: true,
preserveKey: true
}
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #NOT_REQUIRED
}
--Client Handling of the view@ClientHandling.algorithm: #SESSION_VARIABLE
--VDM view type
@VDM.viewType: #CONSUMPTION@VDM.private: truedefineview P_AssociatedMatlCmpstnProd
--Select data from basic view 'Chemical Compliance Information' (Logical key of composition)
asselectfrom I_ChmlCmplncInfo as ChemicalComplianceInfo
--Join data from composition with status In Process => Active or draft composition
leftouter to one join P_AssociatedMatlInProcCmpstn as CompositionInProcess on ChemicalComplianceInfo.ChmlCmplncInfoUUID = CompositionInProcess.ChmlCmplncInfoUUID
--Join data from composition with status Released => only active chemical composition, because released composition isnot editable
leftouter to one join P_AssociatedMatlReldCmpstn as CompositionReleased on ChemicalComplianceInfo.ChmlCmplncInfoUUID = CompositionReleased.ChmlCmplncInfoUUID
--Constants
association [1..1] to P_CChmlCmplConstants as _Constants on _Constants.Constant1 = _Constants.Constant1
{
--UUID of chemical compliance information
key ChemicalComplianceInfo.ChmlCmplncInfoUUID,
--UUID of chemical composition in process
CompositionInProcess.ChmlCompositionInProcessUUID,
--Status In Process
casewhen CompositionInProcess.ChmlCmpstnInProcStatus = 'IP' then
CompositionInProcess.ChmlCmpstnInProcStatus
when CompositionInProcess.ChmlCmpstnInProcStatus = '' or CompositionInProcess.ChmlCmpstnInProcStatus isnullthen
--Set NE if the In Process Version isnot existing
_Constants[inner].ConstantNotExisting
endas ChmlCmpstnInProcStatus,
--Indicator: Is active entity of chemical composition with status In Process
CompositionInProcess.ChmlCmpstnInProcIsActiveEntity,
--UUID of chemical composition released
CompositionReleased.ChmlCompositionReleasedUUID,
--Status Released
casewhen CompositionReleased.ChmlCmpstnReldStatus = 'RE'
then CompositionReleased.ChmlCmpstnReldStatus
when CompositionReleased.ChmlCmpstnReldStatus = ''
or CompositionReleased.ChmlCmpstnReldStatus isnull
--Set NE if the Released Version isnot existing
then _Constants[inner].ConstantNotExisting
endas ChmlCmpstnReldStatus,
--Released by User
CompositionReleased.ReleasedByUser,
--Indicator: Is active entity of chemical composition with status In Process
CompositionReleased.ChmlCmpstnReldIsActiveEntity,
-- Composition Type
coalesce( CompositionInProcess.ChmlCompositionType, CompositionReleased.ChmlCompositionType ) as ChmlCompositionType,
-- Legal Area
coalesce( CompositionInProcess.ProdCmplncLegalArea, CompositionReleased.ProdCmplncLegalArea ) as ProdCmplncLegalArea,
--Navigation Link UUID
casewhen CompositionInProcess.ChmlCmpstnInProcStatus = 'IP' then
CompositionInProcess.ChmlCompositionInProcessUUID
when CompositionReleased.ChmlCmpstnReldStatus = 'RE' then
CompositionReleased.ChmlCompositionReleasedUUID
endas ChmlCmpstnNavgnLinkUUID,
--Active Indicator
--We always navigate to the active version
cast( _Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as ChmlCmpstnIsActive
}
-- Only for CCI type 'Bulk' and CCI role 'Produced'
where
ChmlCmplncInfoType = 'BU'
and MaterialIsProduced = 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCINFO",
"P_ASSOCIATEDMATLINPROCCMPSTN",
"P_ASSOCIATEDMATLRELDCMPSTN",
"P_CCHMLCMPLCONSTANTS"
],
"ASSOCIATED":
[
"P_CCHMLCMPLCONSTANTS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/