05-22-2006 10:27 AM
I have used
import <GT_POS_DATA> from memory id 'lines'.
and have the same{<GT_POS_DATA>} in my zreport. Now I have to sum
up one field and move it to a variable to be displayed in my report
output.
How shld I proceed.
Thanks in advance.
05-22-2006 10:38 AM
Hi
What's <GT_POS_DATA>? A table? A structure?
If it's a table:
FIELD-SYMBOLS: <WA> TYPE ANY,
<FIELD> TYPE ANY.
LOOP AT <GT_POS_DATA> ASSIGNI_:NG WA.
ASSIGN COMPONENT <FIELD NAME> OF STRUCTURE <WA> TO <FIELD>.
V_SUM = V_SUM + <FIELD>.
ENDLOOP.
max
05-22-2006 10:47 AM
hi,
refer to this sample code
data: temp1 type i.
assign temp1 to <GT_POS_DATA>.
<GT_POS_DATA> = <GT_POS_DATA> + 100.
reportvar = <GT_POS_DATA>.
05-22-2006 10:59 AM
Hi,
Am facing problem over here :
ASSIGN COMPONENT wkgbtr OF STRUCTURE <WA> TO <FIELD>.
This is the part of code I used :
FIELD-SYMBOLS: <gt_pos_data> TYPE table,
<WA> type any,
<field> type any.
LOOP AT <GT_POS_DATA> ASSIGNING <WA>.
ASSIGN COMPONENT <wa>-wkgbtr OF STRUCTURE <WA> TO <FIELD>.
lV_tot = lV_tot + <FIELD>.
ENDLOOP.