Application Development 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: 

BADI for PO release strategy

Former Member
0 Kudos

Hi,

If PO is released than automatically mail should be sent to authorized person.

How i can achieve this using BADI.Please suggest.And where i have to write the code.

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Priyank

If you are already working on ERP 6.0 the the BAdI of choice is ME_PROCESS_PO_CUST. Below I describe schematically how you implement your requirement:


METHOD IF_EX_ME_PROCESS_PO_CUST~OPEN.

  me->md_trtyp = id_trtyp.  " NOTE: Define MD_TRTYP as instance attribute

" NOTE: Presumably IF ( id_trtyp = 'H' ). => means PO is created

ENDMETHOD.


" Closing Processing
METHOD IF_EX_ME_PROCESS_PO_CUST~CLOSE.
  
  CHECK ( me->md_trtyp = 'H' ).  " implies PO has been created

  CALL METHOD me->send_email( ).
ENDMETHOD.

Regards

Uwe

3 REPLIES 3

uwe_schieferstein
Active Contributor
0 Kudos

Hello Priyank

If you are already working on ERP 6.0 the the BAdI of choice is ME_PROCESS_PO_CUST. Below I describe schematically how you implement your requirement:


METHOD IF_EX_ME_PROCESS_PO_CUST~OPEN.

  me->md_trtyp = id_trtyp.  " NOTE: Define MD_TRTYP as instance attribute

" NOTE: Presumably IF ( id_trtyp = 'H' ). => means PO is created

ENDMETHOD.


" Closing Processing
METHOD IF_EX_ME_PROCESS_PO_CUST~CLOSE.
  
  CHECK ( me->md_trtyp = 'H' ).  " implies PO has been created

  CALL METHOD me->send_email( ).
ENDMETHOD.

Regards

Uwe

0 Kudos

HI,

Thanks for ur helpful reply..Can u tell me BADI should be used if PR is relesed..

0 Kudos

Hello Priyank

You will find all relevant BAdIs for POs and PReq's in package ME. Have a look at:

ME_REQ_POSTED ( Purchase Requisition Posted )

Regards

Uwe