2010 Dec 13 9:06 AM
Hi ABAPers,
can we create a view with calculations:
f1 f2 f3 f4 f5
10 20 AB01 1000 f4/f2
10 40 AB01 4000 f4/f2
10 50 AB01 5000 f4/f2
Here f1 f2 f3 f4 f5 are column names and f5 is the column where the value is calculated like f5 = f4 /f2 for every row.
Regards,
Dep
Hi ABAPers,
can we create a view with calculations:
f1 f2 f3 f4 f5
10 20 AB01 1000 f4/f2
10 40 AB01 4000 f4/f2
10 50 AB01 5000 f4/f2
Here f1 f2 f3 f4 f5 are column names and f5 is the column where the value is calculated like f5 = f4 /f2 for every row.
Regards,
Dep
2010 Dec 13 9:54 AM
I think it's not possible to implement in a view. But, it can be displayed in a custom report.
Otherwise, table maintenance events can be used in a maintenance view for the table or directly for the table to calculate the value and save it to the specified field.
2010 Dec 14 11:46 AM
This is possible if you use Table maintenance view to enter the new data. In this case, you can specify the field as display only in the view, and in the table maintenance generator screen, Select Events from the menu (Environment->Modification->Events) . In this Add new entries, and use Events 01, 05, 08 or 21 as per your requirement and in the editor that appears , write your new FORM ... END FORM with your calculations
Regards,
Suzie .
2010 Dec 21 1:24 PM
Hi All,
I want to create a view so that I can "SELECT QUERY" on the view in my report. I got to know that we can use select query only on Databse view.
So creating a maintenance view wont solve the issue.
Correct me if I am wrong.
--Dep
2010 Dec 21 1:34 PM
If you are writing a report why you want to create a view with the required values........You can calculate the same in your report program and display it.......
If the calculaated values will be used by multiple programs, then only you have to go for a new field with the calculated value and the same can be filled with the databse update mechanism like TMG or daatabase update program.....
2010 Dec 21 2:36 PM
Hi Satya,
My report is getting timed out.. I have used field symbols, control break events etc. etc. to optimize my code.. so now I want to use views.
--Dep
2010 Dec 21 5:45 PM
>
> My report is getting timed out.. so now I want to use views.
How do you think a view will help??
Rob
2010 Dec 22 4:54 AM
Hi Rob,
I want to create a view outside my report to avoid inner joins ( with 6 tables ) and then loop through the final internal table and do row wise calculations( around 4 additional fields ) and few more loops for other purpose.. so these loops are eating the time.
So, to avoid these I wanna create a view along with calculations outside report( and do a select query on the view in report) so the runtime of the report is reduced and there is no time out in produciton environment.
--Dep
Edited by: DeepakNandikanti on Dec 22, 2010 5:56 AM