on 11-03-2009 4:01 PM
Hi all,
I want to get the message using the method GET_MESSAGES (Interface IF_WD_MESSAGE_MANAGER) inside a method of my web dynpro, but I have a problem with the type of returning parameter of method get_messages: TY_T_MESSAGES.
When I try to compile, I have this error: TY_T_MESSAGES is unknown.
How can I do for to solve?
Hi,
The return paramater IS OF TYPE TY_T_MESSAGES .
TY_T_MESSAGES os of type table TY_S_MESSAGES.
TYPES :begin of ty_s_message,
msg_index type i,
element type ref to if_wd_context_element,
attribute_name type string,
err_message type string,
msg_type type i,
msg_object type ref to if_message,
msg_user_data type ref to data,
msg_parameter type wdr_name_value_list,
is_permanent_msg type abap_bool,
scope_permanent_msg type wdr_message_scope,
controller_permanent_msg type ref to if_wd_controller,
view type string,
show_as_popup type abap_bool,
attributes type string_table,
is_validation_independent type abap_bool,
msg_id type string,
end of ty_s_message .
types:ty_t_messages type standard table of ty_s_message with default key .
Before you are passing the paramters to get_messages check the declaration of the variables used.
Regards,
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this is in continuation to the above ..
DATA:LS_MESSAGE TYPE ty_s_message,
LT_MESSAGE TYPE TABLE OF ty_s_message.
LS_MESSAGE-msg_index =
LS_MESSAGE-ATTRIBUTE NAME =
LS_MESSAGE-attribute_name
LS_MESSAGE- err_message
LS_MESSAGE- msg_type
LS_MESSAGE- msg_user_data
LS_MESSAGE- msg_parameter
LS_MESSAGE-is_permanent_msg
LS_MESSAGE-scope_permanent_msg
LS_MESSAGE-controller_permanent_msg
LS_MESSAGE-view
LS_MESSAGE-show_as_popup
LS_MESSAGE-attributes
LS_MESSAGE-is_validation_indepenent
LS_MESSAGE-msg_id
PASS WHICH ALL PARAMETERS YOU NEED TO PASS HERE
APPEND LS_MESSAGE TO LT_MESSAGE .
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_api_controller ?= wd_This->Wd_Get_Api( ).
CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
RECEIVING
MESSAGE_MANAGER = lo_message_manager
.
report message
CALL METHOD lo_message_manager->GET_MESSAGES
RECEIVING
RESULT = LT_MESSAGE
.
hi,
When you call the method get_messages :
report message
CALL METHOD lo_message_manager->get_messages
receiving
RESULT = lt_msgs.
To check what type is supported by Result: Double click on get_messages -> Definiton -> select Mehod Get_messages -> Parameters -> See the type of Result - > Double click on ty_t_messages to knw the type of Result supported.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you declared all the local variables properly and passing to the method? I get a message when you do not do that.
Regards
Prasenjit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.