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

closing a subscreen

Former Member
0 Likes
2,719

hi all,

I have call a sub screen by the call:

CALL SCREEN 100 STARTING AT 25 01.

How can I close this window using the [x] button (closing window button) ?

Best Regards,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,582

it depends on how you designed the screen.

and what kind of PF-STATUS you set.

when you create the screen choose the screen type as Modal Dialog Box

and in the PBO while setting the status , Choose the type as Dialog box,

then give the Function code for Cancel button as CANCEL

now in PAI write this

module USER_COMMAND_0100 input.
if sy-ucomm = 'EXIT'.
  leave to screen 0.
endif.
endmodule.                 " USER_COMMAND_0100  INPUT

7 REPLIES 7
Read only

Former Member
0 Likes
1,582

use leave screen or leave to screen 0. after call screen.

if you press enter then it will leave current screen

Read only

Former Member
0 Likes
1,582

Hi,

Write Code LEAVE TO SCREEN 0 against the Button exit.

Case sy-ucomm.

when 'EXIT'.

Leave to screen 0.

Endcase.

Read only

Former Member
0 Likes
1,583

it depends on how you designed the screen.

and what kind of PF-STATUS you set.

when you create the screen choose the screen type as Modal Dialog Box

and in the PBO while setting the status , Choose the type as Dialog box,

then give the Function code for Cancel button as CANCEL

now in PAI write this

module USER_COMMAND_0100 input.
if sy-ucomm = 'EXIT'.
  leave to screen 0.
endif.
endmodule.                 " USER_COMMAND_0100  INPUT

Read only

Former Member
0 Likes
1,582

thankyou all,

your helps help me in other things

maybe i'm not that clear with my question

I want to close the window from the stander window close button wich is in the upper-right corrner [X]....

Best Regards,

Read only

0 Likes
1,582

Even i am talking about the same upper right corner [X]

Read only

Former Member
0 Likes
1,582

A subscreen cannot be closed as it cannot have a status of it own.The main screen can only be closed.

Read only

Former Member
0 Likes
1,582

thankyou Vijay Babu Dudla

it works