on 06-29-2012 3:11 PM
Dear Experts ,
I'm trying to make select options as mandatory in webdynpro. i write code like following
CALL METHOD wd_this->m_handler->add_selection_field
EXPORTING
i_id = 'ZTSDATE'
i_description = 'Please Select Date range'
* i_is_auto_description = ABAP_TRUE
it_result = LT_RANGE_TABLE
i_obligatory = 'X'
.
On output select options appearing as manadatory means '*' mark is appearing but when i trigger action without giving any value on select options it is going to give an runtime error. can u Explain me how to resolvw it?
Thanking You in adv,
Rajesh
Hi Rajesh ,
in Webdynpro if you set obligatory parameters for any UI like inputfiel ,text edit or select option that does'n mean that system will check for mandatory fields . setting of obligatory parameters will jsut display the red asterisk symbol in from of the UI. you have to call the class for checking the mandatory check using method
cl_wd_dynamic_tool=>check_mandatory_attr_on_view
Regards
Chinnaiya Pandian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chinnaiya Pandian ,
I wrote that logic under wdbeforemodify() but its not working. Did i miss any flow in program?
Rajesh .
The class i mentioned is will not work for the select option .
write the below piece of code where u want to check the mandatory fields are entered .
dont write it in do modify
data : lv_error type i.
wd_this->M_HANDLER->check_all_selection_fields( IMPORTING
E_NUM_ERROR_MSGS = lv_error ).
M_HANDLERis type ref to IF_WD_SELECT_OPTIONS , this should be declared in attribute tab.
just i checked it working .
Regards
Chinnaiya Pandian
Thank you and i got the same result for other fields but while working with dates if i dint give end date then it is getting runtime error ..end date 00.00.0000 is less than start date...
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.