‎2004 Sep 15 12:09 PM
Hello,
I'am expiriencing a strange problem:
I'am using ALV Grid on a normal dynpro.
The User can mark on ore more rows for a jump to another dynpro.
Problem as follows: when no row is marked, I make sure that a message is raised:
FORM GET_SELECTED_ROWS.
...
CLEAR: LT_ROWS, <A>, <B>.
CALL METHOD G_ALV_GRID->GET_SELECTED_ROWS
IMPORTING ET_INDEX_ROWS = LT_ROWS.
DESCRIBE TABLE LT_ROWS.
CASE SY-TFILL.
WHEN 0.
MESSAGE S398(00) WITH 'Please mark a row'.
G_EXIT = 'X'. "don't go on in PAI dynpro
EXIT.
WHEN OTHERS.
ENDCASE.
...
But when the Error-message is raised, and I mark a row again, the method GET SELECTED ROWS don't bring up any entries in LT_ROW. I already tried the method CL_GUI_CFW=>FLUSH (before and after GET SELECTED ROWS), but nothing ist going on, the internal table is still empty.
What is wrong here?
Greetings
‎2004 Sep 15 1:22 PM
Hi Maik,
Although this method should be used in case either the data has changed or methods have been used which change the display of grid, I think you should.
Could you please try if this helps?
John.
‎2004 Sep 15 12:25 PM
Hi Maik,
Do you use the METHOD refresh_table_display during PBO? Because this sounds like a synchronization problems between the screen and the control on the front end.
Regards,
John.
‎2004 Sep 15 12:56 PM
There is an event called 'DATA_CHANGED' which should be handy here. In any case, take a look at this program 'BCALV_TEST_GRID_EDITABLE' and I am sure you will be able to figure out the problem
‎2004 Sep 15 1:13 PM
Hi John,
no, I don't use the REFRESH-Method...
should I ?
Regards
Maik
‎2004 Sep 15 1:00 PM
Was way tangent over there.... That was for the EDIT in ALV section..
THe program you should be looking is BCALV_GRID_05.
Sorry for the mistake.
Let me know if the issue is still there.
Regards,
Subramanian V.
‎2004 Sep 15 1:22 PM
Hi Maik,
Although this method should be used in case either the data has changed or methods have been used which change the display of grid, I think you should.
Could you please try if this helps?
John.
‎2004 Sep 15 2:52 PM
Hi John,
well I'am impressed - what I didn't realised so far was taht every time a new instance of g_alv_grid was created. So i marked a row of g_alv_grid-<359>, but during get_selected_rows it was something like g_alv_grid-<383>.
Thanks you very much.
Regards
Maik
‎2004 Sep 15 10:49 PM
Hi Maik
It seems you have solved your problem. There are some actions clearing all selection and scrolling info. And since you every time create a new instance or call some method which clears your selections your selections table is lost.
For a screen session, you should use "set_table_for_first_display" for just once and for next PBO triggers you should execute the method "refresh_table_display".
*--Serdar