Skip to Content
avatar image
Former Member

Using Message class

Hi Experts,

I want to use message class- id and type for mesage handling in my web dynpro application . How can I do it. Please explain me with reference to Code.

points are sure.

Thanks,

Sushant Singh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 05, 2007 at 07:23 AM

    Hi Sushant,

    Try the following Code Snippet.

    <i>* 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_T100_MESSAGE

    EXPORTING

    MSGID = <Message Class Name>

    MSGNO = <Message Number>

    MSGTY = <Type>

    • P1 =

    • P2 =

    • P3 =

    • P4 =

    • MSG_USER_DATA =

    • VIEW =

    • SHOW_AS_POPUP =

    • IS_PERMANENT =

    • SCOPE_PERMANENT_MSG =

    • CONTROLLER_PERMANENT_MSG =

    • MSG_INDEX =

    • CANCEL_NAVIGATION =

    .</i>

    Thanks and Regards,

    Saravana. S

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 05, 2007 at 07:23 AM

    Hi ,

    see the code below .........

    i have created a message manager object in assistance class...

    CALL METHOD wd_assist->g_message_manager->REPORT_T100_Message

    EXPORTING

    MSGID = 'Z_MSGCLASS'

    MSGNO = '395'

    MSGTY = 'E' .

    for highlighing the element in which error occured .....

    ls_t100_message is of type symsg .

    ls_t100_message-msgty = 'E'.

    ls_t100_message-msgno = '402'.

    ls_t100_message-msgid = 'Z_MSGCLASS'.

    wd_assist->g_message_manager->report_attribute_t100_message(

    msg = ls_t100_message

    element = LR_ELEM

    attribute_name = attribute name ).

    Regards

    Yash

    Add comment
    10|10000 characters needed characters exceeded