cancel
Showing results for 
Search instead for 
Did you mean: 

Disappearing of error message when i click on f4 help

Former Member
0 Kudos

Hello all,

I've got a little problem with displaying messages in WebUI (CRM 7.0) .

when i do some wrong entries in assingment block and then i press enter then it display error message but

when i click on f4 help the error message got deleted from the ui.

I want error message to be displayed till entry is not filled with right value.

I have written this code in modify method of handler class.

lr_core = cl_crm_bol_core=>get_instance( ).

gr_gmsg = lr_core->get_global_message_cont( ).

gr_gmsg->add_bapi_messages( it_bapi_messages = lt_return

iv_show_only_once = 'X' ).

lv_object_id = lr_bp->get_object_id( ).

lr_msg_cont ?= lr_bp->get_message_container( ).

lr_msg_cont->add_messages(

iv_object_name = me->tv_object_name

iv_object_id = lv_object_id

it_bapi_messages = lt_return

iv_show_only_once = abap_true ).

Regards,

Nawal Kishore

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Nawal,

What is happening now is, the error messages are set to be displayed only once in the Web UI after the message is

added to the message container. In the next round trip these messages will get cleared since you have passed

the parameter 'iv_show_only_once' as true in both the add message methods. You should pass this parameter

value as false in order to retain the error messages on the UI across the round trips. You can simply remove that

parameter from the method as by default this parameter takes the value as 'false'.

Regards

Leon

[SAP Community Network Forums on mobile|https://cw.sdn.sap.com/cw/ideas/7910]

Former Member
0 Kudos

Hi Leon,

When I make iv_show_only_once parameter as abap_false then the error message remains on the web ui but when i give correct value in second time from the f4 help then previous error message is still there on the ui.

Thanks & Regards,

Nawal kishore

kavindra_joshi
Active Contributor
0 Kudos

How long do you want to show the message ? Message could be deleted any time depending on your requirement.If you don't want to show the message after you have retrieved the right values , then you can validate this step.

Check if you have right input to the F4 or check if you have retrieved values for the input & once you have done that do delete the message from the message container.

Regards

Kavindra

0 Kudos

Hi Nawal,

In such case, you will have to validate and delete the messages in the round trips. In case a validation is passedm

the you will have to delete the corresponding error message from the container. This will solve your problem.

Regards

Leon

Former Member
0 Kudos

Hi Kishore,

While adding messages to gloabal message container you mentioned show_only_once as X.Remove this and check .

Regards,

Anitha

Former Member
0 Kudos

Hi Anitha,

Thank you for replying.we can not remove that parameter because it is not an optional parameter and also when i give show only once parameter value as abap_false then it also shows errror message after giving the right value from f4 help.

Thanks & Regards,

Nawal Kishore

Former Member
0 Kudos

Hi,

Just uncheck the parameter IV_SHOW_ONLY_ONCE and try .

Regards,

Nithish

Former Member
0 Kudos

Hi Nithish,

Thank you for replying.we can not remove that parameter because it is not an optional parameter and also when i give show only once parameter value as abap_false then it also shows errror message after giving the right value from f4 help.

Thanks & Regards

Nawal Kishore