Skip to content

Field Data Source Name - Value Help - Search value - wildcard * is not converted to % #42

@alwinvandeput

Description

@alwinvandeput

Scenario

  1. Push button "New Project"
  2. Data source type: table
  3. Field Data Source Name -> click on Value Help button.
  4. Fill search value ZRAP.
  5. Press Enter
  6. See that there are no results.

Analysis
When for field Field Data Source Name in the Value Help wildcard * is used, then it is not converted in the code to a %.
For example search value ZRAP is entered, then it finds no records.
This is because the code does not convert it to Z%RAP%.

When search value Z%RAP% is used, there are also no results.
It seems like method zdmo_cl_rap_gen_get_data_src_2 -> if_rap_query_provider~select is not called then.

When in the debugger variable SEARCH_STRING in method "zdmo_cl_rap_gen_get_data_src_2 -> if_rap_query_provider~select" the variable SEARCH_STRING is changed from ZRAP to Z%RAP%, then it does work.

Solution
In method zdmo_cl_rap_gen_get_data_src_2 -> if_rap_query_provider~select
in variable SEARCH_STRING the * has to be replaced with %.
Code: REPLACE ALL OCCURRENCES OF '*' IN search_string WITH '%'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions