Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CL_SALV_TABLE - refresh using a RTTS defined dynamic table

Former Member
0 Likes
929

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
593

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

2 REPLIES 2
Read only

Former Member
0 Likes
594

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

Read only

0 Likes
593

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.