02-08-2019 7:56 AM
hi all,
i am a fresher in abap and i am trying to explore oops alv, now my requirement is i want to display multiple alv grid in a single docking container without using splitter container.
02-08-2019 8:54 AM
You can't. You need a separate container for each Grid. Have a look at the Easy_Splitter class - it's 'easy' to use!
Rich
02-08-2019 8:54 AM
You can't. You need a separate container for each Grid. Have a look at the Easy_Splitter class - it's 'easy' to use!
Rich
02-11-2019 5:53 AM
yes this is also a way to achieve this requirement but my question is can i change the alv displayed in docking container dynamically based on user input?
02-11-2019 8:47 AM
Of course you can!
When you say 'Change' do you mean change the data or change the format and columns displayed ??
The answer to both is 'Yes'.
Rich
02-08-2019 9:28 AM
Why? Is it because you need to adjust the splitter "SASH" bar depending on the number of lines in the first ALV, or is it just that you don't know how to define a splitter container inside a docking container?
02-11-2019 5:51 AM
as i said i am trying to explore. my question is can i modify the alv in docking container based on user input i.e the alv should get replaced with the present one.
02-11-2019 6:24 AM
02-11-2019 6:42 AM
but how? how can i switch between 2 alv grids based on user input from main alv?
02-11-2019 7:13 AM
For instance, just free the main alv, and instantiate a new alv. What did you try?
02-12-2019 7:05 AM
thanks for this suggestion, now its working my data is changed dynamically but while switching between 2 alv grids i am getting dump because i am freeing the previous alv so it is not getting the reference object for it.
if grid_inst is not INITIAL.
call method grid_inst->free.
endif.
IF grid_bp is not INITIAL.
call method grid_bp->free.
ENDIF.
02-12-2019 7:57 AM
To switch between 2 alv grids based on user input from main alv, for instance you may free the main alv, and instantiate a new alv.
Remember that if you call the method FREE, the control variable is still instantiated, only the GUI control is freed, so to avoid subsequent CNTL_ERROR short dumps, it's easier to set the control variable to initial (CLEAR/FREE), so that both the control variable and the GUI control are "synchronized", and to check whether the GUI control is present, you may simply test IF control_variable IS BOUND.
If you don't CLEAR/FREE the control variable, another possibility is : if control_variable->is_alive( ) <> cl_gui_control=>state_dead.
02-14-2019 4:24 AM