‎2008 Dec 13 8:41 AM
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 .............
‎2008 Dec 13 8:48 AM
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.
‎2008 Dec 13 5:41 PM
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)
‎2008 Dec 13 5:55 PM
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
‎2008 Dec 15 12:28 PM
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
‎2008 Dec 15 7:04 PM
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