Skip to Content
avatar image
Former Member

Error Message

Hello All.

How to generate error message?

If the user enters a wrong value for a field how to generate error message.

Regards,

SampathKumar G.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    May 29, 2009 at 07:10 AM

    Hi,

    Please search the forum before you post as they are many related posts on the same.

    Regards,

    Lekha.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2009 at 07:13 AM

    Hello lekha.

    I have gone through the queries posted in the forum.

    But since I am very new to WebDynPro I am not able to understand what exactly they are talking about.

    A very basic example or explanation would help me.

    Regards,

    sampathKumar G.

    Add comment
    10|10000 characters needed characters exceeded

  • May 29, 2009 at 07:14 AM

    Hi,

    use following code to generate 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->report_error_message
      EXPORTING
        message_text              =   'Error_Text' " Give your error text here
    *    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         =
    *    enable_message_navigation =
    * receiving
    *    message_id                =
        .

    I hope it helps.

    Regards,

    Rohit

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 03, 2009 at 04:28 AM

    Thank You all. Got it resolved.

    Add comment
    10|10000 characters needed characters exceeded