Skip to Content
0
Former Member
Sep 27, 2008 at 08:58 AM

adding the fields

35 Views

Hi in the below code i want to add the values of vbeln and kunnr in secondary list but it is not coming fine can anyone solve my problem....

data : begin of wa,

kunnr type kunnr,

end of wa.

data it like table of wa.

data : begin of wa1,

vbeln type vbeln,

end of wa1,

it1 like table of wa1.

data : v_kun type i.

data : field type string,

value type kunnr.

data : total type i.

select kunnr into table it from kna1 up to 4 rows.

loop at it into wa.

v_kun = wa-kunnr + 100.

write : / wa-kunnr, v_kun.

endloop.

at line-selection.

get cursor field field value value.

if field = 'WA-KUNNR'.

select vbeln from vbak into table it1 up to 4 rows.

endif.

loop at it1 into wa1.

total = wa1-vbeln + wa-kunnr.

write : / wa1-vbeln , total.

clear : wa1-vbeln , total.

endloop.

Regards,

Thiru.