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 Save document Prepare

Former Member
0 Kudos

Hi,

I have written a code in USER EXIT SAVE DOCUMENT PREPARE for the sales order.

When the sales order is saved I have written code to give information message. Once user presses entere on the information message sales order gets saved but I don't want sales order to be saved. It has to go back to the order rather than saving the order. How can I do this?

If I give error message then it does not save the order but I want to give information message.

Thanks and Regards,

Shravan G.

1 ACCEPTED SOLUTION

pepl
Active Participant
0 Kudos

Hi!

Try this:

clear sy-ucomm.
  leave to screen sy-dynnr.

Pay attention to point that message must not have 'E' type.

2 REPLIES 2

Former Member
0 Kudos

hi Shravan,

After triggering information message do like this

MESSAGE 1405(ZSD).

CALL SCREEN '4001'.

It will go to the Previous Screen only. I done same thing for warning message.

Thanx & Regards

Rami Reddy

pepl
Active Participant
0 Kudos

Hi!

Try this:

clear sy-ucomm.
  leave to screen sy-dynnr.

Pay attention to point that message must not have 'E' type.