on 12-08-2008 11:04 PM
Hi friends, I am using the below code to display any errors which my Function module returns.
l_current_controller ?= wd_this->wd_get_api( ).
CALL METHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
CALL METHOD l_message_manager->report_t100_message
EXPORTING
msgid = ls_messages-msgid
msgno = ls_messages-msgno
msgty = ls_messages-msgty
p1 = lv_msg1
p2 = lv_msg2
p3 = lv_msg3
p4 = lv_msg4.
If i have errors in my WDA.. once when i hit a button or trigger any action.. the errors are going (not visible any more). I want them to be there till i use clear_messages( ) method .
Becuase the user is not able to know what errors are there and what he has to change in the screen.
can be this possible in WDA// i want the message area to be displayed the errors though i do any other actions..
kindly reply,
Niraja
Hi neerja,
When r u calling this fuction module? If you do it in Domodifyscreen method, it should be always there?
Best regards,
Rohit Mahajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rohit,
I am callign this in wddoinit of comp controller.
along with my WDA loads, i want to show the sales orders errormesages..
once the page loads with errors if i click somewhere like adding a new row to a table or a dropdown value chagne.. its gone..
and also again on submit button aswell, i am calling a FM which can also return error messages..
can some one tell me how to permanenty make that error messages there.. till i again hit submit button and clear them, and make if possible with new errors????
Niraja
Rohit that doenst work for me..
because i have to hit submit button to savve the sales order Once that button is hit, im caling a FM to save that sales order, which can return the messages.
so i dont have a scope to use that method?
if possible then how can i acheive this is there any solution?
niraja
hi Niraja,
write this code in wddomodify************************
method WDDOMODIFYVIEW .
if first_time eq ABAP_TRUE.
else.
get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
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 .
data:
ty_t_messages type table of ty_s_message with default key .
data wa_msg TYPE ty_s_message.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
IF wd_this->IFLAGTEST = 3.
get message manager
report message
CALL METHOD lo_message_manager->report_error_message
EXPORTING
message_text = wd_this->msgtext
params =
msg_user_data =
is_permanent = ABAP_FALSE
scope_permanent_msg = CO_MSG_SCOPE_CONTROLLER
view =
show_as_popup =
controller_permanent_msg =
msg_index =
cancel_navigation =
.
else.
report message
CALL METHOD lo_message_manager->get_messages
receiving
RESULT = ty_t_messages
.
loop at ty_t_messages INTO wa_msg.
wd_this->msgtext = wa_msg-err_message.
ENDLOOP.
wd_this->IFLAGTEST = 3.
endif.
endif.
endmethod.
NOTE: msgtext is a global variable of type string.
and IFLAGTESt is also a global variable of type integer.
keep all your messages as it is...... note this is for just keeping the error message as it is........ you have to do some coding to clear these messages.
regards
Pranav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.