cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory Fields

Former Member
0 Kudos

Hi all...

I have a serious problem on mandatory fields. I have a view and there are 3 ViewContainerUIs in that view. I changed state to required. In WDDOBEFOREACTION method I check fields with below code:


  DATA: lo_view_controller TYPE REF TO if_wd_view_controller,
        lo_dyn TYPE REF TO cl_wd_dynamic_tool.

  CREATE OBJECT lo_dyn.

  DATA: lt_messages TYPE lo_dyn->t_check_result_message_tab.

  lo_view_controller = wd_this->wd_get_api( ).

  CALL METHOD cl_wd_dynamic_tool=>check_mandatory_attr_on_view
    EXPORTING
      view_controller  = lo_view_controller
      display_messages = abap_true
    IMPORTING
      messages         = lt_messages.

Everything is ok but another big problem occurs here! And I have DropDownList elements here that connected each other. I mean here when I changed a DropDownList it changes the content of other DropDownList. Bu it doesnt work. Please help me about this mandatory fields. How I can check fields in this view with ViewContainerUI elements? Thanks for all your help.

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

How the dropdowns are connected is it changes values based on first dropdown select Action.?

if Yes, in WDDOBEFOREACTION if an error raised it will execute the event handler of the Select of the dropdown.

for that you need to change ActionType of the Action .

In the Action's Tab for the Dropdown Select Action change the Action Type to Validation-Independent.

Now, the Event handler gets executed even there is an error in WDDOBEFOREACTION and the other dropdown is filled properly.

Abhi

Former Member
0 Kudos

At last it works! Thanks for help!

Answers (0)