cancel
Showing results for 
Search instead for 
Did you mean: 

Success or Information messages in application log.

Former Member
0 Kudos

Hi,

On saving a document, I want to place some information or success messages in the application log from my BADI ORDER_SAVE. I tried a lot.

I can place error messages through CRM_MESSAGE_COLLECT.

But not success or information messages.

Please any body help me in this regard.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Harish,

Looks like the message numbers you are processing in the function module CRM_MESSAGE_COLLECT are only for 'errors'.

Please go to Transaction: CRMC_MSGS

Look at the following Application Areas

CRM_ORDER

CRM_ORDERADM_H

CRM_ORDERADM_I

CRM_ORDER_MISC

CRM_ORDER_OUTPUT

Select one of the above and double click 'Single Messages' towards your left side on the screen. Select the relavant message number from the list and check the 'S' flag. Press 'F1' (help) on this box and you will see the following.

-


Only error messages are saved in the processing log. If a message definitely should be saved - contrary to this rule - then the indicator needs to be set.

You need to make sure that a message marked like this can be deleted again - by calling up the function module CRM_MESSAGES_DELETE in the appropriate place in the program.

-


When you do these steps, please note the message 'Do not make any changes (SAP data)'. This is not tested and used from my side. Please see if this impacts other functions. I am not sure. Do necessary R&D before you proceed further. Please explore tables CRMC_MESSAGES_S and CRMC_MESSAGES and see if this helps.

Thanks.

Ajay Kiran

Former Member
0 Kudos

Hi Harish,

Any update on saving the 'success' messages to application log using the above procedure?

Thanks.

Ajay Kiran

Answers (1)

Answers (1)

former_member927251
Active Contributor
0 Kudos

Hi Sirivaram,

Have a look at the following code :

Data : lv_msg_dummy type char80.

MESSAGE i313('message class name') INTO lv_msg_dummy.

CALL METHOD cl_log_ppf=>add_message

EXPORTING

ip_problemclass = lc_prob_imp

ip_handle = ip_application_log.

This will add an information message in your application log for the BADI.

Please reward points if it helps.

Regards,

Amit Mishra