Mithun
Mithun

Reputation: 55

SAP Flexible Workflow pre-condition drop-down texts are not populated

I've created a new flexible workflow scenario and added some pre-conditions. One of the condition has a single parameter, with a data-element that has a domain with fixed values (YES and NO).

The issue is, in the Fiori app "Manage Workflows", when I use this pre-condition, the value field appears as a free-text entry field, and not as a dropdown with the domain values.

If I change the condition parameter to XFELD, though, I can see the same condition in the app appears as a dropdown with Yes and No options. Due to business requirements, I don't want to use the XFELD, though.

Any ideas how can I get the dropdown for my domain with fixed values?

PS: I've also tried attaching a CDS view VH (view on table dd07l) to the condition parameter. But still the field appears as a free text field.

@AbapCatalog.sqlViewName: 'ZMM_WFL_DEC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@Search.searchable: true
@ObjectModel.usageType.sizeCategory: #S
@ObjectModel.dataCategory:#VALUE_HELP
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Yes No Domain Fixed Values'

@OData.publish: true
@ObjectModel.createEnabled: true

define view Z_MMPURDecisionVH
  as select from dd07l
{
       @UI.hidden
  key  domname    as DomainName,
       @UI.hidden
  key  as4local   as Status,
       @Search.defaultSearchElement: true
       @Search.fuzzinessThreshold: 0.8
  key  domvalue_l as Low
}
where
      domname  = 'Z_MM_DO_YESNO' --Domain name
  and as4local = 'A' --Active

Upvotes: 0

Views: 1801

Answers (1)

You should define the xsd_type in ct_parameter of your condition as boolean:

ls_parameter-id = 1.
ls_parameter-name = '*Your_name*'.
ls_parameter-xsd_type = if_swf_flex_ifs_condition_def=>cs_xstype-boolean.
ls_parameter-mandatory = abap_false.
append ls_parameter to ct_parameter.

Upvotes: 1

Related Questions