on 03-17-2014 9:54 AM
Hi
I have a Z WebDynpro that has 2 view: Main and PopUp view
When i press a button in the main view it calles the popup view in a popup window.
The PopUp contains to buttons "yes" and "No"
when user press YES it update the db with some details. Before the DB update is executed i have some check, when the checkes failed the popup window is closed and i want the user will see them in the main view.
is it possible to display the messages in the main view ? cause the checks happens when i m in the popup view/window.
Thanks Ami
i added the following code
call method lo_api_controller->get_message_manager
reciving
message_manager = lo_messge_manager.
call method lo_message_manager->report_message
exporting
message_text = 'error in update'.
return .
and now colsing command to the popup window
but i dont get the message in the main view but in the popup view
how can i fix it - cause i want the error message to b displayed in the main view
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ami,
The messages will be deleted on subsequent action.i.e. let us say you have shown an error message during update on popup window and pressed close button. hence the message no more available in the message manager to display in main view.
I suggest you to put the code for reporting error message during close action of popup window.
Otherwise, you can set the messages as permanent so that it stays even during further action.
call method lo_message_manager->report_message
exporting
message_text = 'error in update'
is_permanent = abap_true.
Hope this helps you.
Regards,
Rama
Hi,
Pass the view name in VIEW parameter of report message to display in corresponding view,
modification to your code:
call method lo_api_controller->get_message_manager
reciving
message_manager = lo_messge_manager.
call method lo_message_manager->report_message
exporting
message_text = 'error in update'
view = 'MAIN' .
then the message will be displayed on MAIN view when the popup is closed.
hope this helps u,
Regards,
Kiran
Hi,
Create Event Handler onaction method when that check fails in your Pop up Screen, and in onaction method implement a code to handle error message in your main view by using interface IF_WD_MESSAGE_MANAGER using method REPORT_ERROR_MESSAGE.
Regards
Shiv
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ami,
Yes, you can do it.
The message manager is at component level and you can still able to see the messages at main view when messages are reported and closed the popup at same time.
Hope you are using the methods from the interface : IF_WD_MESSAGE_MANGER
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.