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

BADI

Former Member
0 Likes
700

Hi all,

how to send message from BADI's method

(I am using BADI ME_PROCESS_PO_CUST method CHECK.)

Robert

Message was edited by: Robert Bouchard

6 REPLIES 6
Read only

Former Member
0 Likes
653

Hi ,

First write a include like :

INCLUDE mm_messages_mac.

  • check whether the field is valid

SELECT SINGLE * FROM tbsg INTO ls_tbsg WHERE bsgru EQ ls_customer-badi_bsgru.

IF NOT sy-subrc IS INITIAL.

mmpur_metafield mmmfd_cust_01.

mmpur_message_forced 'E' 'ME' '083' text-004 '' '' ''.

Check sample code.

This will work.

Read only

0 Likes
653

HI Lanka

And wich type for structure "ls_customer" ?

Message was edited by: Robert Bouchard

Read only

0 Likes
653

Hi Robert,

use this:

data : ls_customer TYPE mepo_badi_exampl.

It is working for me.

Please let me know your problem is resolved.

Message was edited by: Lanka Murthy

Read only

suresh_datti
Active Contributor
0 Likes
653

Hi Robert,

this BAdI does not have any RETURN parameters.. so one option could be trying to dispaly the message directly with the MESSAGE statement.. try ur luck,

Suresh Datti

Read only

0 Likes
653

Hi Suresh

Have try this possibility but not working!

Read only

Former Member
0 Likes
653

see the documentation of the method check.

In this documentation there is a link to

Metafield and Error Handling

I hope this will help you

Sometimes the statment message doesn't work in BADI.

You have to use BDT /BTE or try with Metafield and Error Handling

bye

Message was edited by: Enzo Porcasi