P_SIMULATIONSFORSEARCH

CDS View

Simulation - Simulations for Search

P_SIMULATIONSFORSEARCH is a CDS View in S/4HANA. Simulation - Simulations for Search. It contains 11 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_ConfignOvwPgOwnRecentSimln view from CONSUMPTION Configuration Ovp Own Recent Simulation
P_SimulationObjectUnion view union_all CONSUMPTION Simulation - Simulation Objects Union

Fields (11)

KeyField CDS FieldsUsed in Views
KEY ConfigurationObject SimulationUUID 1
KEY DraftUUID DraftUUID 1
ConfigurationStatus ConfigurationStatus 1
LastChangeDate LastChangeDate 1
LastChangedByUser LastChangedByUser 1
LastChangeTime LastChangeTime 1
Plant Plant 1
Product Product 1
TemplateConfiguredObject TemplateConfiguredObject 1
TemplateConfiguredObjectItem TemplateConfiguredObjectItem 1
VarConfignSimlnExternalID VarConfignSimlnExternalID 1
@AbapCatalog.sqlViewName: 'PSIMFORSEARCH'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.preserveKey: true

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #CONSUMPTION
@VDM.private: true

define view P_SimulationsForSearch
  as

  //Simulations

  select from  P_Simulation

  //...and an AVC Configuration Profile

  inner join P_ConfigurationCount as _ConfigurationCount on P_Simulation.Product = _ConfigurationCount.ProductConfiguration

  //Outer join 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,
      case
        when ConfigurationStatus != '' then ConfigurationStatus
        else coalesce(_CBase.cstatus, '')
      end                                        as ConfigurationStatus,

      //Configuration Profile Number is selected by the AVC engine and not 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 is not null