‎2010 Mar 10 9:04 PM
Hello,
I have defined a dynamic table using the RTTS method cl_abap_tabledescr=>create; the structure definition contains standard fields, custom fields and fields representing characteristics. The result a field symbol defined as standard table, <gt_data>. I'm using this table then to display a simple ALV list using cl_salv_table=>factory.
Problem: refreshing the data does not work. After the data has been changed (by jumping into the transaction and back to the ALV from a hotspot event), I re-read the data, CLEAR, UNASSIGN and ASSIGN the <gt_data> table again and call the cl_salv_table=>refresh method. The data in the <gt_data> table is being correctly set (verified via debugger), but the ALV does not update.
Any ideas?
‎2010 Mar 10 9:55 PM
Hi Hans-Peter,
Not quite sure I understand the steps. I would expect that you have a global field symbol that represents your table. I'd expect that you'd construct this table once via RTTS functionality and then keep using that specific instance. The UNASSIGN/ASSIGN step sounds a bit suspicious to me, because it seems as if you're creating a new instance, whereas your ALV still points to the old instance you created. So then when calling the [refresh_table_display|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5531ed30911d2b467006094192fe3/frameset.htm] method your updates might not take effect, because ALV still has the reference to the previous table you've constructed.
Cheers, harald
‎2010 Mar 10 9:55 PM
Hi Hans-Peter,
Not quite sure I understand the steps. I would expect that you have a global field symbol that represents your table. I'd expect that you'd construct this table once via RTTS functionality and then keep using that specific instance. The UNASSIGN/ASSIGN step sounds a bit suspicious to me, because it seems as if you're creating a new instance, whereas your ALV still points to the old instance you created. So then when calling the [refresh_table_display|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5531ed30911d2b467006094192fe3/frameset.htm] method your updates might not take effect, because ALV still has the reference to the previous table you've constructed.
Cheers, harald
‎2010 Mar 10 11:02 PM
Harald,
thank you for pointing me in the right direction - you are correct, I ran through the RTTS definition twice. I now only do a CLEAR for the field symbol and replace the contents, but not the instance.