cancel
Showing results for 
Search instead for 
Did you mean: 

To overwrite the standard warning message

Former Member
0 Kudos

Hi Experts,

Anybody could tell me is it possible to overwrite a standard webdynpro abap message or is it possible to stop the standard SAP warning message and able to throw my warning message.

The standard message is called through an interface, which is implemented .I tried by calling the same interface's method called clear messages to clear the so far called messages. But of no use, i think the clear message method is not defined in the implementation and so it does not clear the standard message.( in the debug i found the implementation code for REPORT_BAPIRET2_MESSAGE of interface if_fitv_fpm_api and no code for method clear message ).

Please throw your light on this.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I don't think you can overwrite the standard webdynpro messages but there is a way with which WebDynpro will not do check for you.

If you make your action "Validation Independent" then WebDynpro will not perform type check for you.

In that case you can do the validation check and throw the error/warning message.

But if you makne your action as validation indepnedent thren control will also not go to wddobeforeaction.

So, try out with validation independent action handler.

Thanks,

Rahul

Former Member
0 Kudos

Hi,

Thanks for the reply.

My requirement is to change the standard message. Tell me the possibilities for this.

Former Member
0 Kudos

Hi,

WD framework does not throw the consistent error in this case of standard errors generated by framework

.

you can check the system fields in WDDOBEFOREACTION with your action name

SY-MSGID

SY-MSGNO

SY-MSGTY

But these field does not provide any help.

For ex: characters 'abcd' in date field

in this case system fields have following values

SY-MSGID = SOTR_MESS

SY-MSGNO = 032 = No concatenated concept exists

SY-MSGTY = E

Does this help?

Thanks,

Rahul

Former Member
0 Kudos

Hi,

Sorry, i dont think it will resolve the problem.

But i have those details . The standard message is of warning type message number 68 from table T100 and webintertace PTRA_WEB_INTERFACE.

Kindly tell me a way either to change the standard message or to stop the standard message.

Former Member
0 Kudos

Hi,

Well, even i don't kow how can you overwrite the standard messages but as i already mentioned, if you make your actionhandler "Validation Independent" then WD framework will not do default validation and you can perform your own validation in actionhandler.

I know system fields will not reslove the purpose. Even sometimes if everything is correct/green the system fields still show error. So, we can not rely on sy-msgid, sy-msgty, sy-msgno.

Thanks,

Rahul

former_member40425
Contributor
0 Kudos

Hi,

Make your event handler Validation Independent then use Method Clear_Messages of interface IF_WD_MESSAGE_MANAGER using code wizard (cntrl+f7) indside your event handler. It will clear your standard message.

Now display your customised message by using REPORT_ERROR_MESSAGE, REPORT_WARNING, REPORT_SUCCESS or REPORT_T100_MESSAGE.

I hope it helps.

Regards,

Rohit

Former Member
0 Kudos

Hi,

The standard warning is from a standard method say CREATE in the component controller.I want to write the code in post exit of the CREATE method.

No Event is available in the component controller.

Can you please suggest.

Former Member
0 Kudos

Hi,

You can create one method in which you can get the instance of message manager if_wd_message_manager and then call the method to clear the messages.

Call this method after the create method of component controller.

if required, raise an event from componentcontroller and handle it in view and subsequently call the method to clear the messages.

Thanks,

Rahul