Now i try to pull the above two tables in different table boxes. Now logically, The sum should only sum it up, If any of the Week and Product_Family are repeated. Now what happens here is that the sum is different that the one that i can see in the table box of ACT. Can some one explain the reason
Using QV you don't need to create the SUM_ACT table at the script level. You could just use a chart (as a straight table, for example) and include week and product_family as dimensions and sum(Qty) as an expression.
-----
In your case, you have all the the behavior in the table box because it will show you all the possible values in a line.
You could go to table properties -> presentation tab, select some fields and check 'Omit rows where field is null' to get the results you are looking for.