12-15-2009 9:53 AM
Hi All,
I have a requirement wherein I have to add up the entries of 2 different columns of 2 different database tables and show it in one column of a View.
Eg. Table A has column A and Table B has column B. I create a view C with column C.
Now Col C = Col A + Col B
Can anyone please let me know how this view can be created?
Thanks,
Momdipa
12-15-2009 10:35 AM
Hi Momdipa,
ABAP Table View does not support dynamic arithmetic operations. So, you can't achieve this business logic in the view. There are no operators in the view which can help you to do this.
If you need this functionality, you need to create a ABAP Report to calculate the sum on the execution of the Report. And then you can update the View based on your own business logic.
Hope this helps.
Thanks,
Samantak.
12-15-2009 10:35 AM
Hi Momdipa,
ABAP Table View does not support dynamic arithmetic operations. So, you can't achieve this business logic in the view. There are no operators in the view which can help you to do this.
If you need this functionality, you need to create a ABAP Report to calculate the sum on the execution of the Report. And then you can update the View based on your own business logic.
Hope this helps.
Thanks,
Samantak.
12-15-2009 10:50 AM
Hi Samantak,
Thanks for your answer. So, you mean from the report we update the view with this final list. I agree with it.
But actually, I was looking for an option from the view if at all it existed.
12-15-2009 11:46 AM
Hi,
Using a view you will not be able to achieve this requirement. So, I guess you have to figure a work around for it. Like you can use a Table Maintainence Generator to create the Maintainence View and a module pool logic to display the summation of column A and Column B in Column C. But the user has to execute the View and have to Save it explicitly to get he updated values.
Hope this helps.
Thanks,
Samantak.
12-15-2009 12:24 PM