Skip to Content
avatar image
Former Member

Leave abap alv grid NORMAL

Hey there

I have a little problem when trying to leave the ALV grid. I'm using the normal alv grid (not oop). I don't know if I'm allowed to link screenshots (no sensitive information will be shared) but I think it will be beter to explain my problem.

That being said this is my situation:

I want to leave my alv and return back to my selection screen witch is screen 200 (see link one) I'm using the standard gui status provided by abap in the program SAPLKKBL (see link 2).

I've try the fallowing:

WHEN  '&BACK' " I've renamed the &FO3
   Leave to screen 200.
   *and 
   set screen 200.

The above code gives the fallowing error (see link 3 & 4)

I've also tried using the fallowing:

WHEN  '&BACK' " I've renamed the &FO3
   CALL SELECTION-SCREEN 200. 
   * and 
   CALL SCREEN 200.

the above code produces the fallowing bizar result (see link 5 & 6).

As you may have noticed the GUI status bar remains even when i leave the ALV. How to fix this. I've read something about using the free method but this was mainly aimed for OOP which I'm not doing and that process a whole new sets of problem :3

can anyone help?

Thanks in andvance

Links

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 26, 2016 at 11:00 PM

    If you used the function module REUSE_ALV_GRID_DISPLAY, I think you should register your own subroutine for the USER_COMMAND event using parameter I_CALLBACK_USER_COMMAND = 'YOURNAME', and write this subroutine as follows:

    FORM YOURNAME
    USING  R_UCOMM  LIKE SY-UCOMM
           RS_SELFIELD TYPE SLIS_SELFIELD.
      if r_ucomm = '&BACK'.
        rs_selfield-exit = 'X'.
      endif.
    ENDFORM.

    Read the documentation of REUSE_ALV_GRID_DISPLAY for more information.

    Add comment
    10|10000 characters needed characters exceeded

    • After rs_selfield-exit = 'X', the CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' should terminate. You may ensure of that using debug. If that's true, then the issue is not about the ALV, but the rest of your code.

  • avatar image
    Former Member
    Dec 28, 2016 at 02:03 AM

    Hi there again,

    I think you might be right. I'm re-evaluation my code. I think that is has something to do with me using:

    i_callback_pf_status_set = 'SET_PF_STATUS'

    and calling it internally instead of in my PBO module

    FORM set_pf_status USING rt_extab TYPE slis_t_extab.        "#EC CALLED
      DESCRIBE TABLE rt_extab. "Avoid Extended Check Warning
      SET PF-STATUS 'ALV_STATUS_1'.  "I call my gui-status here instead of in the PBO
    ENDFORM.
    
    

    I'm not sure if it has anything to do with it but that seems to be the culpit to me, since it says that i doesn't know the screen I'm referring to even tho all my other links defined in PBO works. This one is the only one not define in PBO but in ALV itself instead.

    Add comment
    10|10000 characters needed characters exceeded

    • I don't understand why you're talking about the PBO; if it's related to a custom screen, then I don't understand how it's related to the ALV.

      In your program, make sure your CUA interface (containing the copy of ALV_STATUS_1) is activated.

      Make sure to pass parameter I_CALLBACK_PROGRAM = sy-repid to REUSE_ALV_GRID_DISPLAY.

      PS: you should use SET PF-STATUS 'ALV_STATUS_1' EXCLUDING rt_extab.