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: 

need help to call screen

laxman_sankhla3
Participant
0 Kudos

hi

i am making userexit.

if error message is than message should come and screen should not go for next screen.

IF int_mara-mtart = 'ZAMT' and i_mseg-BWART = '201'.

MESSAGE i001(zmsg1) WITH 'NO VALID '.

<b>how i can call screen which has given error message </b>

ENDIF.

now what happing is that error message is coming but going for next screen.

but i want current screen only.

thanks.

7 REPLIES 7

Former Member
0 Kudos

Hi,

Try this code.

IF int_mara-mtart = 'ZAMT' and i_mseg-BWART = '201'.

<b>MESSAGE 'ERROR' TYPE 'E'.</b>

ENDIF.

Thanks.

VB09104
Active Participant
0 Kudos

hi Laxman,

try for this..

IF int_mara-mtart = 'ZAMT' and i_mseg-BWART = '201'.

MESSAGE i001(zmsg1) WITH 'NO VALID '.

LEAVE SCREEN.

ENDIF.

hope this will be helpful..

regards,

vikas

0 Kudos

hi

error message is coming but dont want to go for next screen and also dont want to leave transaction.

i want screen which has given error message.

thanks

Former Member
0 Kudos

HI,

TRY TO USE MESSAGE TYPE AS ERROR so dat it wont allow u to go to next screen unless n until u have some user command functionality.

as

IF int_mara-mtart = 'ZAMT' and i_mseg-BWART = '201'.

MESSAGE 'U SHOULD GIVE VALID DATA FOR THE FIELDS' TYPE 'E'.

ENDIF.

IF HELPFUL REWARD SOME POINTS.

WITH REGARDS,

SURESH ALURI.

Former Member
0 Kudos

hi,

you have written

MESSAGE i001(zmsg1) WITH 'NO VALID '.

here i001 means information message.

hence it is going to ohter screen.

instead write:

MESSAGE e001(zmsg1) WITH 'NO VALID '.

e stands for error.

then it wont go to other screen.

Former Member
0 Kudos

DATA : V_SCREEN TYPE SY-DYNNR.

IF int_mara-mtart = 'ZAMT' and i_mseg-BWART = '201'.

V_SCREEN = SY-DYNNR.

MESSAGE i001(zmsg1) WITH 'NO VALID '.

CALL SCREEN V_SCREEN.

ENDIF.

Please try this.

REGARDS

VASU

0 Kudos

same problem going for next screen.

thanks