cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit for ME21n

Former Member
0 Kudos

Dear all,

I have some problems with ME21n for MM user exits.

I create a customized table to store user name, company code, order type, and purch. group.

User Exit used is

EXIT_SAPMM06E_006

Using the customised table, system will automatically defaulted the purchasing group for the user for Purchase Order.

Only users in the customised table are allowed to create Purchase Order

I able to run my written code in the above user exit, however, the value output for purchasing group is still the value that i key in. I want the value change according the value in the customized table

CODE SAMPLE

if i_cekko-bukrs = 'XXXX'.

if i_cekko-bsart ne 'XXXX'.

MESSAGE e000(ZMM).

else.

clear itab.

select * from XXXX INTO CORRESPONDING FIELDS OF itab

where uname = sy-uname.

  • and ekgrp = i_ekko-ekgrp.

endselect.

if sy-subrc ne 0.

MESSAGE e001(ZMM).

else.

  • clear itab.

  • select * from XXXXX INTO CORRESPONDING FIELDS OF itab

  • where uname = sy-uname

  • and ekgrp = i_ekko-ekgrp.

  • endselect.

  • if sy-subrc ne 0.

  • MESSAGE w002(ZMM) WITH itab-ekgrp.

  • i_ekko-ekgrp = itab-ekgrp.

  • else.

e_cekko-ekgrp = itab-ekgrp.

  • endif.

endif.

endif.

Anyone know the solution? What user exits is more suitable?

Pls help

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello rayblur,

CODE SAMPLE.....

data: f1(50) value 'I_EKKO-EKGRP'.

field-symbols: <fs1> type any.

access ur custome table with user name/company code/order type using i_ekko and get the purch group.

assign (f1) to <fs1>.

<fs1> = purchase group.

use the same exit which u r using. It will change it when the exit is fired.

nishanthbhandar
Contributor
0 Kudos

Put breakpoint at the exit handler class CL_EXITHANDLER in the method GET_INSTANCE.Perform the activity of inputting a value for purchasing group.Get the list of BADI's and find the one suitable for your requirement.The exit EXIT_SAPMM06E_006 should be putting the value the first time you run ME21N.Check whether this gets triggered for user actions on the screen or on save.There is no point in coding here if you want the value to change as per user entries.

Cheers

Nishanth

Former Member
0 Kudos

Hi rayblur,

put a breakpoint in ur user exit n chk if it stops ther during the transaction at the appropriate instance,ie, after u want the user ecit to trigger. if not, then probably u need to use some other user exit...

else try using the BADI 'ME_PROCESS_PO_CUST'.

Hope it helps,

Regards,

Bikash

Former Member
0 Kudos

HI

GOOD

CHECK OUT WITH FOLLOWING USER EXITS AND USE ACCORDINGLY.

AMPL0001 User subscreen for additional data on AMPL

LMEDR001 Enhancements to print program

LMELA002 Adopt batch no. from shipping notification when posting a GR

LMELA010 Inbound shipping notification: Transfer item data from IDOC

LMEQR001 User exit for source determination

LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt

LWSUS001 Customer-Specific Source Determination in Retail

M06B0001 Role determination for purchase requisition release

M06B0002 Changes to comm. structure for purchase requisition release

M06B0003 Number range and document number

M06B0004 Number range and document number

M06B0005 Changes to comm. structure for overall release of requisn.

M06E0004 Changes to communication structure for release purch. doc.

ME590001 Grouping of requsitions for PO split in ME59

MEFLD004 Determine earliest delivery date f. check w. GR (only PO)

MEQUERY1 Enhancement to Document Overview ME21N/ME51N

MM06E007 Change document for requisitions upon conversion into PO

THANKS

MRUTYUN

Former Member
0 Kudos

I have try on few of these user exits that you posted, but still the value cannot change. I'm still wondering how i can do this task...

Thanks..

Anyone with better solution