on 05-31-2011 7:08 AM
Hi Experts,
I need to raise 2 messages as "Warning" in a window.I am able to raise both messages as "Error" , and when I'm giving the first message as "Error" and second as "Warning",then I can see them on the screen. But if I give first message as "Warning" and second as "Error",I'm unable to see them and when I'm giving both as "Warning" also I can't see them.I'm unable to solve this.Please assist.
Hi,
Messages are sorted by priority for usability reasons.I Think The Flow of order of messages are like this..
ERROR, WARNING AND SUCCESS. I Checked this if you give any order you get in the same way.
>>I'm unable to see them and when I'm giving both as "Warning" also I can't see them.
You can get any no of messages. I am getting here.
Try without using Mesage Area.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
I got the solution.It's not the problem with warnings , a slight change in code solved it.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone,
The Solution is the basic functionality of "Warning" and "Error" messages.That is when you encounter a "Error" message the flow of execution stops,but in case of "Warning" message it continues .So my requirement is to stop the flow and show the warning message on the screen which I did manually using a flag.
Thanks.
Hi Please find the code:
if(***)
Warning*
ls_message-msgty = 'E'.
ls_message-msgid = 'ZXX_XXX'.
ls_message-msgno = 'XXX'.
CALL METHOD lo_message_manager->report_element_t100_message
EXPORTING
msg = ls_message
element = local_data_tmp
attributes = lt_attrib
msg_user_data =
message_type = CO_TYPE_ERROR
is_permanent = ABAP_FALSE
scope_permanent_msg = CO_MSG_SCOPE_CTXT_ELEMENT
msg_index =
cancel_navigation = abap_true
is_validation_independent = ABAP_FALSE
.
ls_message-msgty = 'W'.
ls_message-msgid = 'ZXX_XXX'.
ls_message-msgno = 'XXX'.
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = ls_message-msgid
msgno = ls_message-msgno
msgty = ls_message-msgty
p1 = lv_val3
p2 = lv_val4
p3 =
p4 =
msg_user_data =
is_permanent = ABAP_TRUE
scope_permanent_msg = lo_message_manager->CO_MSG_SCOPE_CONTROLLER
view = 'V_XXX_XXX'
show_as_popup =
controller_permanent_msg =
msg_index =
cancel_navigation = abap_true
.
return.
else
Error*
ls_message-msgty = 'E'.
ls_message-msgid = 'ZXX_XXX'.
ls_message-msgno = 'XXX'.
CALL METHOD lo_message_manager->report_element_t100_message
EXPORTING
msg = ls_message
element = local_data_tmp
attributes = lt_attrib
msg_user_data =
message_type = CO_TYPE_ERROR
is_permanent = ABAP_FALSE
scope_permanent_msg = CO_MSG_SCOPE_CTXT_ELEMENT
msg_index =
cancel_navigation = abap_true
is_validation_independent = ABAP_FALSE
.
ls_message-msgty = 'E'.
ls_message-msgid = 'ZXX_XXX'.
ls_message-msgno = 'XXX'.
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = ls_message-msgid
msgno = ls_message-msgno
msgty = ls_message-msgty
p1 = lv_val3
p2 = lv_val4
p3 =
p4 =
msg_user_data =
is_permanent = ABAP_TRUE
scope_permanent_msg = lo_message_manager->CO_MSG_SCOPE_CONTROLLER
view = 'V_XXX_XXX'
show_as_popup =
controller_permanent_msg =
msg_index =
cancel_navigation = abap_true
.
return.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My problem is not the order in which they are displayed....I explained the order in which they are raised to inform the peculiar behaviour that...only if that order is followed I'm able to them on the screen....otherwise I can't....I'm not concerned about the order..I want to see both messages as warnings....that's it....
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 | |
10 | |
7 | |
6 | |
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.