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: 

call selection screen exit

Former Member
0 Kudos
328

Hi,all

I've found a problem arising from this sentence "call SELECTION-SCREEN 1001 STARTING AT 10 10",in the main screen. (here the type of screen 1001 is 'Modal Dialog Box')

The 'close' button on the right-top correr of the screen has no effect to close the

screen 1001,so how can I catch the event of click on that button?

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos
119

you need to write the code as below

case sy-ucomm.

when 'EXIT'.

leave to screen 0. " always use screen 0 for modal dialog box.

when "BACK'

leave to screen 0

WHEN 'CANC'.

leave to screen 0

endcase.

Please activate buttons in Menu Painter.

Thanks

Seshu

4 REPLIES 4

Former Member
0 Kudos
120

you need to write the code as below

case sy-ucomm.

when 'EXIT'.

leave to screen 0. " always use screen 0 for modal dialog box.

when "BACK'

leave to screen 0

WHEN 'CANC'.

leave to screen 0

endcase.

Please activate buttons in Menu Painter.

Thanks

Seshu

0 Kudos
119

Hi,Seshu,

Thanks your reply. I've already written my pai for this selection-screen,but the

click on the 'X' on the right-top corner does not ignite the event and the programe will not go to PAI part.

0 Kudos
119

When you use screen type modal dialog box,you need to activate pf-status.

if so keep the break point at call screen ,then do the debugging.

when you click on X ,then it should come to main screen,here you need to use leave to screen 0.

check it in debugging.

Thanks

Seshu

0 Kudos
119

Hi,Seshu

Thank you very much,it is solved!