Skip to Content
author's profile photo Former Member
Former Member

Warning messages back to back

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on May 31, 2011 at 06:18 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2011 at 06:29 AM

    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....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2011 at 06:56 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2011 at 05:58 AM

    Hi all,

    I got the solution.It's not the problem with warnings , a slight change in code solved it.

    Thank you.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.