on 10-22-2009 7:52 AM
Dear all,
How to make a select-option mandatory in webdynpro abap.
Regards,
Antony
hi,
Add a parameter i_obligatory to add selection field with value X.
lr_helper->add_selection_field( i_id = 'S_CARR_ID'
it_result = lt_range
i_obligatory = 'X' <<======
i_description = 'description' ).
And you can use this code to check if there are any mandatory fields in your view or not.
If there are mandatory fields which are empty , it throws an error message " Please fill the complete entries"
data: lt_msg TYPE cl_wd_dynamic_tool=>t_check_result_message_tab,
lo_view_controller TYPE REF TO if_wd_view_controller,
lo_message_manager type ref to if_wd_message_manager.
lo_view_controller ?= wd_this->wd_get_api( ).
lo_message_manager = lo_view_controller->get_message_manager( ).
cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
EXPORTING
view_controller = lo_view_controller
display_messages = abap_true
IMPORTING
messages = lt_msg ).
I hope it helps.
Edited by: Saurav Mago on Oct 22, 2009 12:30 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Saurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.