on 04-08-2010 12:32 PM
I need to display an err message related to blank field in the table.
How do I achieve this?
I have used get_static_attributes_table to get table entries and READ the table to check for desired field is blank.
If sy-subrc is 0, i try to raise an err message using report_element_error_message but it doesn't seem to work.
There is no dump or anything....just the err message does not get displayed and the program continues normally where it is expected to stop and display the err
Thanks!
I was able to achieve this using REPORT_MESSAGE and then EXIT to display the error on the same page.
IF sy-subrc EQ 0.
*" Display Error message
DATA: lo_api_controller TYPE REF TO if_wd_controller,
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_message
EXPORTING
message_text = 'Name cannot be BLANK'.
EXIT.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.