cancel
Showing results for 
Search instead for 
Did you mean: 

Regading mandatory checks for fields

Former Member
0 Kudos

Hi All,

We are currently upgraded to Netweaver 7.0 EnhP1. Earlier versions cl_wd_dynamic_tool=>check_mandatory_attributes worked fine. But now after the upgrade it is not throwing errors for mandatory fields.

Any reasons for this.

Regards,

Lekha.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Solved by myself

Former Member
0 Kudos

Hi Lekha,

Can you let me know how u solved ?

Former Member
0 Kudos

Hi,

Can I know where are you facing the problem...Paste your code if possible.

Regards,

Lekha.

Former Member
0 Kudos

I have some mandatory fields in my view. Using the following code i am checking whether they are filled up or not. Say i have 5 fields, if i have not filled these 5 fields, i am getting 5 error messages saying Fill the mandatory fields. But i am not getting which fields is blank in the text even though the field is highlighted.

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 ).

Former Member
0 Kudos

Hi,

First set th property for those UI elements as Required. Then use this method. One more thing it will not display the fieldname It will show all the mesasges with the highlighted ones. You need to click on each link that focuses on that field.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

I am using in the EnhP1 and its working ok.

lv_error = cl_wd_dynamic_tool=>check_mandatory_attributes(

attribute_list = lt_mcheck

display_messages = abap_false

context_root = mr_node ).

Please check the signature and values passed.

Best regards,

Rohit