cancel
Showing results for 
Search instead for 
Did you mean: 

populating an error message

Former Member
0 Kudos

Hi,

I need to populate an error message in crmd_order when the status is 'open' or 'dispatched' for uninstall order. how to get only these two status into a table??????

Regards,

Lakshmi

Accepted Solutions (0)

Answers (1)

Answers (1)

suchita_phulkar
Active Contributor
0 Kudos

Hi,

Is it related to CRM2007 ? i mean is it related to WEB UI ? Do you need to display messages on web client ?

regards,

Suchita

Former Member
0 Kudos

Hi

We too have similar requirement .we have to trigger message if status of service order is open .we are using BADI ORDER_SAVE~check_before_save method.

if we use CRM_MESSAGE_COLLECT it causes an exception and retruns .

How to handle the error handling ?

If we have to show error on web page ?

any help is greatly appreciated.

Thanks

Former Member
0 Kudos

Hi,

CRM_MESSAGE_COLLECT can be used to collect the error message . It is not required to do anything specifically to show the same message in CRM UI aswell.

Here is an example code :

CONSTANTS:

lc_message_class TYPE symsgid VALUE 'ZCF_CUST_MSG'.

CALL FUNCTION 'CRM_MESSAGE_COLLECT'

EXPORTING

iv_caller_name = flt_val

iv_ref_object = <fs_data>-ref_guid

iv_ref_kind = <fs_data>-ref_kind

iv_msgno = '002'

iv_msgid = lc_message_class

iv_msgty = 'E'.

flt_val should be the crm object name..

You may use Badi : CRM_GEN_EXT_BADI by setting the FILTER with CRM object name (ex . STATUS ) .

You can write the validation in the Check / Merge method.

Best Regards,

Karthik V