on 11-17-2009 11:47 AM
Hi all,
I have a WDA Application, in which I have to use the REPORT_ELEMENT_T100_MESSAGE method (class is if_wd_message_manager). I´ve created my message class at T100, the message test and so on.
My code (for example) is:
wa_message-MSGTY = 'E'.
wa_message-MSGID = 'ZWM_GA01'.
wa_message-MSGNO = '013'.
CALL METHOD lo_message_manager->REPORT_ELEMENT_T100_MESSAGE
EXPORTING
MSG = wa_message
ELEMENT = lo_el_drop_sociedad
* ATTRIBUTES =
* MSG_USER_DATA =
* MESSAGE_TYPE = CO_TYPE_ERROR
* IS_PERMANENT = ABAP_FALSE
* SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CTXT_ELEMENT
* MSG_INDEX =
* CANCEL_NAVIGATION =
* IS_VALIDATION_INDEPENDENT = ABAP_FALSE
But, at the screen I get "E:ZWM_GA01:013" instead the string I have at message 013 at ZWM_GA01 message class.
Does anyone know what should do to get it rightly?.
Thanks a lot for your help!!!
Hi all!,
Thanks a lot for your answers.
Saurav Mago, you were right. The code was perfect. I was looking for the error at a wrong place. The problem was at the Message Class. Now, it´s working.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
http://help.sap.com/saphelp_nw70/helpdata/en/6c/7aae42cd7fb611e10000000a155106/content.htm
but intstead of message class , u can use the method RAISE_ERROR_MESSAGE as well
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
The code is perfect and it is working for me also. What you can do is check two things :
1. Type of wa_message.
It should be data wa_message type SYMSG.
2. Check the message class whether any entry exists for 013 or not.
I have used this code and it is working :
DATA lo_el_context TYPE REF TO if_wd_context_element.
data message type SYMSG.
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_el_context = wd_context->get_element( ).
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
message-MSGTY = 'E'.
message-MSGID = 'Z3AF_TM'.
message-MSGNO = '001'.
report message
CALL METHOD lo_message_manager->report_element_t100_message
EXPORTING
msg = message
element = lo_el_context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.