on 09-13-2010 5:49 AM
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,
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'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.