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

LEAVE SCREEN not working

abhishek_katti
Explorer
0 Likes
1,580

Hi experts,

I have created the events EXIT and CANC which I use in module User command , I provided statement LEAVE SCREEN for these events, this works fine when I don't have any mandatory field on the screen, but if I use mandatory field the transaction does not exits the screen.

Please Help.

Thanks

Abhishek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
863

write your code inside a module (say EXIT) and in PAI of dat screen write dis

module EXIT on EXIT-COMMAND.

in pf-status of dat screen select the func types of back,exit as 'E'.

Hi experts,

I have created the events EXIT and CANC which I use in module User command , I provided statement LEAVE SCREEN for these events, this works fine when I don't have any mandatory field on the screen, but if I use mandatory field the transaction does not exits the screen.

Please Help.

Thanks

Abhishek

4 REPLIES 4
Read only

Former Member
0 Likes
863

Hi,

if u make mandatory then u have to enter something in the input field other it wont work

its better to use leave to screen

Regards

Read only

Former Member
0 Likes
864

write your code inside a module (say EXIT) and in PAI of dat screen write dis

module EXIT on EXIT-COMMAND.

in pf-status of dat screen select the func types of back,exit as 'E'.

Read only

Former Member
0 Likes
863

Hi,

You have to use ON EXIT COMMAND in your scenario.

Else use statements like,

call screen 0 or

set screen 0 etc.

Regards,

Renjith Michael.

Read only

gopi_narendra
Active Contributor
0 Likes
863

Hi Abhishek,


" in the flow logic of screen give the module as this
MODULE exit_0200 AT EXIT-COMMAND.
" now in the module write the code like this
MODULE exit_0200 INPUT.
CASE sy-ucomm.
  WHEN 'BACK' OR " make sure you give the function type as 'E'  for these function codes
       'CANC'. " when you define them in GUI Status
    IF NOT <mandatory FIELDS> is INITIAL.
      LEAVE TO SCREEN 0.
    ENDIF.
ENDCASE.
ENDMODULE.

Regards

Gopi