cancel
Showing results for 
Search instead for 
Did you mean: 

problem regarding _REPORT_ATTRIBUTE_ERROR_MESSAGE_

Former Member
0 Kudos

hello gurus,

i am very new to webdynpro abap.i strucked in one senario. i will explain that is in the below.

i have two views.in first view i have one alv table in that employee details(empno , name, designation,status) and one button for

create clearence certificate against selected employee in the alv.if i select one row means one employee and i click on button of first view first it should validate status of employee as full time employee.if not status as 'full time employee' it should through error message.this i have achived with REPORTATTRIBUTE_ERROR_MESSAGE_ .to display this error i have used message area in first view at bottom level.it is working fine.now i changed staus to full time employee and that error message disappear in the message area.now it is allowing me to navigate to second view to create clearence certioficate against selected employee.now i saved the data in second view and click on back button in second view. now i can navigate to first view again,but that error message is displaying again and that attribute staus field also marked with red mark.but it should not displaying error message again .

NOTE1 : i have used one method in component controller for

  • Reference component controller API

DATA lo_api_controller TYPE REF TO if_wd_controller.

  • Determine component controller API

lo_api_controller ?= wd_this->wd_get_api( ).

  • Determine Message Manager

wd_this->messagemanager =

lo_api_controller->get_message_manager( ).

and i maintained one attribute messagemanager in attributes tab of component controller as public.

NOTE2 : i have used clear_message method in inbound plug of first view which was attached to outbound plug of second view which was triggered when we press back button.that logic was

CALL METHOD wd_comp_controller->go_mm->clear_messages

EXPORTING

including_permanent_msg = ABAP_TRUE

only_permanent_msg = ABAP_TRUE

.

also ia have maintained the clear_messages logic in doinit and under back action also.

could any one suggest me on this issue and is there any problem regarding calling of REPORTATTRIBUTE_ERROR_MESSAGE_ method .what parameters should i pass to REPORTATTRIBUTE_ERROR_MESSAGE_ .

could any one suggests me on this how can proceed to next step to resolve my issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I don't think there would be problem with 'REPORT_ATTRIBUTE_ERROR_MESSAGE'.

Instead check whether you are using the same message manager (go_mm) to raise the error i.e check whether your using component controller attribute (message_manager) to raise error message in all the view.

If yes, then don't pass "ABAP_TRUE" to the parameters for the method CLEAR_MESSAGES. By default it will

be "ABAP_FALSE" only. so just call the method as

{

wd_comp_controller->go_mm->clear_messages( ).

}

Regards,

S.Meganadhan