Application Development 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: 

Return to program after calling a screen

Former Member
0 Kudos
3,135

Hi --this might seem elementary but I can't seem to make it work anymore

I want to retrurn to the statement AFTER the CALL SCREEN 100

It doesn't seem to work




CREATE DATA dref TYPE s_elements.
  ASSIGN dref->* TO <fs>.
  i_routine = 'POPULATE_DYNAMIC_ITAB'.
*  i_names   = 'NAME_COLUMNS'.
  i_gridtitle = 'any'.
  invoker = sy-repid.
  i_zebra = ' '.
  i_edit = ' '.

*free it_fldcat.
*free dy_table.
    call method dog->build_dynamic_structures
  exporting
    my_line = <fs>
    calling_program = invoker
  importing
    dy_table = dy_table
  changing
    it_fldcat = it_fldcat.
    break-point 1.

perform populate_dynamic_itab
  changing dy_table.

  call screen 100.

* Want return back here after all the Screen processing

After PBO and PAI how to I get back to the line I want.

Cheers

Jimbo

1 ACCEPTED SOLUTION

Former Member
0 Kudos
356

Use statement 'Leave to screen 0 at end of PAI

Edited by: Naveena M on Jan 22, 2008 6:37 PM

Edited by: Naveena M on Jan 22, 2008 6:38 PM

5 REPLIES 5

Former Member
0 Kudos
357

Use statement 'Leave to screen 0 at end of PAI

Edited by: Naveena M on Jan 22, 2008 6:37 PM

Edited by: Naveena M on Jan 22, 2008 6:38 PM

0 Kudos
356

Thanks --you were the first so you get the points.

It's been a little while since I've done this stuff -- at the end of displaying an OO ALV grid I wanted to get back into the main logic of the program again.

Your solution worked.

Thanks

Cheers

jimbo

Former Member
0 Kudos
356

Hi...

Set the next screen parameter to 0 of the current screen.

After processing the PBO and PAI of that screen it will automatically comes to the statement after the CALL SCREEN. (provided u dont have any program terminating statements in PAI of that screen).

It you want to do that programatically then use LEAVE SCREEN statement.

Regards,

Sai Ramesh

Former Member
0 Kudos
356

if you use:

leave to screen 0

you always return to the previous screen.

Former Member
0 Kudos
356

Hi James, ur code is fine and I dont know y its not working.

I have an alternate solution ( may be silly, but it works, I guess).

Instead of "call screen 100", use "Leave to screen 100" and at the end of logic in the screen 100, write "go to screen xxx" ie., the current screen number.

(or) Leave to screen 0 will work fine. As the control goes to stack and gets the screen number(ur current screen) and goes to ur last line of code previously executed.

hope this helps.Kindly reward if helpful.

cheers,

Hema.

Edited by: Hema Sundar Munagapati on Jan 22, 2008 2:10 PM