Skip to Content
author's profile photo Former Member
Former Member

Return to program after calling a screen

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 01:02 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 01:07 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 01:07 PM

    if you use:

    leave to screen 0

    you always return to the previous screen.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 01:09 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.