Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

view with calculations

Former Member
0 Likes
1,050

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,013

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.

Read only

lijisusan_mathews
Active Contributor
0 Likes
1,013

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 .

Read only

Former Member
0 Likes
1,013

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

Read only

0 Likes
1,013

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.....

Read only

0 Likes
1,013

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

Read only

0 Likes
1,013

>

> My report is getting timed out.. so now I want to use views.

How do you think a view will help??

Rob

Read only

0 Likes
1,013

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