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: 

Message type E - want to remain in same session

venkateswaran_k
Active Contributor
0 Kudos

Dear All, I have a requirement that to validate a condition type on Quatation entry VA21.  I did in a User Exit.  However, I want to put a message with type E there and want to remain in same session.  But it thrown out of the session so user lost all their entries.  I want to remain in same session and force the user to correct it unless he want to exit by himself.

Example, I put the message as

Message 'Discount Percentage not allowed' type 'E'.

OR

Message 'Discount Percentage not allowed' type 'E' display like 'S'...

So, whenever such conidtion occurs, it displays message correctly, however, upon enter it thrown out the session.  I want to remain in same session. 

I did search but not able to get the accurate result.

Can someone help me,

Regards,

Venkat

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

Depends upon the place where the "user exit" is called. The message behavior in different events is explained in program DEMO_MESSAGES.

Which exit you are using ?

11 REPLIES 11

gouravkumar64
Active Contributor
0 Kudos

Hi,

Message 'Discount Percentage not allowed' type 'I' display like 'E'...

will helpful I think.

kesavadas_thekkillath
Active Contributor
0 Kudos

Depends upon the place where the "user exit" is called. The message behavior in different events is explained in program DEMO_MESSAGES.

Which exit you are using ?

0 Kudos

Dear Kesav,

  In MV45AFZZ

  FORM USEREXIT_PRICING_PREPARE_TKOMP.

  FORM USEREXIT_SAVE_DOCUMENT.

Regards,

Venkat

0 Kudos

Try moving your check and error message to USEREXIT_SAVE_DOCUMENT_PREPARE.

Che

0 Kudos

Hi Che,

It is also in USEREXIT_SAVE_DOCUMENT_PREPARE as well.  Still the same result..

Regards,

Venkat

0 Kudos

hello sir,

Message 'Discount Percentage not allowed' type 'I' display like 'E'...

this one is not working?

Gourav

0 Kudos

Dear Gourav,

Sorry I did not reply you... 

Yes, it is not working too..

Regards,

Venkat

0 Kudos

Ok.

0 Kudos

Venkat,

The following should work, place it in USEREXIT_SAVE_DOCUMENT_PREPARE:

MESSAGE s000(z001) WITH 'Discount Percentage not allowed' DISPLAY LIKE 'E'.
PERFORM FOLGE_GLEICHSETZEN(SAPLV00F).
FCODE = 'ENT1'.
SET SCREEN SYST-DYNNR.
LEAVE SCREEN.

Take a look at the following thread for more information:

http://scn.sap.com/message/8058301

Che

0 Kudos

Hi Venkat,

put those codes in USEREXIT_SAVE_DOCUMENT_PREPARE only not (USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT ) 

Sijin_Chandran
Active Contributor
0 Kudos

Hello Venkat ,

Even i too had the same problem.

And  i posted a similar kinda Problem in the below mentioned post.

http://scn.sap.com/thread/2109752