Condition for Calculated KeyFigure
Hi everyone,
I need to have an additional Keyfigure based on a Condition. For example, If Staus is Completed , then I need to take the Net Price as Allocated Price. And if Status is Incomplete , then I need to fill the Net Price as UnAllocated Price.
So , in this case , I will have 2 Calculated KeyFigures in the Query Designer. One for Allocated Price and the other for Unallocated Price. But how can I restrict t the values based on Status.
For Example
Status Net Price Allocated Price UnAllocated Prcie
Complete 100 100 0
InComplete 200 0 200
1) Is there any way tht we can avoid displaying Unallocated Price for Complete Status(Since value will be Zero) and Allocated Price for Incomplete Status
2)Is it better to have these values calculated in END ROutine in the BackEnd.(But this might affect the performance as I require these values only for this Report and I have more than 2 Reports based on the same InfoProvider)
Thanks and Regards,
Samir
Hi,
Could you please let us know what will be the value of the status field if it is incomplete. Suppose if you have an EMPTY value if it is not complete, you can use the IF ELSE condition with the Boolean operation in the Calculated Keyfigure or Formula as below,
(Status ==1)* Unallocated Keyfigure + (Status NOT EQUAL 1)*allocated Keyfigure
If it is not the case then better to handle it at the routine level. Hope this helps.
Regards,
Mani
Similar Messages
-
Exclude conditions for calculating vbap-netwr
Hi,
I know the net price field is calculated automatically as a total of the pricing procedure excluding tax condition types, but is possible to exclude another condition wich type is discount or surcharge or a price???
Thank you!Hi
You can exclude any condition type from net price in your pricing procedure calculatio. Did you try it in your system by maintaining condition type in pricing procedure and deducting that from net price?
Thank$ -
Problem inText Variable cannot replace 0calmonth in calculated keyfigure
Hi ALL,
I am facing a problem while creating text variable for calculated keyfigure saying canot find the replacement for 0calmonth, I have 5 restricted keyfigures individually created a text variable for it. and now i have created a calculated keyfigure for displaying text using same text variable .
Could you please tell me what might be the problem.How to rectify .do response urgent plz.
Thanks much.Hi,
Please find below the code.
WHEN 'ZMON_TEXT_CE'. ---Text Variable
DATA:text2(60),
c_calmonth(6),
l_month TYPE /bi0/oicalmonth,
t_year(4),
zktx TYPE fcktx.
CLEAR :text2,c_calmonth,t_year.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = '0CALMYL'. ------user input variable
c_calmonth = loc_var_range-low.
ENDLOOP.
l_month = c_calmonth+4(2).
t_year = c_calmonth+0(4).
SELECT ktx FROM t247 INTO zktx WHERE spras = 'EN' AND mnr = l_month.
ENDSELECT.
CONCATENATE zktx '-' t_year INTO text2.
IF text2 <> ' '.
l_t_range-sign = 'I'.
l_t_range-opt = 'EQ'.
l_t_range-low = text2.
APPEND l_t_range TO e_t_range.
ENDIF.
Hope it helps.
Regards,
AL -
Pricing condition for Taxes in R/3 not being calculated.
We have SRM4.0 in classic mode with R/3 4.6C. In SRM we configured Tax calculation is in R/3. When creating the shopping cart, EBP calls R/3 via RFC for the Tax % and displays the tax information in the cart successfully. The cart is saved and the completed PO is created in R/3. However, our pricing condition for tax, at Pur.Org/Material group in R/3 does not get calculated - so in the item condition screen, no tax is calculated. If i go into the change PO and in Item conditions/Update, (G-Copy Pricing and Redetermine taxes) then it is OK (but this is not ideal). When i do an RFC trace, using RSRFCTRC, i can see my Pur Org, Material Group and Tax code all being passed to R/3. Also, when i do a manual SE37 test on funct.mod. BAPI_PO_CREATE, it does calculate tax correctly - i am stuck - any help appreciated. rgs Adam
Dear Poster,
As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
Best Regards,
SDN SRM Moderation Team -
Hi Dear All,
We have two real time infocubes and two aggregation levels based on these cubes in one multiprovider
first cube1 is like
char1| char2| keyfig_coefficient(single value for each combination of char1 and char2)
same aggregation level1
(we have input query to fill coefficients by one responsible user)
second cube2 is like
char1| char2| keyfig_quantity| keyfig_result
same aggregation level2
Input ready query should be like (for all other users of different org units)
char1|char2|keyfig_coeff| keyfig_quant(for input) | keyfig_result = keyfig_coeff*keyfig_quant(calculated value, should be saved to cube2)
And we don't have pregenerated lines in cube2, users have to add new lines themselves by wad.
Question is, what is the optimal (easiest) way to make calculation and save result data to cube2 where keyfigures for calculation should be used from different infoproviders. I need just a hint.
Appreciate any help.
Nadya.I found decision, agregation levels sould be based on multiprovider, not included.
-
Using result of a Calculated Keyfigure as input for a Virtual Keyfigure
Hi experts,
is it possible, to use the result of a calculated keyfigure of a query for the input of a virtual keyfigure und use the virtual keyfigure within the same query?
My problem: depending on drilldown, I have a different percentage within the calculated keyfigure. And depending on that value, I would like to read a score out of a DSO and fill a virtual keyfigure with that, and show the score in the same query. In my opionion, the only way to calculate the score is on the fly, depending on the navigation step I do. Maybe there is another approach that I do not know.
I was glad for any ideas. Thank you in advance!
Regards
F.L.Hi,
Sorry but a calculated key figure result cannot be used in a virtual key figure calculation. The reason purely being that the CKF calculations happen after the Virtual KF/ Char calculations (through BAdI or CMOD).
The only solution i see here is that you will need to do the calculations in the VKF logic itself. Please do remember that VKF calculations and population happens for each record bein fetched into OLAP from the Infoprovider for the Filters put into the report.
Hope it helps.
Thanks,
Abhishek. -
Help needed in creating a calculated keyfigure/query exit
Hi Reporting Gurus
Please someone give me a solution for my issue.
I have two keyfigures
Plan Finish Date(PFD)
Actual Finish Date(AFD)
I have one calculated keyfigure
Delivery Status = (AFD<=PFD) . When this condition is met it returns 1 else 0.
But Delivery Status = (AFD<=PFD) returns 1 if AFD and PFD both exists and if the condition is met and also works (returns 1) for the scenarios mentioned below.
1. if AFD is blank and PFD is filled
2. if AFD and PFD both is blank.
So I need a solution for my issue in such a way that
Delivery Status = (AFD<=PFD) should return 1 only if AFD and PFD both exists and only if AFD<=PFD.
For rest of all the scenarios my calculated keyfigure should return 0 , i.e.,
1.if AFD is blank and PFD is filled
2.if AFD and PFD both is blank.
3.if AFD is filled and PFD is blank.
How to achieve this?
Should I have to write a customer exit variable and incorporate ABAP codes or should I have to write VB macros or can we have a calculated keyfigure with a necessary logic or is there any other way to achieve it.
Please help me out.
Thanks in Advance,
Have a nice day
Regards
SamYou can create a new calculated key figure which calculates the result which looks as follows...
= ((AFD<>0) AND (PFD<>0) AND (AFD<=PFD)) * 1 + 0
Please check the syntax when done. You can refer to the below link for more info abt using IF ELSE operations in calculated keyfigures. Please let me know if you come across any issues.
http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm -
Defining Range values for a keyfigure
Hi Frnds,
I have a keyfigure which is populated at cube level for calculating total years of experience with routine.
In my query it is giving me perfect result. But I want to display the Years of experience between range values. i.e
For eg:
Range | Number of employees
<1 | 10
1-2 | 20
3-5 | 30
I have tried with conditions but it didnt work.
So how can I define ranges for a keyfiger?
Can any body pls give me solution for this.
Thanks,
SridharHi
You can get this by using restricted keyfigure.First you need to have a keyfigure for number of employees on which you can have restricted keyfigure restricting on years of experience.
Regards
Ravi -
If condition in calculated keyfig
Hi All
I have 3 calculated keyfigures in my query
A,B,C
please tell me how to put if condition in calculated keyfig.
example:If A =0 and B=0 then C=0
if not A-B/C*100
Please help me out
how to proceed
thanks
sreelathaDear Latha,
have a look at this Help file example...
http://help.sap.com/saphelp_nw04/helpdata/en/1b/55d979fd5ca54d96fdb605f22b677e/frameset.htm
Conditional Calculations (IF-THEN-ELSE)
You can make conditional calculations using Boolean operators An expression in the form
IF<Logic Expression> THEN <Expression1> ELSE <Expression2> can also be made using a formula in the form
<Logic Expression> * <Expression1> + NOT <Logic Expression> * <Expression2>
Example: IF Actual Costs > Plan Costs THEN Plan Costs + Plan Deviation ELSE Actual Costs
can be written as the following formula:
(Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (NOT (Actual Costs > Plan Costs)) * Actual Costs
or
(Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (Actual Costs <= Plan Costs) * Actual Costs
Hope it helps... -
Currency translation problem for calculated key figure
Hi All
I have a problem with the currency translation for a calculated key figure.
I have a requirement to show the MM consignment stock value in the specified currency from the selection screen.
For consignment stock, there is no value maintained in the system. So for this we need to calculate the value as below
Restricted key figure: RKFConsignment stock: Total stock with special stock indicator restriction "K"
Calculated keyfigure: Consignment stock value = Nodim( RKFConsignment stock) * (Standard cost / price unit).
Here, in the calculated keyfigure properties --> I have used a currency translation for the 0CALMONTH.
The query has selection on the 0calmonth.
But in the result the I am getting unexpected results.
Do we have any inconsistencies in the currency translation on the formulas?
Please help me on this.
Regards
S.RHi All
I have noticed something. I changed my query date selection to Calendar day - Keydate instead of calendar month.
And I have changed the currency variable to fixed exchange rate "CHF", it is working fine.
I think I have some problem with the currency translation variable.
Could anyone of you please send me the currency translation variable for Calendar month with the below parameters
exch rate type : M
Time reference : 0CALMONTH
End of month
Target currency for a variable : < var created on 0currency>
For my report, i need calendar month selection, currency selection.
Please help me with your ideas.
Thank you
Regards
S.R -
Customer Exit Variable in formula to get values for multiple keyfigures
Hi to all,
I have query as defined in following scenario:
CHAR_X C_KF1 (based on KF1) C_KF2 (based on KF2) u2026 C_KFn (based on KFn)
Value1
Value2
u2026
Valuem
C_KF = calculated key figure
I need to create a customer exit variable that will search through selection e.g. CHAR_X/KF1 and give some result. I need this variable for every keyfigure (KF1-KFn). Using customer exit variable is the only solution.
My question is: do I have to create formula variable (customer exit) representing every keyfigure separately (VAR1 u2013 VARn, like in below example)?
CHAR_X C_KF1 (using VAR1) C_KF2 (using VAR2) u2026 C_KFn (using VARn)
Value1
Value2
u2026
Valuem
Or is it possible to create one general formula variable since the way to retrieve the value in variable is always the same (like in below example)? In this case, how do I pass the value of the respective keyfigure to this variable?
CHAR_X C_KF1 (using VAR_X) C_KF2 (using VAR_X) u2026 C_KFn (using VAR_X)
Value1
Value2
u2026
Valuem
Thanks for your replies, points will be awarded!
CheersThat is my concern, the value of variable is not the same.
What variable should do is:
take KF1 id, go through values for CHAR_X, get back one value
This value would always be different, and also "KF" part in code of variable should be different, based on the column where the variable is being used (so, in column C_KF1 ,variable should "pick up" id of KF1, etc.).
I hope it makes it more clear. For now, I do not have the code for variable yet, I am just interested in concept whether it is possible to pass the ID of keyfigure dynamically so I can make decision how to model this request.
Thanks -
Unit of measure for calculation type C must be completed
Hi All
When releasing some contracts in SRM , we are getting the error message as above.
The error message doesn't specify any particular part and the contract has more than 3000 parts.
There are no conditions at header or item level.
There is no Target quantity also. Just a Target value for the contract and prices for individual items are maintained.
We are using extended classic scenario and the contract is manually created in SRM.
I have checked the OSS notes for this error, but they are mostly for contract creation in Bidding and not for a manually created SRM contract.
We checked the UOMs for all the contract parts with the UOMs ( Base and Purchasing) in ECC Material Master and they are OK.
In our scenario , MM changes in ECC are replicated to SRM in real time
Any pointers towards pin pointing the error will be rewarded!
Regards
KedarHi,
We encountered this error message and resolved the problem by applying the following 3 SAP Notes:
a) Note #1022928 - Unit of Measure for Calculation Type C Must Be Completed
(Previously Mentioned)
b) Note #1702484 - Unit of Measure for Calculation Type C Must Be Completed
c) Note #1517648 - Default Conditions Added for Product Category Item Type
Although the contract required is similar to a "Limit" item, but had to be placed for bid, then the RFX PS Item Type was set to "Service" to receive the bid responses. After accepting the bid response, then we created a contract from the bid response. Since it was to be a "Limit" type contract, then we immediately removed the data from the following fields:
Remove the Quantity
Remove the Unit of Measure
Remove the Price
Remove the Price Condition
After removing the values from these fields, then we switched the PS Item Type from "Service" to "Product Category". We added the Guaranteed Minimum and account assignment data to encumber the funds. We were able to "Release" the contract successfully.
Bob Zinsmeister -
User Exit for calculation of inclusive tax scenario in Sales ordercreation
Hi All,
What is the User Exit for calculation of inclusive tax scenario in Sales order creation for pricing procedure.
Regards,
TulasiHi Tulasi
Please check this thread , if your problem is solved with the help of this thread then there is no need to go with the user exit.Just go with the changes in the condition types.
Tax inclusive in base price
Regards
Srinath -
Changing base for calculation of Tax
Hi All,
SAP standard delivers 0001 condition type in Tax calculation procedure as base for calculation of Tax. condition type 0001 picks up 0PR0 as base for calcualtion of tax. Can someone tell me how does system picks up 0PR0 as base for calculation of tax as i have to change the base of calculation.
Any hint would be a great help.I think I had the cart before the horse on this problem. The correct way to look at this is what is the best way to get the correct "Net Book Value" and not the correct tax depreciation posting as it never actually gets booked.
By knowing the incorrect Beginning BV, the rate depreciation is applied in year 1 and finally the desired Net BV value at the end of year 1 for tax purposes I am able to calculate the correct Unplanned Depreciation for tax to make everything work out correctly.
correct beginning tax BV $1,200
Beginning Asset Book Value $1,800
depreciation $360 (20% of BV)
Unplanned depreciation $?
Net BV for tax at end of Yr1 $960 ; or 1,200 - (1,200*.2)
With the know values above that makes my unplanned depreciation for Yr 1 to be $480. Year 1 and all following years depreciate correctly after the Unplanned Depreciation is posted.
I am marking this as resolved unless someone sees an error in my thinking.
Thanks,
Jeff -
The Condition for service price determination incomplete
Dear experts,
I run the System with EC&O Best Practice. Howerver, I can not enter Services on tab Service of Sales Order: Short text of Service, Quantity, UOM, Gross Price. the error "Condition for service price determination incomplete" occours when I press Enter key.
Conditions for service price determination incomplete
Message no. SE477
Diagnosis
Either the calculation schema for services does not exist or the condition types have not been defined correctly.
Procedure
Please check your Customizing settings for service conditions.
If you have not yet defined any conditions for services, you can adopt the standard SAP settings from client 0.
Please help me check this issue on the attached file.
Thank you very much.
Thanks,
Binh Tran
<Personal details shared by OP is removed by Moderator. >
Message was edited by: Jyoti PrakashHi All,
Thank you very much for your inputs.
I checked all the notes, 25357, 27024 and 1383066. Everything is ok in the system. and these notes explained more on the MM part not on the SD- BOS. However, still i am not able to complete the Inquiry, same error exists.
This error is in SD not in MM, while i am creating the inquiry BOS.
If any one come across it and solved it, please let me know.
Regards,
Suresh
Maybe you are looking for
-
Header and Footer in different format
Hi , I am using a single RDF file to generate a report in 4 different formats by giving the destype during rumtime. I am facing a problem regarding the Header and Footer . My requirment is to show the Header and Footer once in HTML (Header on first p
-
Hi all, if I use a box or a grid with my text in smartform, letters are too close to box/grid lines. How can I set a space in my layout? Thank you Massimo
-
Hallo! As Barry Menphill knows well I had problems with an hard disk. DiskWarrior recovered and I backed up (correct?) all my files (by luck!) but I can't see the disk on desktop, DiskWarrior can't install new directories and I can't initialize the d
-
How to sync when you have too much music
I have too much music on my computer to sync onto my IPAD. How do I make lists only and where do I change the settings?
-
Parallel loading in DSO but with sequential start
i have three source DSO A,B,C which is getting loaded to target D. i want the three loading A->D,B->D,C->D to happen in parallel but want A->D to start first then B->D and then C->D. Kindly let me know how to do this in process chain.