on 03-24-2012 6:56 PM
Hello All,
I have developed small application WDA.
I have used the below code for creating select options on screen.
FREE ob_field.
* create a range table that consists of this new data element plant search
ob_field = wd_this->m_handler->create_range_table(
i_typename = c_planttypename ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
it_result = ob_field
i_read_only = w_read_only
i_id = c_selectoptionsplantid
i_value_help_type = if_wd_value_help_handler=>co_prefix_searchhelp
i_value_help_id = w_plant_srch_hlp
i_description = c_selectoptionsplantdesc
i_obligatory = abap_true
).
I am facing issue when errror message is displayed for mandatory fields.
It contains duplicate entries.
I have attached screen shot for reference.
Need your expert guidance to resolve this issue.
Dear All,
The issue is resolved.
I observed that one message was getting added before the method call and other duplicate message was getting added after the button click method. So I put a exit inside the method if any of the mandatory field is initial. It is working for now.
Thanks for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anshul,
I guess, This mandatory check error messages are coming when you click on Execute Report button right?
We explicitly write some code to perform mandatory check if normal input field is there in aplication using CHECK_MANDATORY_ATTR_ON_VIEW / CHECK_MANDATORY_ATTRIBUTES methods.
But i am surprised, in your case(reusing Select-options component) how this being handled?
Please explain.
Regards,
Bharath.
Dear All,
Please help to resolve this issue.
Thanks & Regards
Anshul Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lekha,
Thanks for your reply.
The error i am getting is standard error which is coming because i have declared field mandatory.
I have written the below code in init method of view.
wd_this->m_handler->add_selection_field(
it_result = ob_field
i_read_only = w_read_only
i_id = c_selectoptionsplantid
i_value_help_type = if_wd_value_help_handler=>co_prefix_searchhelp
i_value_help_id = w_plant_srch_hlp
i_description = c_selectoptionsplantdesc
i_obligatory = abap_true
).
I have not used any method for displaying this message.
Hi Lekha,
I have created only one instance of the select option.
I am using a submit button to fetch the report based on the values provided on selection screen.
I have used the below logic to fetch the values provided in selection parameters.
* Retrieve the data from the select option
ob_field = wd_this->m_handler->get_range_table_of_sel_field(
i_id = c_plant ).
I am getting the errors when I click this button.
Hi Karthik,
No, it is not raising duplicate error message for Low and High values. There must be something wrong.
When you use select-option with intervals, it is expecting atleast one entry either in the low or high but not both. Then there should be one error message raised when mandatory check failed.
Did you enable standard buttons (Cancel ,Check....). Are you using Check button to perform mandatory check or written any other code in your component.
Check the sample WD component - WDR_TEST_SELECT_OPTIONS
Regards,
Bharath.
HI Bharath,
I have written the below code in init method of view for adding select option and there is one parameter to make it mandatory. I have done no additional coding for mandatory field check.
wd_this->m_handler->add_selection_field(
it_result = ob_field
i_read_only = w_read_only
i_id = c_selectoptionsplantid
i_value_help_type = if_wd_value_help_handler=>co_prefix_searchhelp
i_value_help_id = w_plant_srch_hlp
i_description = c_selectoptionsplantdesc
i_obligatory = abap_true
).
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.