@EndUserText.label: 'Packaged Product Assignment per Country/Region'
@AbapCatalog:
{
sqlViewName: 'CCCMKTCVRGPRODAS',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl:
{
authorizationCheck: #CHECK,
// blocking of personal data not required (no personal data fields exposed for material)
personalData.blocking: #NOT_REQUIRED
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@ObjectModel:
{
semanticKey: [ 'ProductName' ],
usageType:
{
dataClass: #MIXED,
sizeCategory: #L,
serviceQuality: #C
}
}
@UI.presentationVariant : [ {requestAtLeast:
[
'ChmlCmplncInfoUUID',
'Country',
'PckgdChmlCmplncInfoUUID',
'ChmlCmplncPckgdCvrgExists',
'ChmlCmplncMktCvrgUUID',
//'ChmlCmplncExprtAllwd',
//'ChmlCmplncImprtAllwd',
'ChmlCmplncSalesAllwd'
]}, { sortOrder: [{ by: 'ProductName', direction: #ASC }] } ]
define view C_ChmlCmplncMktCvrgProdAssgmt
as select from I_ChmlCmplncMktCvrgProdAssgmt
-- Marketability Coverage of Packaged Product
//association [1..1] to I_ChmlCmplncMktCvrgTP as _ChmlCmplncMktCvrg on _ChmlCmplncMktCvrg.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [1..1] to I_ChmlCmplncMktCvrgTP as _MarketCoveragePckgd on _MarketCoveragePckgd.ChmlCmplncInfoUUID = $projection.PckgdChmlCmplncInfoUUID
and _MarketCoveragePckgd.Country = $projection.Country
-- Marketability Request of Packaged Product
//association [1..1] to I_ChmlCmplncMktReqTP as _ChmlCmplncMktReq on _ChmlCmplncMktReq.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [1..1] to I_ChmlCmplncMktReqTP as _MarketRequestPckgd on _MarketRequestPckgd.ChmlCmplncInfoUUID = $projection.PckgdChmlCmplncInfoUUID
and _MarketRequestPckgd.Country = $projection.Country
-- Specific Marketability (needed for side effect)
association [1..1] to C_ChmlCmplncMktSpcfcCvrg as _SpecificCoverage on _SpecificCoverage.ChmlCmplncProdUUID = $projection.ChmlCmplncProdUUID
and _SpecificCoverage.ChmlCmplncInfoUUID = $projection.PckgdChmlCmplncInfoUUID
and _SpecificCoverage.Country = $projection.Country
-- Market Coverage of Unpackaged Product (needed for side effect)
association [1..1] to C_ChmlCmplncMktCvrgTP as _MarketCoverage on _MarketCoverage.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID
and _MarketCoverage.Country = $projection.Country
// -- Chemical Compliance Info of Packaged Product
association [1..1] to I_ChmlCmplncInfoTP as _ChmlCmplncInfo on _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.PckgdChmlCmplncInfoUUID
{
// Key of Product Assignment
@UI.hidden: true
@ObjectModel.readOnly: true
key ChmlCmplncProdAssgmtUUID,
// Country
@UI.hidden: true
@ObjectModel.readOnly: true
key Country,
// Key of Chemical Compliance Info from which coverage should be displayed (Packaged or Unpackaged Product)
@UI.hidden: true
@ObjectModel.readOnly: true
ChmlCmplncInfoUUID,
// Key of Chemical Compliance Info of Packaged Product
@UI.hidden: true
@ObjectModel.readOnly: true
PckgdChmlCmplncInfoUUID,
// Key of Chemical Compliance Info of Unpackaged Product
@UI.hidden: true
// @ObjectModel.readOnly: true
ChmlCmplncProdUUID,
// Set UUID of Packaged Product as Active UUID from Packaged Product
// see CL_EHPMA_MKT_CALC_EXIT2
@UI.hidden: true
@ObjectModel.readOnly: true
PckgdChmlCmplncInfoUUID as ActiveChmlCmplncInfoUUID,
// Key od Coverage entry
@UI.hidden: true
@ObjectModel.readOnly: true
_MarketCoveragePckgd.ChmlCmplncMktCvrgUUID as ChmlCmplncMktCvrgUUID,
// Product Name of Packaged Product
@UI:
{
lineItem:
{
position: 10
}
}
@ObjectModel.readOnly: true
cast(_ChmlCmplncInfo._MaterialAssignment[1: Material = Material]._Product._Text[1: Language = $session.system_language ].ProductName as ehfnd_cci_product_name)
as ProductName,
// Product Number of Packaged Product
@UI:
{
lineItem:
{
position: 20
}
}
@ObjectModel:{
readOnly: true
}
// @Search: {
// defaultSearchElement : true,
// fuzzinessThreshold: 0.7,
// ranking: #MEDIUM
// }
@Consumption.filter.hidden: true
_ChmlCmplncInfo._MaterialAssignment[1: Material = Material].Material as Material,
// Application of Packaged Product
--TODO Chemical Compliance Information: not yet needed, until the packaged product is editable by an own app
// @UI:
// {
// lineItem:
// {
// position: 30,
// importance: #LOW
// },
// multiLineText: true
// }
// @ObjectModel.virtualElement
// @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT2'
// @ObjectModel.readOnly: true
// cast( '' as ehpma_application_long ) as ChmlCmplncApplication,
// Coverage for Packaged Product Exists Indicator
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
@UI.hidden: true
cast( '' as ehpma_specific_cov_exists ) as ChmlCmplncPckgdCvrgExists,
// Coverage for Packaged Product Exists IndicatorName
@UI:
{
lineItem:
{
position: 40,
importance: #MEDIUM
}
}
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
cast( '' as ehpma_specific_cov_exists_dsc ) as ChmlCmplncPckgdCvrgExistsName,
// ************************************************************************************
// Export from ************************************************************************
// Request Indicator for Export
/*@UI.hidden: true
@ObjectModel.readOnly: true
_MarketRequestPckgd.ChmlCmplncExprtIsReqd,
// Coverage for Export
@UI.hidden: true
@ObjectModel.readOnly: true
_MarketCoveragePckgd.ChmlCmplncExprtAllwd,
// Coverage for Export with Additional Information Whether Coverage is Requested
@UI: {
lineItem:
{
position: 50,
criticality: 'ChmlCmplncExprtCvrgReqdCritlty',
criticalityRepresentation: #WITHOUT_ICON
}
}
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
cast( '' as ehpma_export_covreq_status_dsc ) as ChmlCmplncExprtAllwdReqdName,
// Criticality of Export Coverage
@UI.hidden
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
cast( 0 as integer ) as ChmlCmplncExprtCvrgReqdCritlty,
*/
// **********************************************************************************
// Import to ************************************************************************
// Request Indicator for Import
/*@UI.hidden: true
@ObjectModel.readOnly: true
_MarketRequestPckgd.ChmlCmplncImprtIsReqd,
// Coverage for Import
@UI.hidden: true
@ObjectModel.readOnly: true
_MarketCoveragePckgd.ChmlCmplncImprtAllwd,
// Coverage for Import with Additional Information Whether Coverage is Requested
@UI: {
lineItem:
{
position: 60,
criticality: 'ChmlCmplncImprtCvrgReqdCritlty',
criticalityRepresentation: #WITHOUT_ICON
}
}
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
cast( '' as ehpma_import_covreq_status_dsc ) as ChmlCmplncImprtAllwdReqdName,
// Criticality of Import Coverage
@UI.hidden
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
cast( 0 as integer ) as ChmlCmplncImprtCvrgReqdCritlty,
*/
// ******************************************************************************
// Sales ************************************************************************
// Request Indicator for Sales
@UI.hidden: true
@ObjectModel.readOnly: true
_MarketRequestPckgd.ChmlCmplncSalesIsReqd,
// Coverage for Sales
@UI.hidden: true
@ObjectModel.readOnly: true
_MarketCoveragePckgd.ChmlCmplncSalesAllwd,
// Coverage for Sales with Additional Information Whether Coverage is Requested
@UI: {
lineItem:
{
position: 70,
criticality: 'ChmlCmplncSalesCvrgReqdCritlty',
criticalityRepresentation: #WITHOUT_ICON
}
}
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
cast( '' as ehpma_sales_covreq_status_dsc ) as ChmlCmplncSalesAllwdReqdName,
// Criticality of Sales Coverage
@UI.hidden
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT1'
@ObjectModel.readOnly: true
cast( 0 as integer ) as ChmlCmplncSalesCvrgReqdCritlty,
-- Associations
_ChmlCmplncInfo,
_MarketCoveragePckgd,
_MarketRequestPckgd,
_SpecificCoverage,
_MarketCoverage
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCINFOTP",
"I_CHMLCMPLNCMATLASSGMTTP",
"I_CHMLCMPLNCMKTCVRGPRODASSGMT",
"I_CHMLCMPLNCMKTCVRGTP",
"I_CHMLCMPLNCMKTREQTP",
"I_PRODUCT",
"I_PRODUCTTEXT"
],
"ASSOCIATED":
[
"C_CHMLCMPLNCMKTCVRGTP",
"C_CHMLCMPLNCMKTSPCFCCVRG",
"I_CHMLCMPLNCINFOTP",
"I_CHMLCMPLNCMKTCVRGTP",
"I_CHMLCMPLNCMKTREQTP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/