07-23-2010 1:04 PM
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
07-23-2010 1:51 PM
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
07-23-2010 1:51 PM
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
07-23-2010 2:09 PM
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
07-23-2010 2:42 PM
i recommend you for this particular requirement, to use BADIS instead of User Exits..
07-26-2010 6:22 AM
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
07-26-2010 9:44 AM
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.
07-26-2010 9:44 AM
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.