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

Reg:Error Message

Former Member
0 Likes
646

Hi Experts,

I have a requirement to give an error message when the user enters the wrong value, I have written the following code

IF SY-SUBRC = 0.

MESSAGE S099(Z1) DISPLAY LIKE 'E'.

SET SCREEN 120.

ENDIF.

This code is working fine in ECC 6.0 version but in ECC 4.0 its not working so I have given

IF SY-SUBRC = 0.

MESSAGE E099(Z1).

SET SCREEN 120.

ENDIF.

here I am getting the error message but after getting the error message its not going to screen 120 and its remaining in the same screen and that screen also going into display mode so I am unable to enter the correct value.

Please suggest .

Regards,

Samatha.

2 REPLIES 2
Read only

Former Member
0 Likes
415

HI,

Did you check using call screen or leave to screen instead of set screen??

also for message try this

message 'Your Error Message' type 'E'.

Regards and Best wishes.

Read only

Noorie
Active Participant
0 Likes
415

Hi,

This this code

IF SY-SUBRC = 0.

SET SCREEN 120.

MESSAGE E099(Z1).

ENDIF.

in your perivous code : i think because error message is encontered, it is not executing the set screen statement.