cancel
Showing results for 
Search instead for 
Did you mean: 

Using Message class

sushant_singh
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Yashpal
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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