on 07-13-2009 11:47 AM
Hi All,
I have a specific requirement wherein, i should be able to catch the dump/any system error occured on a backend system and i need to display a message in a proper format instead of showing the actual dump. I communicate with backend( R/3 4.7) from webdynpro for abap using RFC call. If anyone has any clue regarding this please reply..
Thanks in advance
Ashok
Hi Ashok,
This is very simple. Return error messages from RFC if any now in web dynpro handle those error messages using the message manager call method REPORT_ERROR_MESSAGE.
Check the sample code below.
call function BAPI_XXXXXXX
importing
et_error = lt_error.
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
.
Loop at lt_error into ls_error.
report message
CALL METHOD lo_message_manager->report_error_message
EXPORTING
message_text = ls_error-message
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 =
enable_message_navigation =
receiving
message_id =
.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.