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

regarding Screen

Former Member
0 Likes
1,451

Dear Experts,

I have report program inputting parameter FILE PATH.

if we push execute button it will call Screen 100.

In Screen 100, I have three button BACK,EXIT,CANCEL.

When case Back,

I want to go back to parameter FILEPATH screen. how to do this..

Is there any command for that?

Also i want to know what exit and cancel differs here..

Both will do LEAVE TO SCREEN 0 right?

Please confirm.

ambichan.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,308

For back/Exit/Cancel

LEAVE TO SCREEN 0.

or

Set screen <screen no>.

Diff b/w exit and cancel

Basically both are same.

for ex if your have 3 screen & from last screen if ur press exit it will go to initial screen,

if u press cancel it will cancel the currecnt process & go the previous screen.

Based on the ok-code of the back/exit/cancel we can set the control like back - just go back one screen

exit - show some message & go to initial screen

cancel - without showing message go to initial screen

regds

gv

11 REPLIES 11
Read only

Former Member
0 Likes
1,309

For back/Exit/Cancel

LEAVE TO SCREEN 0.

or

Set screen <screen no>.

Diff b/w exit and cancel

Basically both are same.

for ex if your have 3 screen & from last screen if ur press exit it will go to initial screen,

if u press cancel it will cancel the currecnt process & go the previous screen.

Based on the ok-code of the back/exit/cancel we can set the control like back - just go back one screen

exit - show some message & go to initial screen

cancel - without showing message go to initial screen

regds

gv

Read only

Former Member
0 Likes
1,308

Hi,

For Back,You can use

SET SCREEN <next screen>.

LEAVE SCREEN.

or

LEAVE TO SCREEN <next screen>.

And for Exit,you can use

LEAVE PROGRAM.

Hope this helps u.

Thanks&Regards,

Ruthra.R

Read only

0 Likes
1,308

hey sorry

i think my question was not..clear.

I have Parameter declared in report.

after input i will call screen 100.

but while back. if i give leave screen it will close the screen and coming out.

however i want to come back to the report parameter screen.

I dont have any screen no for parameter screen as this is report screen.

any ideas please..

ambichan

Read only

0 Likes
1,308

'I dont have any screen no for parameter screen as this is report screen.'

default this screen number is 1000.

regards

Read only

0 Likes
1,308

"but while back. if i give leave screen it will close the screen and coming out"

use

call selection-screen 1000 and return.

try this <b>i am not sure,</b>

Read only

0 Likes
1,308

Hi,

Check this sample code


*&---------------------------------------------------------------------
*&      Module  USER_COMMAND_9001  INPUT
*&---------------------------------------------------------------------
* This is used for PAI details
*----------------------------------------------------------------------
MODULE user_command_9001 INPUT.

  CASE sy-ucomm.

  <b>  WHEN 'EXIT' OR  'CANC'.</b>
      PERFORM f9600_free_objects:
               USING o_alvgrid 'ALV' text-e02,
               USING o_dockingcontainer 'DOCKING'
                       text-e01.
      <b>LEAVE PROGRAM.</b>

    WHEN 'BACK'.
      PERFORM f9600_free_objects:
               USING o_alvgrid 'ALV' text-e02,
               USING o_dockingcontainer 'DOCKING'
                       text-e01.
<b>      SET SCREEN '0'.</b>
      LEAVE SCREEN.

    WHEN OTHERS.

  ENDCASE.

ENDMODULE.                 " USER_COMMAND_9001  INPUT

Hope this helps.

Read only

Former Member
0 Likes
1,308

yes use 'leave to screen' or set screen or call selection-screen 1000.

also one more tip i would like to give , suppose you want to go from module programing to list programing and come back again to module programing , use

leave to list-processing and return.

regards

Read only

Former Member
0 Likes
1,308

Hi,

In order to come back again to ur report parameter screen

use,

CASE SY-UCOMM.

WHEN BACK'.

SET SCREEN 0.

LEAVE SCREEN.

ENDCASE.

Thanks&Regards,

Ruthra.R

Read only

Former Member
0 Likes
1,308

Hi,

you can also use,

LEAVE TO SCREEN 0.

Read only

Bema
Active Participant
0 Likes
1,308

hi,

try this,

when 'BACK'.

call selection-screen 1000.

when 'EXIT'.

leave program.

when 'CANC'.

leave to screen 0.

Read only

Former Member
0 Likes
1,308

Hi,

Kindly reward points and cloe the thread if ur problem got solved.