cancel
Showing results for 
Search instead for 
Did you mean: 

Display the message which is in it_tab

Former Member
0 Kudos

Hi Experts,

i want to display the message which is in it_tab .can you tell me which method is applicable for this.

READ TABLE it_tab INTO ls_tab WITH KEY usertype = 'PRIV'.

IF ls_tab-usertype = 'REG'.

lo_api_controller ?= wd_This->wd_get_api( ).

CALL METHOD lo_api_controller->get_message_manager

RECEIVING

message_manager = lo_message_manager.

ENDIF.

Thanks in Advance,

Accepted Solutions (1)

Accepted Solutions (1)

Madhu2004
Active Contributor
0 Kudos

HI,

You can use REPORT_ERROR_MESSAGE to display the message.

If you want to highlight the filed use REPORT_ATTRIBUTE_ERROR_MESSAGE.

These methods are part of IF_WD_MESSAGE_MANAGER and can be used like this.

* 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
  RECEIVING
    message_manager = lo_message_manager
    .

* report message
CALL METHOD lo_message_manager->report_error_message
  EXPORTING
    message_text             = 'MESSAGE TEXT'
*    params                   =
*    msg_user_data            =
*    is_permanent             = ABAP_FALSE
*    scope_permanent_msg      = CO_MSG_SCOPE_CONTROLLER
*    view                     =
*    show_as_popup            =
*    controller_permanent_msg =
*    msg_index                =
*    cancel_navigation        =
    .

If tou have the message class name,message number use can use REPORT_T100_MESSAGE

CALL METHOD lo_message_manager->report_t100_message
      EXPORTING
        msgid = '/MESSAGE CLASS NAME'
        msgno = 237
        msgty = 'E'.

Former Member
0 Kudos

hi,

thank you.

Answers (0)