Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Displaying Error Message In ESS

Former Member
0 Likes
454

Hi Experts,

The steps of my program kinda look like this :

1. User input the begin date and end date of his / her travelling date on ESS web page.

2. If the end date was more than 2 weeks ago then the Error Message displayed in the web page.

I'm trying to use the CALL METHOD message_handler->add_message, but it seems doesn't work at all...

I'm using the method like this :

DATA badi_message_handler TYPE REF TO cl_hrpa_message_list.

DATA message_handler TYPE REF TO if_hrpa_message_handler.

DATA msg TYPE symsg.

DATA is_ok TYPE boole_d.

CREATE OBJECT badi_message_handler.

message_handler = badi_message_handler.

msg-msgid = 'PG'.

msg-msgty = 'E'.

msg-msgno = '016'.

msg-msgv1 = 'Cannot claim more than 2 weeks'.

CALL METHOD message_handler->add_message

EXPORTING

message = msg

cause = message_handler->unknown.

is_ok = space.

badi_message_handler->add_messages( message_handler ).

I've already attach that code in Include ZXTRVU03 for user exit FITR0003

and the Interface IF_EX_TRIP_WEB_CHECK~USER_CHECK_RECEIPTS for the BADI TRIP_WEB_CHECK.

Is there anything wrong with my code or the place where I put that code is not right?

Actually I'm a newbie in ABAP OO, but is there any other method to display the error message on ESS web page, because I think that method 'add_message' is only for adding the message to message handler, not displaying it.

I've really appriciated for all of your help.

Thx

Edited by: Jonathan Febrian on Nov 3, 2010 12:05 PM

Hi Experts,

The steps of my program kinda look like this :

1. User input the begin date and end date of his / her travelling date on ESS web page.

2. If the end date was more than 2 weeks ago then the Error Message displayed in the web page.

I'm trying to use the CALL METHOD message_handler->add_message, but it seems doesn't work at all...

I'm using the method like this :

DATA badi_message_handler TYPE REF TO cl_hrpa_message_list.

DATA message_handler TYPE REF TO if_hrpa_message_handler.

DATA msg TYPE symsg.

DATA is_ok TYPE boole_d.

CREATE OBJECT badi_message_handler.

message_handler = badi_message_handler.

msg-msgid = 'PG'.

msg-msgty = 'E'.

msg-msgno = '016'.

msg-msgv1 = 'Cannot claim more than 2 weeks'.

CALL METHOD message_handler->add_message

EXPORTING

message = msg

cause = message_handler->unknown.

is_ok = space.

badi_message_handler->add_messages( message_handler ).

I've already attach that code in Include ZXTRVU03 for user exit FITR0003

and the Interface IF_EX_TRIP_WEB_CHECK~USER_CHECK_RECEIPTS for the BADI TRIP_WEB_CHECK.

Is there anything wrong with my code or the place where I put that code is not right?

Actually I'm a newbie in ABAP OO, but is there any other method to display the error message on ESS web page, because I think that method 'add_message' is only for adding the message to message handler, not displaying it.

I've really appriciated for all of your help.

Thx

Edited by: Jonathan Febrian on Nov 3, 2010 12:05 PM

1 REPLY 1
Read only

0 Likes
399

Was there ever an answer to this? Having the same problem.