cancel
Showing results for 
Search instead for 
Did you mean: 

Custom error message on BP SAP GUI Screen

jhon_jhon
Explorer
0 Kudos

Hi

Can any one suggest me , how to display custom error message on BP SAP GUI Screen.

I'm using sap CRM 5.O version, Where I have a requirement to display custom error message for EEWB-ZFIELD.

I have tried all BADI's none of them are working and no return parameters.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Jhon,

Try FM -  BUS_MESSAGE_STORE. SAP uses this FM to store error message.

See FM - BUP_BUPA_PAI_BUP310 and other similar functions in its function group. All of them use BUS_MESSAGE_STORE to store error message for checks like Title, Gender, etc.

Hope you can use it for your Z field.

Cheers,

Niraj

dharmakasi
Active Contributor
0 Kudos

Hi Jhon,

keep a break point in this class cl_exithandler , get_instance method line number 14 for finding out the desired correct badi. You can write logic to provide error message using the FM 'CRM_MESSAGES_COLLECT'  and CRM_MESSAGE_DELETE fms to delete the message.

Best Regards,

Dhharmakasi.

jhon_jhon
Explorer
0 Kudos

Hi

dharmakasi
Active Contributor
0 Kudos

Hi John,

Unfortunately even i did not find these 2 standard FMs used for BP GUI screen.

I dont know whether you have all other ways to generate message like,

using class cl_crm_genil_global_mess_cont sample code

lr_msg_service = cl_crm_bol_core=>get_instance( ).

           
IF lr_core1 IS BOUND.

              lr_msg_service
= lr_core1->get_global_message_cont( ).

           
ENDIF.

lr_msg_service ->add_message(

                                       iv_msg_type  
= 'E'

                                       iv_msg_id    
= ' ' "message class

                                       iv_msg_number
= '000'

                                       iv_show_only_once
= 'X' ).

you can try with incompleness check option in spro settings as well if it is relevant for you.

Best Regards,
Dharmakasi.