Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Giving Error Message

Hi Friends,

How to give error message upon failure of operation in abap webdynpro and

when user double clicks on that error message,it should point to the corresponding field from which error

has triggered.

Kindly reply......

Thanks in advance.

Former Member


* get message manager
DATA lo_api_controller     TYPE REF TO if_wd_controller.
DATA lo_message_manager    TYPE REF TO if_wd_message_manager.

lo_api_controller ?= wd_this->wd_get_api( ).

CALL METHOD lo_api_controller->get_message_manager
    message_manager = lo_message_manager

* report message
CALL METHOD lo_message_manager->report_attribute_error_message
    message_text              = ' Error Text'
    element                   = lo_el_context
    attribute_name            = '<ContextAttribute_name>' " Give attribute name here

it will help you.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question