cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Messsage Manager

Yashpal
Active Contributor
0 Kudos

Hi Friends ,

I am getting some problem while using the message manager ,the scenario is like this I am having a table control in view , if there are errors in the values entered in the inputfield of table rows i am calling the method report_attribute_t100Message( ) to display error messages , in this method i am passing the message , context element and the attribute name . This things are working fine when i am in the default view and table control is also in the default view but when i use navigation , means if the table control is in second view the errors are not displayed . I dont know why its not displaying messages, I have checked the message manager object also errors are present in it but not displayed .

Can anybody tell why it is happening and how to solve it ?

Regards

Yashpal

Accepted Solutions (0)

Answers (1)

Answers (1)

S-H
Active Participant
0 Kudos

Hi Yashpal,

Message displayed is depend on where you display the messages, as i understand is that you are using navigation if you raise the message and do the navigation then the message can be removed due to the page refresh.

Another way to find out whether this is due to the refresh problem is to make the message as PERMANENT and see if the message comes. If the message comes after making message permanent then place the code of raising the message in another place.

Best regards,

Suresh

Yashpal
Active Contributor
0 Kudos

Hi Suresh ,

No I am not refreshing the view , Problem is when the message is raised in view other than default view , means i navigate from default view to other view say view2 . in view2 there is a table control in that the messages are raised but not displayed .

But for example when i put the table control in default view and raise messages they are displayed .

Regards

Yashpal

Former Member
0 Kudos

Hi,

I have a similar problem, I am navigating from initial screen to my detail screen which has 2 tab strips - one header and one item . Each of them have 4 tabs. I am using REPORT_ATTRIBUTE_T100_MESSAGE to raise the message. Whenever there is an error on the detail tab, its displayed properly as a link with focus on the supplied element. The message disappears automatically after correcting the error.

But if there is an error display on the header its displayed as REPORT_T100_MESSAGE i.e. without the link to navigate to the element and also message does not get clear automatically once the error is corrected.

Please help us.. this is real urgent.

Regards

Rohit Chowdhary

Former Member
0 Kudos

Hi

Any updates on this. We are using assitance class and Message manager is defined in assistance class.

Regards

Rohit Chowdhary

thomas_szcs
Active Contributor
0 Kudos

Hello Rohit,

Have you checked if the message is set to permanent?

Best regards,

Thomas

Yashpal
Active Contributor
0 Kudos

Hi Thomas,

No its not a permanent message its lifetime is default i.e context element , and in some cases the message appears but the link to message is missing .we are getting this problem only when we are not in default view.

Regards

Yashpal

thomas_szcs
Active Contributor
0 Kudos

Hello Yashpal,

Could you past the source code snippet of the message manager call, please?

Best regards,

Thomas

P.S: If you don't specify a context attribute and context element, there won't be a link. Specifying a context element alone, results in a link for some ui elements, like a table, if it points to a table row.

Yashpal
Active Contributor
0 Kudos

Hi thomas,

pls find the code snippet for the message manager

im_elem is type ref to if_wd_context_element.

g_message_manager is defined as an attribute of assistance class and instantinated in component controller init.

the follwing call to the message manager is part of an assistance class method which is called in the view as wd_assist->check_material( ) with import export parameters i.e im_elem is passed as an export parameter

lw_msg-msgty = 'E'.

lw_msg-msgid = 'ZMA_MSGCLASS'.

lw_msg-msgno = '294'.

CALL METHOD me->g_message_manager->report_attribute_t100_message

EXPORTING

msg = lw_msg

element = im_elem

attribute_name = 'MATNR'.

thomas_szcs
Active Contributor
0 Kudos

Hi Yashpal,

The call looks ok. My suggestion is to create a support ticket and have an engineer take a look.

Best regards,

Thomas

Yashpal
Active Contributor
0 Kudos

Thanks Thomas ! we have also thought about the same but we want to confirm that is there any problem from our side i.e in code writing or some thing else through SDN .

Regards

Yashpal

Former Member
0 Kudos

Hi Yashpal,

Instead of reporting T100 messages directly in each view, better solution will be have a buffer of messages in component controller and add the messages to this buffer withour reporting the T100 message directly.

In component controller's wddopostprocessing , loop through the buffer of message and report each message using report_t100_attribute_message one by one. Do the reporting of messages only in this method.

I think, this will work fine for your problem

Thanks,

Prashanth

Yashpal
Active Contributor
0 Kudos

Hi Prashanth ,

I am doing the validation of nodes when some action is performed i.e in wdBeforeAction( ) if there are error in the node the handler method is not called and errors are displayed . if i do the validation in wdPostProcessing () it will be of no use because the handler method will execute first and then wdPostProcessing() is called .

Regards

Yashpal

Yashpal
Active Contributor
0 Kudos

Hi All ,

My problem get solved !! instead of using ALV as a table in default view i have used table control and now all the error messages with the link to attributes are displayed . I think there might be some problem with messages if we use ALV.

Regards

Yashpal