Skip to Content
0
Former Member
May 09, 2005 at 06:21 PM

Loop At Assigning syntax question

713 Views

I have a table that I want to reverse the values of each of the numeric fields. I want to use a Loop At I_TABLE assigning <fs>. Then within that structure I want to calculate the inverse of each of the fields in the internal table containing the appropriate field names. Here is my sample code:

*Loop at each record in internal table...

LOOP AT DATA_PACKAGE assigning <DP>.

  • Loop at table with numeric field names

LOOP AT I_DD03L INTO WA_DD03L.

MOVE WA_DD03L-FIELDNAME TO FNAME.

ASSIGN (FNAME) TO <F>.

  • Reverse each numeric field in <DP>

<DP>-<F> = <DP>-<F> * (-1).

ENDLOOP.

ENDLOOP.

I get an error that states <DP>-<F> does not exist.

Any ideas?