on 02-16-2015 10:58 AM
I have designed a Selection Screen in WD component FPM_OVP_COMPONENT using SEARCH_UIBB. I need to make one of the fields on screen mandatory. How do I achieve that?If yes, Also, if one of the mandatory fields is not entered on screen, how to show the validation message on the WD screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In ET_FIELD_DESCRIPTION_ATTR parameter, there is one attribute namely mandatory. By using that attribute, you can make search fields mandatory.
Check the below sample code
METHOD if_fpm_guibb_search~get_definition.
TYPES:
BEGIN OF ty_search,
* include TYPE srt_mselect_result,
created_by TYPE srtm_created_by,
created_date TYPE srtm_created_date,
created_time TYPE srtm_created_time,
changed_date TYPE srtm_changed_date,
changed_time TYPE srtm_changed_time,
portal_id TYPE num10,
only_errors TYPE boolean,
END OF ty_search .
DATA : lw_field_desc TYPE fpmgb_s_searchfield_descr.
DATA: lt_field TYPE TABLE OF fpmgb_s_search_operator,
lw_field LIKE LINE OF lt_field.
eo_field_catalog_attr ?= cl_abap_tabledescr=>describe_by_name( 'TY_SEARCH' ).
lw_field-operator_id = '02'.
lw_field-text = 'two'.
APPEND lw_field TO lt_field.
lw_field_desc-name = 'CREATED_DATE'.
lw_field_desc-exclude_operators = lt_field.
lw_field_desc-mandatory = abap_true.
APPEND lw_field_desc TO et_field_description_attr.
CLEAR lw_field_desc.
lw_field_desc-name = 'ONLY_ERRORS'.
lw_field_desc-is_of_type = 'BO'.
* lw_field_desc-suppress_pattern_search = abap_true.
APPEND lw_field_desc TO et_field_description_attr.
Hope this helps you.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.