Guys, I have the following code :
if x_header-viewname = 'ZRC_C003'.
loop at total assigning <fs_str>.
"assign: component 'ACTION' of structure <fs_str> to <fs_action>.
"check <fs_action> ca 'NU'.
assign component 'BUKRS' of structure <fs_str> to <fs_fld>.
if <fs_fld> is assigned.
lv_bukrs = <fs_fld>.
endif.
assign component 'SAKNR' of structure <fs_str> to <fs_fld>.
if <fs_fld> is assigned.
lv_bukrs = <fs_fld>.
endif.
assign component 'ZRC_PERIO_I' of structure <fs_str> to <fs_fld>.
if <fs_fld> is assigned.
lv_zrc_perio_i = <fs_fld>.
endif.
assign component 'ZRC_PERIO_F' of structure <fs_str> to <fs_fld>.
if <fs_fld> is assigned.
lv_zrc_perio_f = <fs_fld>.
endif.
assign component 'ZRC_TP_CONTA' of structure <fs_str> to <fs_fld>.
if <fs_fld> is assigned.
lv_zrc_tp_conta = <fs_fld>.
endif.
assign component 'ZRC_REL3' of structure <fs_str> to <fs_fld>.
if <fs_fld> is assigned.
lv_zrc_rel3 = <fs_fld>.
endif.
assign component 'ZRC_CEF' of structure <fs_str> to <fs_fld>.
if <fs_fld> is assigned.
lv_zrc_cef = <fs_fld>.
endif.
endloop.
endif.
to be honest i have copied this from other program , my problem is that i dont know what you have to do to declare TOTAL in a proper way, because when i debugg the original program i see that total has all the fields of the table , however my total ( in my table ) only has a field called LINE.
Edited by: José M. Sánchez on Feb 14, 2011 6:23 AM