cancel
Showing results for 
Search instead for 
Did you mean: 

Message UI element.

former_member199126
Participant
0 Kudos

Guys need help in using Message UI element . The scenario is i am using select options where i give range and click execute . The results from the DB table are displayed in the ALV.

If the Query did not find the values in the DB table , i should get a message in the Message UI element saying range not found.

Help Needed.

Accepted Solutions (0)

Answers (1)

Answers (1)

surajarafath
Contributor
0 Kudos

then you can raise the message at your SELECT statement for checking sy-subrc ne 0 and raise the message and return.

former_member199126
Participant
0 Kudos

thanks , but i do not want to display the message in a popup window. I need it to be displayed in a message UI element which is static in the Browser window.

Please tell me how to integrate the Message UI element and populate it during runtime.

Former Member
0 Kudos

Hi karthik,

Using the code wizard select generate message and give the methods from IF_WD_MESSAGE_MANAGER

For ex: generate REPORT_ERROR_MESSAGE method and pass some message into the MESSAGE parameter.

And as you have MESSAGE UI element in your layout, the message will be displayed in that element.

former_member199126
Participant
0 Kudos

working .

Edited by: karthikeyan.chandrasekaran on Feb 3, 2012 12:58 PM

surajarafath
Contributor
0 Kudos

Then you go to the code wizard and Check the methods and selct it.

or just follow the below example...

* get message manager
  DATA lo_api_controller     TYPE REF TO if_wd_controller.
  DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
  DATA lv_text TYPE string.
  lo_api_controller ?= wd_this->wd_get_api( ).
  lo_message_manager =  lo_api_controller->get_message_manager( ).
  lv_text = 'ERROR MESSAGE'.
  lo_message_manager->report_message( lv_text ).

former_member199125
Active Contributor
0 Kudos

karthikeyan,

In a view message can be dispalyed only in one message area UI element.

and select option pop up message is standard feature, this feature you have overwrite bt get_message_manager( ).?

Regards

Srinivas

Edited by: sanasrinivas on Feb 3, 2012 1:03 PM

former_member199126
Participant
0 Kudos

Thank you so much , I was looking forward to use more than one message UI element in a view. Problem solved.