11-06-2009 11:22 AM
*Hi All,*
*I want know the User Exit or BADI name For Valaditing Asset No Under Account Assignment Tab. IN ME21N*
*or*
*whenever ME21N Saves.*
*In that Asset No should be captured ..*
*With Regards*
*R.Vinoth*
11-06-2009 11:27 AM
11-06-2009 11:36 AM
HI Pushpraj,
Thanks for your Reply
I tried Using this BADI : ME_PROCESS_PO_CUST
It gets triggered at the 1st level line Item on Account Assignment Category.
Its not getting triggered for 2nd Level Line Item Account Assignment Tab --> Asset Field .
Please do the needful.
Regards,
R.vinoth
11-24-2009 5:43 PM
Hi, Vinu.
The problem is that you can't access Asset Data from the BADI? If this is the problem, try this:
IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM
DATA: ls_mepoitem TYPE mepoitem.
DATA: lt_account TYPE purchase_order_accountings.
DATA wa_items TYPE purchase_order_accounting.
DATA: lt_exkn TYPE mepoaccounting.
ls_mepoitem = im_item->get_data( ).
lt_account = im_item->get_accountings( ).
LOOP AT lt_account INTO wa_items.
lt_exkn = wa_items-accounting->get_data( ).
IF lt_exkn-anln1 EQ 'xxxxxx' "Put Validation Here
ELSE.
error = 'Error Message'.
MESSAGE e398(00) WITH error.
ENDIF.
ENDLOOP.
ENDMETHOD.
Best Regards,
Sebastián Ligueros
11-24-2009 6:20 PM
try this BADI 'ME_PURCHDOC_POSTED'. it will be triggering at the time of hitting save button.
11-24-2009 6:30 PM
The Benefit of ME_PROCESS_PO_CUST is that it will put the "RED LIGHT" only in the items whose account assignments didn't pass the validation.
regards, SL
11-25-2009 3:48 AM
Hi
use this user exit : MM06E005
Function modulename: EXIT_SAPMM06E_012
include: ZXM06U43
follow this sample code:
IF SY-TCODE EQ 'ME21N' .
LOOP AT TEKPO INTO WA_EKPO.
READ TABLE TEKKN WITH KEY EBELP = WA_EKPO-EBELP.
ENDLOOP.
ENDIF.
11-25-2009 5:33 AM
Hi ,use the EXIT MM06E005.
create a ptoj. from CMOD for this ...
and use the function exit EXIT_SAPMM06E_012
table TEKKN to get the accpount assignement data.(All Account Assignments of Purchasing Document)
filed of table ANLN1.
Pls post if u face any problem
Regards