cancel
Showing results for 
Search instead for 
Did you mean: 

Error using report_attribute_error_message not navigating to checkbox

Former Member
0 Kudos

Hi all,

I am using report_attribute_error_message to navigate to the UI element where the error has occurred. Its working fine for textboxes, dropdowns, and other UI elements except radiobutton groups and checkbox. There are list of UI elemtents and whenever error occurs a separate link is displayed at the top of the page which navigates to that particular UI element. When clicked on the error link, it does not automatically navigate to the checkbox/ radiobutton but works fine for other elements. When the checkbox is in the same page, it works as it should.

Any help will be highly appreciated.

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_FALSE
    IMPORTING
      messages         = lt_messages.

  l_message_manager = lo_view_controller->get_message_manager( ).
  IF lt_messages IS NOT INITIAL.

    LOOP AT LT_MESSAGES INTO WA_MESSAGES .

      L_LINES = SY-TABIX .
      IF WA_MESSAGES-attribute_name(3) EQ 'ZCB'.
        READ TABLE IT_ATTR INTO WA_ATTR WITH KEY attribute_name+3(10) = WA_MESSAGES-attribute_name+3(10) .
        IF SY-SUBRC NE 0 .
          MOVE  WA_MESSAGES-attribute_name TO WA_ATTR-attribute_name .
          APPEND WA_ATTR TO IT_ATTR .
        ELSE .
          DELETE LT_MESSAGES INDEX L_LINES .
          CONTINUE .
        ENDIF .
      ENDIF .

      l_message-msgty = 'E'.
      l_message-msgid = 'WEBDYNPRO_RT'.
      l_message-msgno = '014'.

      l_message_manager->report_attribute_error_message(
         message_text      =  l_text
         element           = WA_MESSAGES-context_element
         attribute_name    = WA_MESSAGES-attribute_name
         ).

    ENDLOOP .

Thanks

Sandeep

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Yes, it doesnot work with those (RB,CB) UI elements...Have you checked for any note..I have also tried but no luck..

Regards,

Lekha.