Skip to Content
0
Former Member
Nov 16, 2010 at 11:51 AM

Displaying Error Message In ESS

47 Views

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