on 11-16-2010 11:51 AM
Hi Experts,
I want to display an Error message in ESS page. The error message was triggered in user exit (not from abap web dynpro)
I've already using the CL_WDR_MESSAGE_MANAGER class, but it not working too...
My code in the user exit is like this
=====================================================
DATA message_manager TYPE REF TO cl_wdr_message_manager.
DATA message_comp TYPE REF TO cl_wdr_component.
CREATE OBJECT message_manager
EXPORTING
component = message_comp.
CALL METHOD message_manager->raise_message
EXPORTING
msg = 'Test Error'
type = 1.
========================================================
It will create Critical Error in the page : Access via NULL object reference not possible
I think it because the object of message_comp is not created properly. The CL_WDR_COMPONENT class is an abstract class so I couldn't make the instance of that class...
Is there any other solutions?
Any Helpfull Answer will be appriciated
You can't just create a new instanace of the message manager. You must get the instance that already has been instaniated by the Web Dynpro Component via the Component APIs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
You can try getting the current component instance using somthing like this "wd_this->wd_get_api( )->get_component( )"
and pass this to the CREATE OBJECT statement...
Not sure if it will work..give it a try though.
Thanks,
Aditya.
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 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.