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: 

ME51N badi's

Former Member
0 Kudos

Dear Experts,

My requirement is to validate me51n purhcase requsition, if the account assignment category is 'F' and i have to validate it with G/L account with particular acount number, kindly suggest how to proceed.

Regards,

Thiru

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Enter Transaction SE19

In the Create Implementation section, fill the field CLASSIC BADI with: ME_PROCESS_REQ_CUST and push Create Implementation

set badi name: ZME_PROCESS_REQ_CUST. It will prompt you a screen to create class ZCL_IM__ZME_PROCESS_REQ_CUST, create it and set a breakpoint in method Process Account.

Execute transaction me51n and when you change the account breakpoint is activated.

REMEMBER ACTIVATE BADI IMPLEMENTATION IN TRANSACTION SE19

6 REPLIES 6

Former Member
0 Kudos

Enter Transaction SE19

In the Create Implementation section, fill the field CLASSIC BADI with: ME_PROCESS_REQ_CUST and push Create Implementation

set badi name: ZME_PROCESS_REQ_CUST. It will prompt you a screen to create class ZCL_IM__ZME_PROCESS_REQ_CUST, create it and set a breakpoint in method Process Account.

Execute transaction me51n and when you change the account breakpoint is activated.

REMEMBER ACTIVATE BADI IMPLEMENTATION IN TRANSACTION SE19

Former Member
0 Kudos

Hi Thiru,

Check the below

Enhancement:MEREQ001

User exits

EXIT_SAPLMEREQ_001

EXIT_SAPLMEREQ_002

EXIT_SAPLMEREQ_003

I presume for your requirement you can use - "EXIT_SAPMM06E_006"

Edited by: Raj on Jul 23, 2010 6:40 PM

0 Kudos

i recommend you for this particular requirement, to use BADIS instead of User Exits..

0 Kudos

Hi raj,

I found badi name i want bapi name to get the g/l account details so i can check if the g/l account is "XX' for account assignment category is 'F'.

I tried with "BAPI_PO_GETDETAIL" Bapi.

regards,

Thirukumaran. R

Former Member
0 Kudos

METHOD if_ex_me_process_po_cust~process_item.

*Data declarations

DATA: item TYPE mepoitem,

: lv_sakto TYPE sakto.

item = im_item->get_data( ).

IF item-knttp = 'F'.

lv_sakto = item-sakto.

IF lv_sakto NE '0045310100'.

CLEAR : sy-ucomm.

MESSAGE 'Please enter G/L account number as 45310100' TYPE 'E'.

ENDIF.

ELSEIF item-knttp = 'K'.

lv_sakto = item-sakto.

IF lv_sakto EQ '0045310100'.

CLEAR : sy-ucomm.

MESSAGE 'Please enter G/L Account number other than 45310100' TYPE 'E'.

ENDIF.

ENDIF.

*Clear Variables

CLEAR : lv_sakto.

ENDMETHOD.

Former Member
0 Kudos

METHOD if_ex_me_process_po_cust~process_item.

*Data declarations

DATA: item TYPE mepoitem,

: lv_sakto TYPE sakto.

item = im_item->get_data( ).

IF item-knttp = 'F'.

lv_sakto = item-sakto.

IF lv_sakto NE '0045310100'.

CLEAR : sy-ucomm.

MESSAGE 'Please enter G/L account number as 45310100' TYPE 'E'.

ENDIF.

ELSEIF item-knttp = 'K'.

lv_sakto = item-sakto.

IF lv_sakto EQ '0045310100'.

CLEAR : sy-ucomm.

MESSAGE 'Please enter G/L Account number other than 45310100' TYPE 'E'.

ENDIF.

ENDIF.

*Clear Variables

CLEAR : lv_sakto.

ENDMETHOD.