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: 

Need User Exit or Badi Name for Asset No In Me21n

Former Member
0 Kudos

*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*

7 REPLIES 7

Former Member
0 Kudos

HI Vinoth

BAdI : ME_PROCESS_PO_CUST

Pushpraj

0 Kudos

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

0 Kudos

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

Peranandam
Contributor
0 Kudos

try this BADI 'ME_PURCHDOC_POSTED'. it will be triggering at the time of hitting save button.

0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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