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 (application toolbar)

Former Member
0 Likes
882

Hi,

Here I have following scenario:

Execute Selection screen 1(1000) -> Calls selection screen2(500) -> Calls and execute smart form

Flow is like this :

in start-of-selection.

initial coding for second screen.

-


-


Call Selection-screen 500.

Then call function 'SSF_FUNCTION_MODULE_NAME'.

Now if i click back button in smart form its going to selection screen 1which is quite acceptable, but if we are clicking BACK or CANCEL or EXIT button in selection screen 2(500) instead of going to Selection screen 1(1000) its calling the smart form. If i click debug and click back button in selection screen2 (500) the pointer is coming directly to following statement in start-of selection:

Call Selection-screen 500.

and in this time after F5 if i check sy-dynnr it comes 1000 and sy-ucomm it comes blank

Can you please tell me what code should I need to write to handle BACK, CANCEL,EXIT for second selection screen 2(500) and at which point and at which event. Please suggest.

I will definetly .............

5 REPLIES 5
Read only

Former Member
0 Likes
812

Hi,

Write LEAVE TO SCREEN 0 in the PAI of screen 500.

MODULE user_command_0500 INPUT.

CASE g_ok_code.

WHEN 'BACK' OR 'EXIT'.

  • Goto Selection screen

LEAVE TO SCREEN 0.

WHEN 'CANC' .

LEAVE PROGRAM.

WHEN OTHERS.

  • Do Nothing

ENDCASE.

CLEAR : g_ok_code.

ENDMODULE.

Read only

0 Likes
812

But its not a module pool program. Its a classical report made in selection screens.

How can I handle PAI and PBO in case of classical report (selection screen)

Read only

Former Member
0 Likes
812

Firstly, I didn't understand the reason for having 2 selection screens. See if you can handle this with a single selection screen. And after you make the selections, call the smartform.

If not, create 2 separate programs and call the second program from the first one. You can use AT USER-COMMAND event.

regards,

Advait

Read only

0 Likes
812

Its client demand for having 2 selection screen and for handling just a BACK button is it worth to create 2 programs ( 2transport request) and all.

Cant I handle here BACK button

Read only

0 Likes
812

I'm not sure with a normal report program if you can have 2 selection screens called one after the other( possible with tab strips selection screen though).

But you can do this with a module pool. Where your screen flow would be Selection screen 1-> Selection Screen 2->Output Screen.

You can define 2 selection screens with Begin of selection-screen in the main program. And call the selection screen in the flow logic of the screen 1 and 2 respectively.

regards,

Advait