Add average calculation to FBL5N?
Hi,
My user requires an average calculation on one of the columns in FBL5N (customer line items). This is a standard transaction which uses an ALV.
I know that I can add new fields into this transaction using customizing but I need an average, so would need to create a new field and populate it with strange looking numbers in order to get an average total at the bottom.
I have seen an average calculation button on some ALVs and was wondering if it's possible to change the ALV settings in the code of FBL5N in order to get this to show? At the moment I can only total and subtotal, there is no average calculation button showing.
Or, if you can think of another solution, any suggestions gratefully received. The last resort is asking the user to download the data to excel and calculate the average there.
Thanks,
Gill
hi
select the column, which u have to calculate the average .
and select edit menu ->calculate->Mean value
regards
surender
Similar Messages
-
Dunning (Want to add interest calculation on unpaid invoices (open items)
We have a requirement in dunning program. we would like to add interest calculation on unpaid invoices (open items) to our dunning letters. This interest should be not posted, but calculated only for information purposes. At this moment we can calculate interest only on cleared items.
anyone has any idea about this ? what possibilities are there in SAP for this requirement?
Thanks,
NaveenHello Vimal ,
I want to understand we have setting in Dunning FBMP and OB42. if i will set the interest in OB42 and Select the interest indicator in FBMP.! the interest will be calculated for open items and no posting will be done in customer A/c?
Will you please elobrate about the setting that will be required to do the setting as per the requirement.
Thanks,
Naveen
Edited by: Naveen.Rana on May 26, 2011 9:22 AM -
How to add a calculated field in a list definition (schema.xml)?
Hello,
I'm currently trying to add a calculated field to a list definition (schema.xml).
I have put the following code at the end of the schema.xml for the list I want to create. But when I deploy and activate the feature for the list, it doesn't appear in the list field.
<Field ID="{EE20EC4B-4216-4259-A84F-C478CE42B70F}" Name="EC_EventsMgmt_CalculatedTime" StaticName="EC_EventsMgmt_CalculatedTime" Group="EC_EventsMgmt" Type="Calculated" DisplayName="Calculated Time" Required="TRUE" Hidden="FALSE" ReadOnly="FALSE" Format="DateTime"> <Formula>=DATE(2009,1,1)+TIME(EC_EventsMgmt_ScheduleHour,EC_EventsMgmt_ScheduleMinute,0)</Formula> <FieldRefs> <FieldRef Name="EC_EventsMgmt_ScheduleHour"/> <FieldRef Name="EC_EventsMgmt_ScheduleMinute"/> </FieldRefs> </Field>
Could you please give me some help and explain me why it is not working?
Thanks a lot.Hi there.
If I understand correctly, you create this list within the same feature?
If so, the list isn't available during the propagation, and therefore the calculated field can't be added.
If this is the case, then you could work around this by adding a feature activated event handler to your feature and add the calculated field programmatically in that event.
Hope this helps.
Regards,
Magnus
My blog: InsomniacGeek.com -
How to add profit center in fbl5n selection screen
how to add profit center in fbl5n selection screen
and
it is save to copy ddf from sap to cus
wll it affect anything elseWhen you are on selection screen of FBL5N, press (Shift + F4) DYNAMIC SELECTIONS, there you will see a Dynamic selection screen along with your normal FBL5N selection screen, you will find Profit Centre ther, if you don't find Profit Centre in Dynamic Selection Screen you can add the same from the list on the left, search for profit centre, place your cursor on Profit centre and press the Arrow Button(Copy Selected) on top of the list. Now you will find Prfit Centre in Dynamic selection screen, fill the field with values and press save, that's it.....
Reward points if useful, get back in case of query...
Cheers!!! -
How can I activate the average calculation with cl_salv_hierseq_table class
Hi there,
Iu2019m using class cl_salv_hierseq_table to display a two level hierarchy (header and item) list.
For some reason it seams that those calculations are active by default with class cl_salv_table but not for cl_salv_hierseq_table.
I tried every suggestion from the class documentation and SAP help and nothing seams to work, the menu calculation options are always inactive except for the total calculation.
After the cl_salv_hierseq_table=>factory...
And before cl_salv_hierseq_table->display( )
I triedu2026u2026.
cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 1 )
cl_salv_aggregations->add_aggregation( 'COLUMN1' )
COLUMN1 is a currency column in header level table
u2026u2026..
cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
cl_salv_aggregations->add_aggregation( 'COLUMN2' )
COLUMN2 is a dec column in item level table
u2026u2026..
cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
cl_salv_aggregations->add_aggregation( columnname = 'COLUMN2' aggregation = if_salv_c_aggregation=>average )
u2026u2026..
cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
cl_salv_aggregations->set_aggregation_allowed( 'COLUMN2' )
u2026u2026..
cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
cl_salv_aggregations->set_numerical_aggregation( ).
cl_salv_aggregations->set_aggregation_allowed( 'COLUMN2' )
cl_salv_aggregations->add_aggregation( columnname = 'COLUMN2' aggregation = if_salv_c_aggregation=>average )
u2026u2026..
cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
cl_salv_aggregations->add_aggregation( 'COLUMN2' )
cl_salv_aggregation = cl_salv_aggregations->get_aggregation( 'COLUMN2' )
cl_salv_aggregation->set( if_salv_c_aggregation=>average )
Any help will be appreciated!Thanks Harsh Bhalla,
Subtotals can be built (displayed) at Header Level Only, true but the values to calculate those totals can come from either header or item level, otherwise it wouldnu2019t be of much use would it?
Anyway my question is how to activate the average calculation as well because the totals calculations is already active for either item or header level by default.
For reference when on the display layout Iu2019m referring to the menu Edit -> Calculate -> Mean Value. -
Bug average calculation in form?
Hye,
I made an editable form in acrobat XI for mac.
I set all the fields to number and the last field I want to calculate the average of all the other fields.
So I select the fields which average I want...
But upon testing, I'm getting impossible average calculations.
F.ex. testing several fields with value "9", returns me a "0,..." value, which is impossible...
How to solve?
ThanksIt's hard to say what's happening without seeing a sample. Can you post one somewhere? Unfortunately, you can't post one here, but can at Acrobat.com, dropbox, skydrive.com, etc.
-
Hi,
I am finding some problem while doing the Average Calculation in the Query.
My data is like this:
Batch Stock PO Qty STO Qty
B1 1000 1000 200
B1 1000 1000 500
In the output I want:
Batch Allocated Unallocated
B1 700 300
The calculation for Unallocated is ( Stock - Allocated ).
Right now I am getting:
Batch Allocated Unallocated
B1 700 1300
What I want is to do the Average of the Stock Qty and then subtract that from the Allocatde Qty.
Can anyone help out?
Regards,
SoumenHi,
You can use the Calculated key figure (if you need top 10)...
Regards
sathis -
Urgent!!Average calculation based on a characteristic!
Hi guys
I have an average calculation based on a characteritic ..
Example:
This is a SRM Mgmt.It has an Organisation purchasing org,source purchase,PR,etc..
Report is a Survey rpt.
Average Score across Customer responded for each question for the particular PR...
Where weightage is applied for each question & based on which
total weightage of all Qns for a PR
Avg.Score= -
No of Questions.
How do u calculate using the exception aggregation??????????Pls revert ASAP.
thnx
BI LearnerSolving Myself
-
how can i apply the average calculation on a varchar column means only average the number values in that column and leave or return null if any character value comes in average
thanksHi,
Below is a conversion function, like Justin suggested.
Using this will be slower than a pure-SQL solution, so if Ankur's sulution works for you, you may want to stick with that.
CREATE OR REPLACE FUNCTION to_num
( in_txt IN VARCHAR2
, in_non_num_val IN NUMBER DEFAULT NULL
RETURN NUMBER
DETERMINISTIC
IS
-- to_num attempts to convert in_txt into a number. If it can,
-- then the value is returned. If in_txt cannot be interpreted
-- as a number for any reason (e.g., it contains letters) then
-- in_non_num_val is returned.
-- to_num (NULL) returns NULL.
BEGIN
RETURN TO_NUMBER (in_txt);
EXCEPTION
WHEN OTHERS
THEN
RETURN in_non_num_val;
END to_num;
SHOW ERRORS -
Average calculation with joins
Hi all,
Please have a look here.,
Re: average calculation using sql
My Question is :
Is it possible to do a join here,
so that in where condition thistable.id=newtable.id
and in column area i need projects from new table.
i.e.,
Projects Name Remark SUM AVG
I tried with this query..
SELECT Projects,Name,Remark, SUM(work_hrs), AVG(work_hrs) FROM (
SELECT name,remark ,a.id,b.id,start_dt,end_dt,SUM(end_dt-start_dt) OVER (PARTITI
N BY name,remark ORDER by Name) work_hrs
FROM T a,T1 b) where a.id=b.id
GROUP BY ROLLUP(name,remark);
But o/p is not as i expect..
Thanks in advance...The alias 'b' does not exist outside of the subquery/inine view. Try to alias your subquery for clarity then refer to it;
SELECT MAX(sub.sr_pm_name), sub.ts_desc, sub.ts_remarks, AVG(sub.work_hrs)
FROM (SELECT ts_desc,
ts_remarks,
b.sr_id,
a.ts_srid,
b.sr_pm_name,
ts_expected_date,
ts_actual_date,
SUM(ts_actual_date - ts_expected_date) over(PARTITION BY ts_desc, ts_remarks ORDER BY ts_desc) work_hrs
FROM t_status_report b, t_task_status a
WHERE b.sr_id = a.ts_srid) sub
GROUP BY ROLLUP(ts_desc,
ts_remarks);Another way that might be easier to follow is to use the WITH clause;
WITH sub AS (
SELECT ts_desc,
ts_remarks,
b.sr_id,
a.ts_srid,
b.sr_pm_name,
ts_expected_date,
ts_actual_date,
SUM(ts_actual_date - ts_expected_date) over(PARTITION BY ts_desc, ts_remarks ORDER BY ts_desc) work_hrs
FROM t_status_report b, t_task_status a
WHERE b.sr_id = a.ts_srid)
SELECT MAX(sr_pm_name), ts_desc, ts_remarks, AVG(work_hrs)
FROM sub
GROUP BY ROLLUP(ts_desc,
ts_remarks); -
How to Add Calender & Calculator controls on TextBox in SAP B1
Hi Experts,
How to add the calender control and calculator control to textbox in SAP B1
Thanks,
Y.
Edited by: Yughandar on Jul 20, 2010 3:24 AMHi,
Textbox will automatically display calucator and calender depending on the binding.ie if we bind the textbox with UDF of type Datetime then the it will automatically display the calender..
Regards
Arun -
How to add new calculation module
Hi all,
I need to add to the system new calculation module (formula) for tax calculation (I need to implement tax rounding). I know that these calculation modules are implemented as FORMs, but I did not find a way, how to "register" my FORM as calculation module to be able use it in the system. Any idea where this could be done?
Thanks a lot in advance.If it is from pricing procedure. you need to register an object in VOFM and assign the same to condition type.
Else, try to modify your XKOMV conditions in perform userexit_xkomv_bewerten_end in program LV61AA55 -
hoe the moving average calcualte?
i got one case. the client return the goods at the date that material stock is zero.
will this influnce to the MB03?Hi Lucas
The calculation is as below when Goods receipt for PO
Balance on hand quantity + Goods Receipts quantity
Balance on hand value + Goods Receipts value
New Moving Average Price = Total Value / Total Quantity
Asha -
Weighted average calculation in query
Hello
i'm having some issues calculating an weighted average...
imagine the next scenario
LINE | FORMAT | TIME | WORKERS
10 | 000123 | 10 | 5
10 | 000123 | 350 | 2
10 | 000123 | 75 | 1
From this i need the wighted average of the nr workers considering the time they were working
so, to calculate that i have to do for example:
(time * worker)/total time
in numbers...
((105)+(3502)(75*1))/(10350+75)
=1,89 workers for that line, for that format and for all that time
I am able to do that formula inside bex analyser, however when the user drills down the report or sorts the key figures in other order the result is not correct.
any suggestions?
Best regardsHi Ricardo
What we did, in a similar case, we used two formulas. The first one was the calculation (time * worker) with exception aggregation (summation).
The second formula was the previous formula divided to time.
The trick is which characteristic to use for the aggregation in the first formula, i think you should have the most detailed one.
Then i believe the two formulas will calculate correctly the weighted average based on any selections/analysis that you do.
Regards
Yiannis -
Average Calculation for Available Data only
Hello Gurus,
I have a requirement where I have to calculate Daily average based on Hours (24 hours). We get one reading for every hour. SO 24 readings and divide them by 24. It works fine when I do a calculation like ([Measure]/24) as Hours would always be constant.
The problem comes when we miss some readings for few hours. In that scenario User do not want to take those hours into consideration for which reading is missing.
How can I achieve that?
Any suggestions?
Regards
ShaliniHi,
Try this formula.
=sum([Measure])/count([Measure]) where ([Measure]>0)
or
=sum([Measure])/count(sum([Measure]) where ([Measure]>0))
Amit
Maybe you are looking for
-
How can I change my recovery email address?
I want to change my recovery email address but don't see any tab to click on to change it. I see one to change apple id but not for recovery. Can anyone help?
-
i have a Audigy 4 pro and there is no power to the box every thing is pluged in so is it rma time
-
"Content generation error. Failed to Export the PDF file"
Building a multi-folio in InDesign 6 Folio Builder V30. Received "Content generation error. Failed to Export the PDF file" on several of the spreads. I have tried reducing the original pdf files sizes, but that did not help. Any suggestions on other
-
How can I extract the values on the automatically scaled Y axis?
Hi everyone, In DIAdem script I'm trying to set the scaling of the Y axis completely automatically, and I want to take the values found automatically in one row and have them be the scale of another row. I want to leave the scaling type (D2AxisYScale
-
I need to throw an error message if the terms&conditions checkbox is not checked on click of Submit Button in webdynpro java. Can anyone suggest.