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 Learner
Solving Myself
Similar Messages
-
Query field calculation based on a characteristic field
Hi
I have a req wherein the query has a field "Balance". Now here the value of the Balance field is calculated based on another characteristic "0bal_flag". 0bal_flag has values "X" or blank. The 0bal_flag is actually a attr of 0gl_account and i have it as a nav attr in my cube.
The calculation goes like this....
If 0bal_flag = 'X' then "Balance" = balance (there is a balance field in underlying infoprovider)
else "Balance" = Debit -credit (these fields are also there in underlying infoprovider....)
So how do i achieve this...?
Since 0bal_flag is a char I cannot use it directly in a formula....
Thanks
GauravHi Gaurav,
Create a replacement path formula variable on the 0bal_flag with evaluate as boolean checked, you will get the values 1 when flag is X and 0 when the flag is initial, now you can use this 'formula variable' in the formula
((0bal_flag==1)balance)+((0bal_flag==0)(debit-credit))
hope this helps,
Rk. -
Moving average price calculation based on year to date figures
Hello,
I've been working for months on the stock valuation at month end closing for the Finance department. We discover a situation where the moving average price is not calculated as we expected.
The situation is as follows:
2 purchase orders for the same material at different periods and with different purchase order prices
the invoice of the first pruchase order has been recorded after the good receipts of the 2 purchase orders with purchase price variance, good issues have been recorded between the good receipts and the first invoice receipt, therefore the stock quantity is lower than the quantity invoiced
the invoice of the second purchase order has been recorded as well with price purchase variance after the first invoice and after good issues, therefore the stock quantity is lower than the quantity invoiced.
Here is an example with figures:
SAP Calulation
Good entry
Good Issue
Before Posting
After Posting
Good receipt
Invoice receipt
Date
Movement
Quantité
Price
Value
Quantité
Price
Value
Quantité
Value
PMP
Quantité
PMP
Value
Quantité
PMP
Value
01.01.2014
Intial Stock
2000
11
22000
16.01.2014
Purchase Order 1
10000
10
100000
2000
11
22000
12000
10,17
122040
20.01.2014
Good issue
2000
20340
10,17
12000
10,17
122040
10000
10,17
101700
18.02.2014
Purchase Order 2
20000
9
180000
10000
10,17
101700
30000
9,39
281700
22.02.2014
Good issue
22000
9,39
206580
30000
9,39
281700
8000
9,39
75120
30.03.2014
Purchase Order 1
10000
9,5
95000
8000
9,39
75120
8000
8,89
71120
21.04.2014
Good issue
2000
8,89
17780
8000
8,89
71120
6000
8,89
53340
31.05.2014
Purchase Order 2
20000
7
140000
6000
8,89
53340
6000
6,89
41340
- When the first invoice is recorded, SAP calculate the MAP this way: ( 8000*9,39 + (95000-100000) * (8000/10000) ) / 8000 = 8,89
- When the second inoice is recorded, SAP calculate the MAP this way: ( 6000*8,89 + (140000-180000) * (6000/20000) ) / 6000 = 6,89
Moving average price calculation requirement
Good entry
Good Issue
Before Posting
After Posting
Good receipt
Invoice receipt
Date
Movement
Quantité
Price
Value
Quantité
Price
Value
Quantité
Value
PMP
Quantité
PMP
Value
Quantité
PMP
Value
01.01.2014
Intial Stock
2000
11
22000
16.01.2014
Purchase Order 1
10000
10
100000
2000
11
22000
12000
10,17
122040
20.01.2014
Good issue
2000
20340
10,17
12000
10,17
122040
10000
10,17
101700
18.02.2014
Purchase Order 2
20000
9
180000
10000
10,17
101700
30000
9,44
283200
22.02.2014
Good issue
22000
9,44
207680
30000
9,44
283200
8000
9,44
75520
30.03.2014
Purchase Order 1
10000
9,5
95000
8000
9,44
75520
8000
9,28
74240
21.04.2014
Good issue
2000
9,28
18560
8000
9,28
74240
6000
9,28
55680
31.05.2014
Purchase Order 2
20000
7
140000
6000
9,28
55680
6000
8,03
48180
- When the first invoice is recorded, SAP should calculate the MAP this way: (2000*11+10000*9,5+20000*9)/(2000+10000+20000) = 9,28
- When the second inoice is recorded, SAP should calculate the MAP this way: (2000*11+10000*9,5+20000*7)/(2000+10000+20000) = 8,03
Could you tell me if you know how to set up the calculation based on this formula (Intial stock value at MAP + Year to date Purchasing value) divided by (intial stock quantity + quantity purchased)?
Thank you in advance
RegardsArti,
MBEWH table will get you the MAP of a material monthwise,I guess you need to get the logic which will use those details to arrive on MAP for a paritcular date.
Check the SDN Forums with the keyword "MOVING AVERAGE PRICE REPORT" to get some lead.
moving average price report
K.Kiran. -
Interest calculation based on Net Due Date
Hi guys: I want the interest calculation based on net due date and not document date or posting date.
I tried to check the box "ALWAYS CALCULATE INT FROM NET DUE DATE in prepare item interest calculation step, but system gives me message
"Do not select "Calc.intrst from net due date" for this int.calc.type
Message no. F7128"
Here are my questions:
1- how can i make the system to calculate interest only after the item is due for payment - right now its calculating anyday after the document date
2- Is this the correct place in configuration to do this? (ALWAYS CALCULATE INT FROM NET DUE DATE )
3- Also in T code FINT, how can i run interest posting for only one item rather than all that show up in test run? I tried selecting/highlighting only one but it posts all.
thanks much
brianHI,
The system always calculates the interest from the document date of the invoice,
as of my knowledge there is no setting for the interest calculation from the net due date, so
what u need to do is when u are running the open item interest run u specify the period of only the date
from the net due date to required date as of u.
if u want to calculate the interest to paticular invoice and having two invoices
then u can run as per the document date and other thing is u can block the invoice for dunnig.
Regards,
Padma -
Need to perform calculations on a specific characteristic in a BeX query
Hi,
I have a requirement to perform calculations based on Characters.
The data that is currently displayed in the report.
Date User Activity A B
04/24/2014 BR3TXA PTWY 10 12
04/24/2014 BR3TXA CLX1 25 04
04/24/2014 YEXM035 NOWE 14 15
04/24/2014 YAXP134 DONQ 08 05
04/24/2014 YRST112 PTWY 12 05
If Activity is PTWY, then A should be A * B = A. For the rest of the activity type, the value in A should be the same.
The result should display as Below:
Date User Activity A B
04/24/2014 BR3TXA PTWY 120 12
04/24/2014 BR3TXA CLX1 25 04
04/24/2014 YEXM035 NOWE 14 15
04/24/2014 YAXP134 DONQ 08 05
04/24/2014 YRST112 PTWY 60 05
Is there a way out in IF, THEN, ELSE statements. Or Customer Exit variable with Code in CMOD would work?This can be achieved just with the help of two simple selections or RKF.
Restrict the KF A with the activity = PTWY--Lets call this RKF1..Now this will populate value against PWTY only.
Create another Restricted KF--with A--This time Exclude value = PWTY--This will populate values against activity other than PWTY...Lets name it RKF2.
Now create a new formula say F1 = (RKF1*B)--Multiply RKF1 with B keyfigure.
Now the final formula say F2 = (F1+RKF2)--This will give the desired result.
Hide the other objects.
Regards,
AL -
Shipment cost calculation based on HU's allowed packaging weight
Hi all,
I need to calculate a shipment cost based on the Means of Transport's Allowed Packaging Weight (MARA-ERGEW). After condition record determination of cost per ton in each case, the system must multiply this value times the allowed packaging weight.
I know that through customizing I can create a Condition Type with Calculation Base = 'C' (Handling Unit) and Calculation Type = 'D' or 'E' (Gross or Net Weight). This is almost what I need except for the Calculation Type, because Allowed Packaging Weight is not an option in the field's matchcode (Percentage, Fixed Amount, Quantity, Gross Weight, Net Weight, Volume, etc...).
Is there any way through customizing I can achieve this? Or how can I program a routine in the Pricing Procedure for the Condition Type in order to make the calculation based on the HU's Allowed Packaging Weight.
I appreciate your help!!Freight carriers charges weight on the basis of Weight / volume of the items.SAP shipment works on the same principle.
Cost of transporting ton of Potataoes is same as transporting 10 ton of aluminium between two known destinations.
Hence it is illogical to distributes cost on the basis of item value. However if still you want to distribute the same on value basis then maintain freight condition(%) in PO as per your prefined logic of distribution of freight cost.
It is well known fact that cost of freight % is always higher in Low value items & iis low in case of High value items.
Regards,
Sanjay Kohli -
Calculation based on date key figures in BEx
Hi Friends,
Hi Friends,
I need to creat report for sales order data, which involved the calculation based on dates.
In my cune iam having the data at the granual level with the dates as key figures. the calculation that i need to do is VTW = Actual PGI date - Customer want date.
1) whn i run the report at the granual level my VTW is working correctly. No issues.
2) when i run the report at higher levels the date fields are updated with X, as the system is unable to aggrigate the dates. The dates are at the material level in a sales order. I need to show the VTW at the sales order level (each one of the two dates are same for all the materials). So, when i run the report with out mataril at the sales order level...i wanto sea the bothe date fields in a single line and also the VTW calculated as the different between throse two dates.
3) Once we get the VTW correctly at the sales orde level. if i drill down the report for material, i want to sea both the dates in every record againest the matarial, but the VTW only aginest the first record...that is againest the sales order. I dont waht the VTW value repeated/duplicated for all the records againest the sales order,as VTW makes sence only at the Sales Order level.
Please suggest me hwo i can achive the resulsts by meeting both Point 2 and 3.
Thanks for ur help...in advance.
Thanks,
RenuHi..
I have the data from the extractore and in the cube as below.
SALES ORDER ITEM MATERIAL DATE1 DATE2
101 Item1 Mat1 01/01/2010 15/01/2010
101 Item2 Mat2 01/01/2010 15/01/2010
101 Item3 Mat3 01/01/2010 15/01/2010
I need the reports as below...
Report1:
SALES ORDER DATE1 DATE2 VTW (DATE2 - DATE1)
101 01/01/2010 15/01/2010 14
currently iam getting this Report1 output as below...
SALES ORDER DATE1 DATE2 VTW (DATE2 - DATE1)
101 X X 42
Report2: Out put required as below
SALES ORDER ITEM MATERIAL DATE1 DATE2 VTW (DATE2 - DATE1)
101 Item1 Mat1 01/01/2010 15/01/2010 14
101 Item2 Mat2 01/01/2010 15/01/2010
101 I tem3 Mat3 01/01/2010 15/01/2010
currently iam getting this Report2 output as below...
SALES ORDER ITEM MATERIAL DATE1 DATE2 VTW (DATE2 - DATE1)
101 Item1 Mat1 01/01/2010 15/01/2010 14
101 Item2 Mat2 01/01/2010 15/01/2010 14
101 I tem3 Mat3 01/01/2010 15/01/2010 14
As VTW is need to be measued at the sales order level and we always have the DATE1 & DATE2 as same for all the itesm, it should be shon as only 14 in the first record. It mean once iget the required output from Report one in a single line with VTW as 14, it should not repeat with every line , when i dril down the report for Items or materials.
Even if i can generate oly report2 as required in a single sheet ...that will be enough.
Plas kindly provide some solution as how we can achieve this,
Thanks,
Renu -
Calculate Average value based on Day ??
Hello,
I am trying to calculate the Average value based on a day. The data is presented as follows...
Day SOCount
Mon 34
Mon 56
Mon 67
Tues 24
Tues 25
Tues 23
Weds 45
Weds 69
The issue im having is that the Day column needs to be grouped first and the SOCount sumed together. Then the Average SO Count needs to be calculate based on this.
ThanksThanks for the reply,
The solution you have provided only gives me the average of the count of the SO Count, not the actual average of all the values added together then divided by the count..
The report i am creating only has charts in it. So i am trying to create a chart showing the
Average Sale Order Value by day.
I should have metioned this from the start, sorry.
Is it possible to do ?
Edited by: davitali on Nov 4, 2011 6:32 AM -
Calculation based on radio box Help PLEASE....
I am trying to make a text box perform a calculation based on whether or not a radio button is checked or not.
If the radio button named "Basting" in the "Quilting Type" group is checked then the text box "Basting Charge" should find the value of the "Total Square Inches" field and multiply that total by 0.015 and show the new total in the text box as a dollar value, if the radio button "Basting" is not checked the value in the "Basting Charge" field should be "-0-".
I can get the calculation I want from this:
var v1 = getField("Total Square Inches").value; event.value=v1*0.015;
but how to include the radio button function and the "-0-" ?Okay, I have now made a "check box" with the name of "Basting", not in a grouping.
This is the set up:
Text Field = Total Square Inches
Check Box = Basting
Export Value = Yes
Text Field = Basting Charge
Calculation for "Basting Charge" should be "0" unless the "Basting" check box is used, then it should get the value of the "Total Square Inches" and multiply that number by 0.015 and show this value in the "Basting Charge" box displaying as a dollar figure.
So if the value in the "Total Square Inches" is 12,000
and the "Basting" check box is used
The "Basting Charge" should read "$180.00"
if the check box is not used then it should read "-0-" -
Calculation based on Internal Table Row ID
Hi,
I have internal table, i want to do some calculation based on Internal table Row ID, wich will create system automaticlly and this id will uniq. I want to use this id in my program.
So how can i do this.
Ranveer.hi,
if u want to create this id automatically,use transaction SNRO,
or u can create t through programming too.eg. suppose field is 'id' in table 'customer'.
select * from from customer.
itab-id = sy-dbcnt + 1.
modify customer from itab.
u can use this id in calculations too, -
Prorate calculation based on Martial status
Dear Experts,
We have two types of the minimum of Housing Allowance(IT0014 - HA01WT):
1. 1000 Monthly for Single
2. 1500 Monthly for Married
And this changeable based on Marital Status Key on Info Type 0002. However; if the change of Marital Status happened in the middle of the month the Housing Allowance should be calculated on a pro rata basis.The System gives the employee the new Housing Allowance in full. Please provide me the logic or operation that we can use in the PCR
Pls let me know for any further clarification
Regards
SBI found solution on my own. please find below the rule
TABLEP0002 Read table fields
VARGBFAMST Tab.field VVVVV v.ky
1
WPALL?LAST ID = LAST?
N
Y
AMT?IZSHNG Comparison
ADDWT * OT Output table
<
RTE=FZ7N Set
RTE?1 Comparison
=
ZERO= NRA AmtNumRteTime = 0
RTE=FZ7T Set
AMT=IZMHNG Set
MULTI RAA Multipl.amt/no/rate
AMT/TKDIVI Division
ADDWT 1001 OT Output table
RTE-TKDIVI Subtraction
RTE*-1 Multiplication
AMT=0 Set
AMT=IZSHNG Set
MULTI RAA Multipl.amt/no/rate
AMT/TKDIVI Division
ADDWT 1001 OT Output table
>
AMT=IZMHNG Set
ADDWT * OT Output table
Now its calculating based on prorate basis for both single and married status...
Regards
Sanjai -
Query for Auto Calculation based on input of 2 Fields
Hi,
I would like to write a sql query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Order.
For example. A query on Sales Order where I have Item 040634 (Code for a Flower) and Quantity 200.
I have a UDF (Bunching) where the value is 10, 15 or 20.
Based on the Bunching the result should be given in another UDF (Noofsleeves).
(Quantity) 200 / (Bunching) 10 = 10 (Noofsleeves)
The Order will be having multiple items where the Bunching can differ for each item.
Is it also possible to remove the calculated noofSleeves from Inventory.
I am using 2007A SP01 PL05Hi ,
You may try this: Apply this fms on other udf and auto refresh on the udf mentioned in the query (in your case Bunching).
SELECT $[RDR1.Quantity.number] / $[RDR1.U_UDF.number]
You may check these too.
cALCULATION OF udf ON UNIT PRICE
FMS
Thanks,
joseph
Edited by: Joseph Antony on Jul 8, 2010 12:31 PM -
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
Maybe you are looking for
-
Looking for a journaling app the allows dictation and editing and would look like and old fashion journal book that I can put in my iBook shelf.
-
How can I connect my powerbook (a1502) with my old monitor (a1081).
How can I connect my powerbook (a1502) with my old monitor (a1081). Which adaptor do I need?
-
Message Type for Material Master Data Changes
Hi all I'm managing Message Types for Material Master Data extraction from R\3 system to BW system, in order to load on BW only the changes done to some fields of MARA table that are delta relevant. Now from R/3 BD50 Transaction I can see that there
-
Web Dynpro for ABAP iview window question ...
Hi, I have a web dynpro for abap iview that calls a web dypro for abap program in ECC that generates a PDF document. It works perfectly, except when the iview is launched it opens a blank iview page and then opens a separate window in which the PDF
-
NForce 4.27 drivers + SB Audigy 2 ZS Platimun = Windows XP not booting!
Hi folks, I know that I'm not using my MSI K7N2 Delta in my main rig anymore, but I've gotten good help here in the past (you guys rock!), and I *do* have the MSI GeForce 6800GT in my config so I was hoping that you folks might be able to give me som