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

Selection-screen problem

Former Member
0 Likes
1,331

Hi,

in my Module pool program i am calling back the selection screen by.

CALL SELECTION-SCREEN 9001.

The problem is that once on the selection screen even if i press ENTER i go into the execute mode. I want the selection screen not to execute when I press enter.

Any suggetions?????

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,238

hI..,

This is the common problem !!

U need to clear the<b> SSCRFIELDS-UCOMM </b>..

before that u need to define the statement <b>TABLES SSCRFIELDS.</b> first in the program !!

Even though the Fcode in sy-ucomm is cleared , it will not get cleared in SSCRFIELDS-UCOMM .

Clear that wherever u r checking the sy-ucomm.

regards,

sai ramesh

12 REPLIES 12
Read only

Former Member
0 Likes
1,238

You can write the code in exit-processing

module exit_processing at exit-command

*In the PF STatus set the functional type of the buttons as 'E'.

case sy-ucomm.

when 'BACK' or 'EXIT'.

set screen 0.

leave screen.

endmodule.

This should go back to your selection screen.

Read only

0 Likes
1,238

actually i cannot use leave screen because i want to go to the selection screen from the third screen.

I also cannot use "leave to screen 9001" because its a selection screen

Read only

0 Likes
1,238

Hi,

Check if Leave to Screen 0 is not working?

Santhosh

Read only

Former Member
0 Likes
1,238

Hi,

Instead use Leave to Screen 0 or leave screen. Should help

Santhosh

Message was edited by:

Kaluvala Santhosh

Read only

Former Member
0 Likes
1,238

no it doesnt work.

Is there any way that on the selection screen I can prevent the ENTER button press executing the program again.

Read only

0 Likes
1,238

Hi,

I assume, you have used a selection screen and a call screen staement to call a screen. when you hit back say STOP, this should bring you to the end-of-selection event where u can call you selection screen, the idea of stopping the selection screen on enter is bad coz it means you are allowing a screen loop which is not healthy, we need to leave the screen totally and then call the selection-screen.

santhosh

Read only

0 Likes
1,238

"STOP" can be used in executable reports only. this program is of type 'M'. How can i use STOP in my normal screen from where i want to go back to my selection screen?

Is there any alternative to LEAVE TO SCREEN NNNN for a selection screen?

Read only

0 Likes
1,238

tables vbak.

select-options: s_vbeln for vbak-vbeln.

start-of-selection.

call screen 100.

end-of-selection.

break-point.

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE USER_COMMAND_0100 INPUT.

Case Sy-ucomm.

When 'BACK'.

Leave to screen 0.

When 'EXIT'.

*Call screen 200.

leave to screen 200.

Endcase.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0200 OUTPUT

&----


  • text

----


MODULE STATUS_0200 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0200 OUTPUT

&----


*& Module USER_COMMAND_0200 INPUT

&----


  • text

----


MODULE USER_COMMAND_0200 INPUT.

Case Sy-ucomm.

When 'BACK'.

Leave to screen 0.

When 'EXIT'.

Call screen 100.

Endcase.

ENDMODULE. " USER_COMMAND_0200 INPUT

check this out

Read only

Former Member
0 Likes
1,238

Hi

didn't get ur requirement exactly,

anyways try this option

place the statement below as the first executable statement in the PAI of the screen.

<b>CHECK sy-ucomm NE INITIAL.</b>.

ensure that sy-ucomm has the latest value.

Read only

Former Member
0 Likes
1,238

Hi Dude,

Check out program ZMAN_CALL_SELECTION_SCREEN on system Q4A.

Its not happening here. Tell me what did you do different from this program ?

Regards,

Manish Joshi

Read only

0 Likes
1,238

Here I am talking about a selection screen called by dialog. Its not a report but a program of type 'M'. Ur example is for a program which is executable.

Read only

Former Member
0 Likes
1,239

hI..,

This is the common problem !!

U need to clear the<b> SSCRFIELDS-UCOMM </b>..

before that u need to define the statement <b>TABLES SSCRFIELDS.</b> first in the program !!

Even though the Fcode in sy-ucomm is cleared , it will not get cleared in SSCRFIELDS-UCOMM .

Clear that wherever u r checking the sy-ucomm.

regards,

sai ramesh