|
This website is not affiliated with, sponsored by, or approved by SAP AG.
CL_SALV_TABLE weird refresh [SOLVED]Moderators: Snowy, thx4allthefish, YuriT, Gothmog
23 posts
• Page 1 of 2 • 1, 2
CL_SALV_TABLE weird refresh [SOLVED]I'm facing a weird behaviour in some of my programs using that object. When I change the data, the screen grid doesn't refresh properly. If I use any button of the grid (sort, filter, etc) it refreshes, and my internal data is changed, giving me some nice headhaches when I try to work with unexistant or modified data.
I though it was something related with my SAPGui, but the sample programs work properly. It's not about the FLUSH thing, because I'm calling that bloody method in each even code line and the behaviour is still there. Any hint? Up to now I tried to: 1- destroy the referenced objects and re-create them from scratch (at both levels: the code itself* and through code**) 2- the CALL METHOD cl_gui_cfw=>flush( ) 3- play lotto's until I'll win a big prize and can retire and forget all these things None worked (sadly, the third one failed too) It's not urgent, nobody will lose their work nor their life if I cannot fix it, but I will must change the easy cl_salv_table thing with cl_gui_alv_grid and it's a bit of work I don't like to do... and I have no time to change all my programs that use this class... Any help will be appreciate, although I will not be able to give points. Thanks in advance, Vic * I mean, I deleted/commented all code lines and made then new ** Using CLEAR, REFRESH and FREE sentences before the new CREATE OBJECT's ---------------------------------------- SOLVED: I missed to free the custom container used. SOLVED AGAIN (01/31/2017: You can still use the bloody CL_SALV_TABLE if you just refresh, clears and frees all the items you are using. SAP SUX. Last edited by VLozano on Tue Jan 31, 2017 11:10 am, edited 4 times in total.
Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refreshHi Vic,
Do youi get an event raised when you change the data ? If so, do uyou then call the Refresh method of the object ? (or call the Refresh method anyway ??) Regards
Rich ![]() Abap KC:http://www.richard-harper.me.uk/Kb SFMDR:http://www.se37.com
Re: CL_SALV_TABLE weird refreshWhich shall be the difference? I have all kind of cases, I guess... In one of my failures, the user just leaves the screen where the table shows, change some data and call again (not a return) the grid. The data has been changed, but the old data is shown until you use any of the grid's menu buttons (sort, filter, etc). Then the screen refreshes showing the new data.
And the option where you click a button and then the data refreshes doesn't work too, if my memory doesn't fail. But I had a hurry and decided to move from CL_SALV_TABLE to CL_GUI_ALV_GRID (is the current guideline for now: keep my programs away from CL_SALV_TABLE ![]() Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refreshMore weird behavior: in the last grid I'm using, I declare a user command with it (a button added to the toolbar). My program calls the same screen (with the same container who will get the same CL_SALV_TABLE object with different settings and data) from two points.
If I call it from point A it shows ONE BUTTON and ONE ROW (for example). Then I change the selection (let's say it must show now TWO ROWS), and my calling routine adds another button to the toolbar... when the screen is called, it shows... ONE BUTTON and ONE ROW with old data... if I press the sort button, and accept the current sorting (none), the screen refreshes and OH! now it shows TWO ROWS (with the new data) and... ONE BUTTON. I'm absolutely lost ![]() Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refreshPost your code Vic.
Regards
Rich ![]() Abap KC:http://www.richard-harper.me.uk/Kb SFMDR:http://www.se37.com
Re: CL_SALV_TABLE weird refreshTable creation: in a FORM called from the PBO module of a dynnpro:
PAI when leaving:
In the meantime, the program does some work without changing tha table data. The user leaves the screen (activating the last piece of code I posted) and shall return again. The data table is refreshed, refilled and shown again. But until I do something like sort its contents, the object still shows the old data ![]() Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refreshI don't see an act_tab->Refresh( ) any where.....
Regards
Rich ![]() Abap KC:http://www.richard-harper.me.uk/Kb SFMDR:http://www.se37.com
Re: CL_SALV_TABLE weird refresho! It's BEFORE the object creation...
![]()
But it's my last try... I cannot tell you at how many places I've put the refresh method... Do you think I must add it before the flush? Just where I saw I've put a "display" and not a "refresh"? Will try while waiting... EDITED: did it and still doesn't working Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refresh
Use Excel. Regards
Rich ![]() Abap KC:http://www.richard-harper.me.uk/Kb SFMDR:http://www.se37.com
Re: CL_SALV_TABLE weird refresh![]() What do you mean? Must I forget the CL_SALV_TABLE and continue changing all my tables to CL_GUI_ALV_GRID? I cannot use Excel, because the user must launch events for selected lines ![]() Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refresh
No, I mean I'm out of ideas at the moment. Launching RFC's from excel is no hardship though Vic. Have you system debugged what happens when you click a button that works and one where it doesn't ? Regards
Rich ![]() Abap KC:http://www.richard-harper.me.uk/Kb SFMDR:http://www.se37.com
Re: CL_SALV_TABLE weird refreshI debugged the system, but wasted too much time I had not. The problem is not the buttons are not working but the object itself doesn't. All my buttons (once the displayed data is the right one) work fine.
I tried to find an OSS Note related with that object, but found none that seemed relevant. I'm stuck and I spent all my available "investigation" time. I must decide now, and it seems my next move will be forget that object and use the classical CL_GUI one. Shit! I loved the simplicity of the CL_SALV ![]() Thanks for your time, Rich. If I'll retrieve more information during the tests, of if I'll have additional (and unexpected) time to mess with this thing, I'll refresh (sigh) this thread. Again, thanks mate. Vic Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refresh
Nope, used /HS instead of /H ? Regards
Rich ![]() Abap KC:http://www.richard-harper.me.uk/Kb SFMDR:http://www.se37.com
Re: CL_SALV_TABLE weird refreshI'm used to use /hs to debug my code and /h to debug SAP's one... As I supposed the fail was mine, I think I used /hs... I will give /h a chance if I'll have some spare time, thanks Rich.
Tuly Idiots
Because we know we are part of the problem
Re: CL_SALV_TABLE weird refresh
Use /HS - it shows more code and gives more insight. Regards
Rich ![]() Abap KC:http://www.richard-harper.me.uk/Kb SFMDR:http://www.se37.com
23 posts
• Page 1 of 2 • 1, 2
Who is onlineUsers browsing this forum: No registered users and 6 guests |
|