Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with Error Message in BAdi

0 Likes
999

Hi,

I am using BAdi ME_PROCESS_PO_CUST to trigger an error message whenever the user is trying the save the PO through ME21, ME22, ME21N, ME22N based on some validation.

My issue is i am able to generate the error message in log view

By using include mm_messages_mac(macro) or by method cl_message_mm=>create but once the log is displayed and if i double click the message it is throwing a dump as "Conversion of type "u" to type "v" not supported."

I have added the code in IF_EX_ME_PROCESS_PO_CUST~CHECK and have also set parameter ch_failed = 'X'.

I am using ECC 5.0

regards

Saravanan

Hi,

I am using BAdi ME_PROCESS_PO_CUST to trigger an error message whenever the user is trying the save the PO through ME21, ME22, ME21N, ME22N based on some validation.

My issue is i am able to generate the error message in log view

By using include mm_messages_mac(macro) or by method cl_message_mm=>create but once the log is displayed and if i double click the message it is throwing a dump as "Conversion of type "u" to type "v" not supported."

I have added the code in IF_EX_ME_PROCESS_PO_CUST~CHECK and have also set parameter ch_failed = 'X'.

I am using ECC 5.0

regards

Saravanan

2 REPLIES 2
Read only

mvoros
Active Contributor
0 Likes
751

Hi,

could you paste how exactly you produce message? Probably you just fill some parameter incorrect. You can check Code Sample for your BADI in transaction SE18 (Goto -> Code Sample -> Display). Unfortunately they do not care about messages in sample for method CHECK but from another method I found that all macros are defined in include MM_MESSAGES_MAC. So you can check what parameters should you pass to macro there.

Cheers

Read only

Former Member
0 Likes
751

Hi,

I have used this cl_message_mm and it works for me but i am on version ECC6.0. Otherwise you can directly use the message statement if the message length is small.

Thanks

Raghavendra