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

Error message in BADI

0 Likes
886

Hi,

I want to restrict the user from saving the PO in ME22n. I am using the badi ME_PROCESS_PO_CUST for this enhancement and the method is IF_EX_ME_PROCESS_PO_CUST~CHECK. But my issue is my error message is throwing a dump when i double click it saying conversion from type 'u' to type 'V' not possible . What might be the cause of the dump ??

regards

Saravanan

2 REPLIES 2
Read only

Former Member
0 Likes
476

Hi,

Check the following

1. Login to SAP and execute SE18

2. Input the BAdi ME_PROCESS_PO_CUST and click on Display

3. Click on Interface tab

4. Double click on the Interface name IF_EX_ME_PROCESS_PO_CUST

5. Place the cursor on Check method and follow the menu path GoTo->Documentation->To Component or after placing the cursor simply you can press F9 also.

6. In the displayed documentation you can see about error handling

7. Further to this there is a Link which says Meta field and Error Handling. Click on that

8. Now the displayed documentation is completely about error handling.

Regards,

Raj.

Hope this helps you out. Reward accordingly.

Read only

Former Member
476

Hi,

Raising messages from within BAdis is not a good choice and from the look of it , it appears to be causing a dump.

Look if the BAdi interface has any exceptions defined for the method, if so, raise the exception with your message like:

MESSAGE e002(sy) WITH 'Error' RAISING <badi_exception>.

Or Simply call fm POPUP_TO_CONFIRM to show error messages to user

Regards

Kiran Sure