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: 

User exit for ME21N (Not functional or customer exit)

Former Member
0 Kudos

Hi Guys,

I want to get a user exit for PO as my requirement is to call custom screen before the PO is getting saved.

I have the functional exits and badi's list which will not fulfill my requirement as because on my custom screen i have cancel button.

On clicking the control needs to come back to the me21n second screen with the data entered with out order getting created.

The screen number for the second screen in ME21N is 14.

if i call screen 14 it will work in a user exit where as in customer exit(functional exit) we have limitations with the exporting and importing as so the screen number will not be recognised.

I am able to do the same calling of cust screen in Sales order creation and is sucessfull, the same should happen with PO also.

Probably if the user exit triggers at the time of syntax check i can achive my requirement rather than at save as the call back to the screen will not harm and database commits will not take place.

I also tried with all most of the enahancement points but the call screen statement is not working at any point of time which worked with Sales order exits. So i tried with making the validation fail but still by that time the PO number is getting generated and so if i try to cancel the PO before save and trying to get PO in edit mode but the sequence number is getting missed by by 1.

Please help.

Regards,

Amar.

Edited by: amar srinivas on Feb 11, 2011 10:16 AM

Edited by: amar srinivas on Feb 14, 2011 4:56 PM

1 REPLY 1

kesavadas_thekkillath
Active Contributor
0 Kudos

Hi,

You can try it this way.

Check badi ME_PROCESS_PO_CUST , method - CHECK.

This badi/method gets triggered when the "CHeck" button and "SAVE" button is pressed.

It consists of a changing parameter CH_FAILED . Pass X to it when cancel button is hit in your custom screen.

Donot use any commit in this method. Read the documentation before doing it.