cancel
Showing results for 
Search instead for 
Did you mean: 

Back to selection-screen ?

Former Member
0 Kudos

Hi all,

i start my program and selection-screen is displayed. When i run my program (F8) i display a ALV grid, so when i click on BACK button i don't know how to make to return to the selection-screen.

I've tried with 'LEAVE TO SCREEN 1000' but the program dump with the message : 'The selection-screen myApp 1000 was not call by CALL SELECTION-SCREEN'.

Thanks for help.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

On click back on whichevr screen you wanna go mention the number of that screen.

i you wanna go to Selection Screen then write:

Leave to screen 0

Former Member
0 Kudos

Hi all,

it don't work

I use PNP logic database, so selection screen is generated automaticaly, so i thought that i didn't change it.

andreas_mann3
Active Contributor
0 Kudos

Hi, funny discussion

-> i'll give my 5 cents.

try :


MODULE pai INPUT.
  CASE ok_code.
    WHEN 'BACK' OR '%EX' OR 'RW' OR 'EXIT'.
      CALL METHOD grid->free.
     <b> SET SCREEN 0.</b> "without leave !

...

Andreas

Former Member
0 Kudos

Hi,

Andreas looks like ur the man for project system.

I have a standard PS profile, it is showing wrong header

in structure overview screen and in german, also

Can u please provide me more info on project system. reporting geting data in a structure, extracting data from PS,

and standard report modification. or creating new report,

modify structure overview,etc

Thank you.

Nasim Mahmud.

nasim1293@gmail.com

Answers (8)

Answers (8)

amit_khare
Active Contributor
0 Kudos

Hi,

<b>Leave to screen 0</b> will lead u back to the selection screen

and if u want to leave the program on button click then use <b>Leave Program</b> instead.

Amit

Former Member
0 Kudos

Set Screen <ScreenNumber>.

Leave screen.

Former Member
0 Kudos

In PF-STATUS of the screen use the code below...

When 'BACK'.

Leave to screen 1000

former_member188685
Active Contributor
0 Kudos

Hi If you are using Classes you need to clear the GRID,

i mean free the Object..

But If you are Using Normal Grid then YOu need to Use some conditions....based on which screen you are in , from what screen you called

regards

vijay

Former Member
0 Kudos

Vijay, i agree with you, i use Classes so my code is :

WHEN 'BACK'.

CALL METHOD alv_container->free.

CALL METHOD cl_gui_cfw=>flush.

CALL SELECTION-SCREEN 1000.

But i always switch to screen 9300.

Thanks

former_member188685
Active Contributor
0 Kudos

Hi Use this way

  CALL METHOD G_GRID1->FREE.
  CALL METHOD G_CUSTOM_CONTAINER1->FREE.
  CALL METHOD CL_GUI_CFW=>FLUSH.
  CLEAR G_CUSTOM_CONTAINER1.
  CLEAR G_GRID1.
  CLEAR G_HANDLER1.
  LEAVE TO SCREEN 0.

if it dosen't can you give place the code..

regards

vijya

former_member186741
Active Contributor
0 Kudos

does screen 1000 have screen 9300 as the next screen? It sounds like you do not have an 'on exit command' module in screen 1000's PAI so processing goes though and doesnot do anything specila for 'back'. If I'm correct you'll need an 'exit command module' in the pai to intercept 'back' and leave the program.

Former Member
0 Kudos

Hi,

Keep this in your PAI.

module pai input.
  save_ok = ok_code.
  clear ok_code.
  case save_ok.
    when 'BACK'.
    set screen 0.
    leave screen.
    when others.
*     do nothing
  endcase.
endmodule. 

hope this helps you.

regards,

venu.

Former Member
0 Kudos

That don't work, i leave directly program.

Some informations :

i've 3 screens :

1000 : default created by SAP, i use PNP

9100 : display first ALV grid, next screen -> 9200

9200 : display second ALV grid, next screen -> 9200

9300 : screen for input informations, next screen -> 9300

Thanks so much for your quickly help

abdul_hakim
Active Contributor
0 Kudos

Hi

Try call selection-screen 1000.

Regards,

Abdul

Former Member
0 Kudos

Yes, better !! but...

when i back now i'm going to selection-screen, but when i want to back from selection-screen i go to screen 9300 !! ^^

Thanks.

former_member188685
Active Contributor
0 Kudos

leave to screen 0.

vijay

abdul_hakim
Active Contributor
0 Kudos

Hi,

give LEAVE TO SCREEN 0.

Regards,

Abdul

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
set screen 0.
Leave screen.

Regards,

Rich Heilman

FredericGirod
Active Contributor
0 Kudos

Hi,

try : leave to screen 0.

don't forget to free your object.

Regards

Frédéric