Skip to Content
0
Apr 08, 2008 at 10:52 PM

looping at a dynamic table .

24 Views

I am trying to modify contents of an internal table (certain calculations). This table is dynamic internal table.

This is what I ideally want to do.


loop at <gt_tabletotal> assigning <l_linetotal>.


if  <l_linetotal>-PERIOD = 'Prior'.

read table <gt_tabletotal> with key pmnux = <l_linetotal>-pmnux  wenux = <l_linetotal>-wenux period = <l_linetotal>-period = 'Current' .

if sy-subrc eq 0.
 <l_linetotal>-PCNT = <l_linetotal>-TOTAL / <gt_tabletotal>-total * 100 .
endif.

endif.


endloop.

But this results in a syntax error - saying <l_linetotal> has no structure. How can i fix it ? .In the debug more, I do see the struture and am able to modify it in debugger.

Edited by: Shareen Hegde on Apr 9, 2008 12:56 AM