Application Development and Automation 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: 
Read only

Message type E - want to remain in same session

venkateswaran_k
Active Contributor
0 Likes
1,712

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
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,643

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 ?

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

11 REPLIES 11
Read only

gouravkumar64
Active Contributor
0 Likes
1,643

Hi,

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

will helpful I think.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,644

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 ?

Read only

0 Likes
1,643

Dear Kesav,

  In MV45AFZZ

  FORM USEREXIT_PRICING_PREPARE_TKOMP.

  FORM USEREXIT_SAVE_DOCUMENT.

Regards,

Venkat

Read only

0 Likes
1,643

Try moving your check and error message to USEREXIT_SAVE_DOCUMENT_PREPARE.

Che

Read only

0 Likes
1,643

Hi Che,

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

Regards,

Venkat

Read only

0 Likes
1,643

hello sir,

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

this one is not working?

Gourav

Read only

0 Likes
1,643

Dear Gourav,

Sorry I did not reply you... 

Yes, it is not working too..

Regards,

Venkat

Read only

0 Likes
1,643

Ok.

Read only

0 Likes
1,643

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

Read only

0 Likes
1,643

Hi Venkat,

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

Read only

Sijin_Chandran
Active Contributor
0 Likes
1,643

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