Skip to Content
0

Leave abap alv grid NORMAL

Dec 26, 2016 at 07:23 PM

93

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sandra Rossi Dec 26, 2016 at 11:00 PM
0

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hey there,

first of all thanks for your input I've tried what you suggested but it brings me back to the problem i had in the first place.

I've provided the complete code of my I_CALLBACK_USER_COMMAND in the link below maybe it will trigger you or anyone else to find my problem. I believe it to be something minor.

Code:

Output of your suggestion (same as an exit command ) :

if you look at the second link under "code" I've tried all the other combinations. I'm new to Abap so I don't really fully understand what going on in the compiler.

0

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.

1
Jane Doe Dec 28, 2016 at 02:03 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left 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.

0