2008 Jul 14 3:12 PM
Hi All,
I have a query regarding the muliple Listboxes in the grid...
My reqmnt is..I have 3 List boxes..in the Grid...
For The first list box i will be having some values..after selecting one of the values for the first listbox..depending on that value,i need to read the different values for the second and depending on listbox1 and listbox2 i need to populate the values into listbox3.
The problem im facing is...populating the second & third listboxes..depending on the first one...
i have used Method:
CALL METHOD g_grid->set_drop_down_table in PBO
to have the dropdown table.(I'm Putting conditions to know whether the first listbox value is selected r not...n populating according to that value to the listbox table.)
and
CALL METHOD g_grid->check_changed_data
IMPORTING
e_valid = l_valid.
CALL METHOD g_grid->get_current_cell
IMPORTING
e_row = e_row
e_value = e_value
e_col = e_col
es_row_id = es_row_id
es_col_id = es_col_id
es_row_no = es_row_no.
TO know the changed data..n which row is changed...
But the values which are populated for the second list box are not coming...if i create new screen n grid then those values r coming...Can anyone please suggest a way...
Regards....
Sorry,
its
CALL METHOD alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
and also please look at program BCALV_TEST_GRID_EVENTS
a®
2008 Jul 14 3:22 PM
> But the values which are populated for the second list box are not coming...if i create new screen n grid then those values r coming...Can anyone please suggest a way...
>
I am not sure this is right way. But i have done is by forcing the PBO
using
call method cl_gui_cfw=>set_new_ok_code
exporting
new_code = 'DUMMY'.
a®
2008 Jul 14 3:31 PM
Hi a®s,
U mean..after selecting the First listbox..we need some user interaction(PAI)..which inturn triggers the PBO..But even if u trigger PBO Automatically..
I dont think so..whether it solves my problem..r not..
2008 Jul 14 3:38 PM
After selecting the first list box you need to trigger the PBO and fill up the listbox values second & third in the PBO.
I think this will get work.
a®
2008 Jul 14 3:47 PM
I have used that method..its not triggering PBO..of the custom container..more over its taking me out of screen...
I mean PBO is not trigeering..
2008 Jul 14 3:52 PM
and moreover if i create 3 containers..the changed values r coming ..but if i have single container..those values r not coming on to the contianer.
2008 Jul 14 4:02 PM
> and moreover if i create 3 containers..the changed values r coming ..but if i have single container..those values r not coming on to the contianer.
That means grid is not refreshed if you are using single container?
For triggering the PBO forcibily try to do this way
DATA: WA_EVENT TYPE CNTL_SIMPLE_EVENTS.
WA_EVENT = CL_GUI_ALV_GRID=>EVT_ENTER.
APPEND WA_EVENT TO T_EVENTS.
CALL METHOD <MY_GRID>->SET_REGISTERED_EVENTS
EXPORTING
EVENTS = T_EVENTS.
Now you should capture this event in DATA_CHANGED event
then go for NEW OK_CODE method that will trigger the PBO forcibly.
a®
2008 Jul 14 4:10 PM
How u used evt_enter?its a protected method..
If so how to access that???
2008 Jul 14 4:21 PM
Sorry,
its
CALL METHOD alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
and also please look at program BCALV_TEST_GRID_EVENTS
a®
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |