‎2008 Oct 30 8:57 AM
hi all
i have 3 internal tables ,
* in first internal table i have mark-1 ,*
* in 2nd internal table i have mark-2 ,*
* using "PERFORM" i have to add mark 1 & mark 2*
* and i need to display the total in 3rd internal table.*
* how to do by using "PERFORM" .*
Kindly clarify.
with kind regards
vel
‎2008 Oct 30 9:20 AM
Do you have any relation key between two internal tables. can you give the pseudo code.
loop the both internal table and add the mark1 and mark2 and append it to internal table 3 inside the loop.
loop itab1 into witab1.
loop itab2 into witab2.
witab3-total = witab1-mark1 plus witab2-mark2.
append witab3 to itab3.
endloop.
endloop.
Regards
Raghu
‎2008 Oct 30 9:10 AM
hi
In first table using loop add those values and append it to next Internal table.
‎2008 Oct 30 9:20 AM
Do you have any relation key between two internal tables. can you give the pseudo code.
loop the both internal table and add the mark1 and mark2 and append it to internal table 3 inside the loop.
loop itab1 into witab1.
loop itab2 into witab2.
witab3-total = witab1-mark1 plus witab2-mark2.
append witab3 to itab3.
endloop.
endloop.
Regards
Raghu
‎2008 Oct 30 12:16 PM
hi
thanks for your answer , but i need help , by using
SUB ROUTINE [ PERFORM ] .
‎2008 Oct 30 12:23 PM
Raghupathy is right you just have to write:
porgram code......
perform sum_of_tables tables itab1
itab2
itab3.
program code....
definition of form:
form_sum_of_tables tables itab1
itab2
itab3.
definiton type of witab1, witab2, witab3.
loop itab1 into witab1.
loop itab2 into witab2.
witab3-total = witab1-mark1 plus witab2-mark2.
append witab3 to itab3.
endloop.
endloop.
endform.
It will return itab3 which is sum of itab1 and itab2.