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: 

Userexit/BADI on save button for ME11/ME12

Former Member
0 Kudos

Hi All,

I have a requirement that on save button for ME11/ ME12 to check a custom authorization object.

If the authorization fails, then throw an error message.

Any BADI / user exit available for this to enhance ME11/ ME12.

Regards

Sanjib.

3 REPLIES 3

Former Member
0 Kudos

Hi Sanjib,

You have to use User Exit and you have to write your code in perticular exit include program.

Please find below user exits belongs to ME11 . you can select suitable to your requirement from below .

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.
M06E0005 Role determination for release of purchasing documents
ME590001 Grouping of requsitions for PO split in ME59
MEETA001 Define schedule line type (backlog, immed. req., preview)
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release orders
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
AMPL0001 User subscreen for additional data on AMPL

or

you can find relevant BADI for any transaction by knowing the programme name of particular TCODE and Package

Former Member
0 Kudos

Go to se18 and go for f4 help There please give the package name as ME ( your program package name ). Then you will get the list of user exit.

Then go to the correspondin user exit and activate the debugger. In this way you can easliy identify the user exits.

For identify the BADI, search the corresponding program with CL_EXITHANDLER. Like this you can easliy identify whether there is any BADI or not.

Also go to se 24, give the class name CL_EXITHANDLER and then go to method GET_INSTANCE and activate the debugger there. Then execute your transaction. If there is any badi, it will stop there.

Regards,

Nikhil

Former Member
0 Kudos

Hi Sanjib,

Go to transaction SE24, class name CL_EXITHANDLER, go to methods, double click on method GET_INSTANCE.

Set a break point at

CALL METHOD cl_exithandler=>get_class_name_by_interface

EXPORTING

instance = instance

IMPORTING

class_name = class_name

CHANGING

exit_name = exit_name

EXCEPTIONS

no_reference = 1

no_interface_reference = 2

no_exit_interface = 3

data_incons_in_exit_managem = 4

class_not_implement_interface = 5

OTHERS = 6.

CASE sy-subrc.

Now run trasaction ME11/12, and press Save button, your control will break at each BADI(If any), exit name and instance will give you the BADI details.

Now for exits, debug at save button, go to menu breakpoints->breakpoint at. Set the breakpoint at statement as call customer

Hope this will solve your problem, and wil be helpful for u to find BAdi/Exit for any transactions.

Thanks and Regards,

Antony Thomas