@AbapCatalog.sqlViewName: 'PSIMFORSEARCH'
@AbapCatalog.compiler.compareFilter: true@AccessControl.authorizationCheck: #NOT_REQUIRED@AbapCatalog.preserveKey: true@ClientHandling.algorithm: #SESSION_VARIABLE@VDM.viewType: #CONSUMPTION@VDM.private: truedefineview P_SimulationsForSearch
as//Simulations
selectfrom P_Simulation
//...and an AVC Configuration Profile
innerjoin P_ConfigurationCount as _ConfigurationCount on P_Simulation.Product = _ConfigurationCount.ProductConfiguration
//Outerjoin for simulation drafts with temporary CUOBJ
association [1..*] to P_Ibin as _CBase on $projection.ProductConfiguration = _CBase.instance
//Source for dummy fields
association [1..1] to P_SimulationSearchSupport as _SearchSupport on _SearchSupport.ProductVariant = ''
{
key #vchclf_leading_object.'SSIM' as Type,
key ConfigurationObject as ConfigurationObject,
key ConfigurationObjectItem as ConfigurationObjectItem,
Product as Product,
Plant as Plant,
CreatedByUser as CreatedByUser,
CreationDate as CreationDate,
P_Simulation.LastChangeDate as LastChangeDate,
P_Simulation.LastChangeTime as LastChangeTime,
P_Simulation.LastChangedByUser as LastChangedByUser,
P_Simulation.ProductConfiguration as ProductConfiguration,
casewhen ConfigurationStatus != '' then ConfigurationStatus
else coalesce(_CBase.cstatus, '')
endas ConfigurationStatus,
//Configuration Profile Number is selected by the AVC engine andnot saved anymore
cast('0000' as cucozhl) as ConfigurationProfileNumber,
VariantConfigurationSimlnDate as VariantConfigurationSimlnDate,
DraftUUID as DraftUUID,
HasActiveEntity as HasActiveEntity,
cast('' as klassenart) as ClassType,
// These fields are exposed only for enabling searching in them
_SearchSupport.SalesDocument as SalesDocument, //empty
_SearchSupport.SalesDocumentItem as SalesDocumentItem, //empty
_SearchSupport.ProductVariant as ProductVariant, //empty
P_Simulation.VariantConfigurationSimlnName as VariantConfigurationSimlnName,
_SearchSupport.PurchasingDocument as PurchasingDocument, //empty
_SearchSupport.PurchasingDocumentItem as PurchasingDocumentItem, //empty
_SearchSupport.PurchaseRequisition as PurchaseRequisition, //empty
_SearchSupport.PurchaseRequisitionItem as PurchaseRequisitionItem, //empty
#VCHCLF_SIM_CONF_OBJ_TYPE_SORT.7 as ConfigurationObjTypeForSorting,
TemplateConfiguredObjectType,
TemplateConfiguredObject,
TemplateConfiguredObjectItem,
P_Simulation.VarConfignSimlnExternalID as VarConfignSimlnExternalID
}
where
P_Simulation.ConfigurationObject != ''
and _ConfigurationCount.ConfigurationProfileCount isnotnull/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_CONFIGURATIONCOUNT",
"P_IBIN",
"P_SIMULATION",
"P_SIMULATIONSEARCHSUPPORT"
],
"ASSOCIATED":
[
"P_IBIN",
"P_SIMULATIONSEARCHSUPPORT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/