‎2007 Jan 21 5:28 AM
this is internal table ITAB
F1 F2 F3
1 3
2 2
3 4
4 1
F1 is the field one ,F2 is the field two, both containing data like above ,
F3 is the field three it has no data
we want to add F1,F2 fields we have to store into F3 field
F! fied has row value "1" etc..
F2 fied has row value"3" etc..
1 * 3 = 3 this result will be stored into F3 field result of 3 will be first row of F3.
could u plz explain clearly with code and step by step with comments
‎2007 Jan 21 5:36 AM
Hi Rajesh,
I couldn't get whats your requiement, but it seems that you want to add two fields from the same row and place it into the third row. If so then see the code.
Loop at ITAB.
ITAB-F3 = ITAB-F1 +ITAB-F2.
Modify ITAB.
Endloop.
‎2007 Jan 21 5:33 AM
‎2007 Jan 21 5:34 AM
if itab[] is not initial
loop at itab.
itab-field3 = itab-field1 * itab-field2.
modify itab index sy-tabix.
endloop.
endif
award points if found helpful
‎2007 Jan 21 5:36 AM
Hi Rajesh,
I couldn't get whats your requiement, but it seems that you want to add two fields from the same row and place it into the third row. If so then see the code.
Loop at ITAB.
ITAB-F3 = ITAB-F1 +ITAB-F2.
Modify ITAB.
Endloop.
‎2007 Jan 21 5:39 AM
If you really only want to know ABAP arithmetical operators, then check this link:
http://de.geocities.com/rafaelreichle/abapkeywords.html
http://www.planetsap.com/thesap_abap_keywords.htm
Thanks,
Santosh