on 06-03-2011 11:38 PM
Hi all,
I would like to define an ItemListBox as mandatory and, apparently, there's not such a property in WebDynpro.
Is there any workaround to this?
Thanks!
Hi,
For displaying '*' in red please try the below mentioned code:
CALL METHOD cl_fitv_wd_util=>ui_set_required
EXPORTING
io_view = view
iv_id = 'ID of the UI element'
iv_required = abap_true.
For highlighting the UI element.
Try the method REQUEST_FOCUS of the interface IF_WD_VIEW_CONTROLLER.
Regards,
Sanjeev Kotwal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hiii.
I dont know about itemlist box, but i made the fileupload as mandatory by using below coding. approach in this way it wll be usefull.
data: l_View_Controller type ref to if_wd_view_Controller.
l_View_controller = wd_this->wd_get_api( ).
cl_wd_dynamic_tool=>check_mandatory_attr_on_View( exporting
view_controller = l_View_controller
dispaly_message = abap_true ).
I am not sure whether it wil workfor you.. or not. waiting for others replies
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.,
there is no required property for itemlistbox., you can read the node to which the itemListBox is binded and if it is initial display error messge.,
@srinivas : the code you provided is to check all the required fields in view are entered or not, and display error message automatically..
hope this helps u.,
Thanks & Regards,
Kiran
Hi ,
I too have faced the similar issue with drop down by index UI element . I don't think SAP allows Item list box or drop down by index to be made mandatory fields . As said above , I gave custom error message if value is initial and highlighting the UI element may not be possible . If anybody has the solution , please let me know .
Thanks,
Sankeerth .
Hai,
by using below Method we can highlight error giving input field
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Enter valid amount
element = 'Header' "Context node name
attribute_name = 'Amount' "Context attribute name
and In Webdynpro for Drop-down by index we can set mandatory Attribute also.
User | Count |
---|---|
88 | |
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.