Skip to Content
0
Former Member
Nov 30, 2009 at 05:06 AM

Problem with modifying dynamic internal table

312 Views

Hi All,

Im populating a dynamic internal table from the static internal table where the dynamic internal table has columns that repeats based on the selection criteria. Eg: static internal table columns - ov,cf,... dynamic internal table columns - ov1,cf1, ov2,cf2,...

While populating value to dynamic structure, im changing the column names ov1,ov2,cf1,cf2... to ov,cf,.. so that the corresponding fieldname will be recognized in the static internal table otherwise the 'assign component' statement fails because dynamic fieldname will not match exactly with static fieldname. Now the field-symbol pointing to the dynamic internal table is fetching the correct value but while modifying the internal table, its modifying all the rows.

Say, the value for column ov1 = '1', ov2 = '2'. The structure captures these values one at a time, so it becomes ov1 = '0' and ov2 = '2'. and it wrongly modifies both the columns for a particular row and the value for ov1 becomes '0' instead of required value '1' when i need to modify only the column 'ov2'.

Is it possible to use 'TRANSPORTING' functionality with the dynamic internal table for modifying the required column alone? Note: the no of rows in my alv output is fixed.