Skip to Content
avatar image
Former Member

Return to Selection-screen from ALV

Hi All,

I have a report that call an ALV and in this there is a button that call another ALV. I need to return on SELECTION-SCREEN from second ALV when user clicks on button BACK.

Can you help me, please?

Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

10 Answers

  • Oct 22, 2010 at 09:02 AM

    In the first ALV program, you have a USER_COMMAND or a handle method form where you call the second ALV, just after the call set the exit flag (user_command) or force function code back (ooalv) and the first ALV will close, and user will be directed to previous (selection) screen.

    So after the call of the second ALV :

    - REUSE ALV - in USER_COMMAND form set parameter subfield rs_selfield-exit

    - OOALV - in PAI USER_COMMAND or double_click handle method, add a LEAVE TO SCREEN 0

    Regards,

    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2010 at 09:03 AM

    when user clicks on button BACK.

    write following 1 line

    SUBMIT ZREPORT via SELECTION-SCREEN.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2010 at 08:58 AM

    Hi,

    are you using oops ALV.

    capture function code in PAI and write call screen 1000.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2010 at 09:08 AM

    Hi,

    write the below code on back button comm.

    LEAVE TO SCREEN 0.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2010 at 09:51 AM

    Hi

    if you have a module pool screen for your selection screen then you need to fetch the function code of the back button on ALV list and call your screen on clicking that back button.

    like

    case sy-ucomm.

    when 'BACK'.

    call screen 1000 <your selection screen number>.

    endcase.

    other wise if you have created your selection screen using select-options, then write.

    case sy-ucomm.

    when 'BACK'.

    leave to screen 0.

    endcase.

    leave to screen 0 always goto the previous screen from where you reached to the current screen.

    Thanks

    Lalit Gupta

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2010 at 10:10 AM

    Hi leo,

    If you want to navigate to the selection-screen from your 2nd secondary list or any in ALV, just try below code after you call the ALV function module.

    IF SY-UCOMM = '&F03'.
      LEAVE TO SCREEN 0.
    ENDIF.

    Regards,

    Kavitha.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2010 at 10:49 AM

    write the below code for back button press for 2nd ALV.

    case sy-ucomm.
    
    when 'BACK'.
    leave to screen 0.
    endcase. 

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2010 at 11:00 AM

    Hi,

    If you are using OOPS ALV then write the below code in PAI event

    case SY-UCOMM.

    WHEN 'BACK'.

    LEAVE TO SCREEN 0.

    ENDCASE.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 22, 2010 at 11:16 AM

    Hi

    Case SY-UCOMM will not work directly i think. First, copy the Standard GUI and use it in your report. now use the SY-UCOMM.

    To find Standard GUI, while the ALV is displayed, goto System -> Status -> GUI status.

    regards,

    Sathappan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2011 at 09:30 AM

    thank you

    Add comment
    10|10000 characters needed characters exceeded