Logical calculator
how can i parse and calcualte an expression like " !((a | b) | b & c & !(d) & ((a | !(a) & b)|b) & e) ".
a,b,c,d...... is boolean.
Sorry for my English.
i need your help!
Thank you..
See [url link="http://lts.online.fr/java"]this
It's a mathematical evaluator, but as you have access to the source code (thanks to The-Son LAI ;-) it should give you some ideas
on how to adapt it for logical expressions.
Similar Messages
-
Script Logic - Calculated Members
Hello:
Im trying to build a script member using calculated members:
*WHEN CUENTA
*IS U4000
*ENDWHEN
*COMMIT
U4000 is a calculated member in the account dimension member. I tried using another account, that is not a calculated member and it works.
How can use calculated member in this sintax?
Thanks in advance.
LucianaI would like to mention few things:
1. OLAPLOOKUP it doesn't work anymore into 7.5. James can you double check. My tests is showing that OLAPLOOKUP is not even validate into 7.5
2. Calc_Dummy_Org it is an option to get the values of calculate members
3. It is strange that kind of condition because into script logic you are doing input for base members.
So that condition to test when an account is a an account which is not base member for me doesn't seems to be right.
I can understand if you are looking about the value of that account but not testing if an account it is an account which is not base member.
So if you want to record something with value of your calculate member just use:
*BEGIN
ACCOUNT.#basememberforinput = ACCOUNT.Calculatemember
*END
*COMMIT
Edited by: Sorin Radulescu on Nov 9, 2010 4:04 PM -
Help in implementing date logic calculation
Hello,
We need to implement below logic in our Webi report:
Report Logic: Any Purchase_Order whose delivery (Promised Date) is pending next in 15 days and also any pending deliveries which has not happened beyond 15 days.
Please suggest how the above logic can be implimented at the report level or at the Universe level.
I have tried with below object at the universe level but it is not giving correct results.
case when (sysdate - DWH_SSS_PO_LINE_LOC_DETAILS.PROMISED_DATE>=15) or (DWH_SSS_PO_LINE_LOC_DETAILS.PROMISED_DATE-sysdate<15 ) and DWH_SSS_PO_LINE_LOC_DETAILS.QUANTITY_RECEIVED=0 then 'Y' else 'N' end
It is BOXI3.1 SP7 on Oracle 11g db.
Thank you.
Regards,
Kaustubh GhateHi Kaustubh,
You could use DaysBetween function in WebI.
So the formula would be like the following:-
If (DaysBetween(Currdate;Promise date)<=15) then Purchase Order
And for the second one:-
Pending Deliveries Where (DaysBetween(Promise date;Currdate)<15)
Let me know if the above works.
Regards,
Manpreet -
Performing a specific calculation in a pivot table with BI Publisher 10g
I am using BI Publisher 10g and new on it and I need to integrate a specific calculation measure in a pivot table
The logic uses two measures that already exist in the report (Demand & PAB) and the required calculation is represented by a new measure/row (Calculated). The pivot time is in weeks
Week w0 w1 w2 w3 w4 w5 .....
Demand d(w0) d(w1) d(w2) d(w3) d(w4) d(w5) .....
PAB p(w0) p(w1) p(w2) p(w3) p(w4) p(w5) .....
Calculated c(w0) c(w1) .... .... .... c(w5) .....
If p(w0) < d(w1) --> then c(w0) = p(w0) / d(w1)
If not
If p(w0) < d(w1) + d(w2) --> then c(w0) = p(w0) / ( d(w1) + d(w2) ) * 2
If not
If p(w0) < d(w1) + d(w2) + d(w3) --> then c(w0) = p(w0) / ( (dw1) + d(w2) + d(w3 ) ) * 3
If not
etc .... Same logics apply for c(w1) and so on
Is such calculation logic achievable in Bi Publisher ? If yes, how would you do it ?
Thanks for your time and support on this
Regards, Samir
Edited by: skaroui on 02-Mar-2012 05:50
Edited by: skaroui on 02-Mar-2012 06:02
Edited by: skaroui on 02-Mar-2012 06:12Can you use the logic that you specified in the data model (query) to generate the required data and then use it in the pivot table? That would be the easiest way to do it. Tweaking the code to include the conditional logic/calculated measures is not going to be straightforward..
Thanks,
Bipuser -
Hi
I have to calculate new column(measure2) in pivot table
column1 measure1 measure2 (calculation%)
1 100 (100/100)*100
2 50 (100/50)*100
3 25 100/25 ..
4 10 100/10 ..
5 5 100/5 ..
the numerator is always first row's measure (ex:100 from above table)
Let me know how to achieve this,
ThanksCan you use the logic that you specified in the data model (query) to generate the required data and then use it in the pivot table? That would be the easiest way to do it. Tweaking the code to include the conditional logic/calculated measures is not going to be straightforward..
Thanks,
Bipuser -
Comparing Data in col of 2 tables - with a Calculation
There are 20 records in 2 different tables (A&B). The records pertain to periods between Jan 07 and March 09. There is a business logic that says that all the 15 records which fall between Jan 07 and Dec 08; their amount needs to be changed in Table B. While the amount for remaining 5 records that fall between Jan 09 and March 09 should remain the same. The formulae to be applied for the first 15 records is “amount/.50*0.125” and this result amount should reflect in the new table under the amount column.
Now the task to ensure that the calculation has happened correctly from Table A for those 15 records that fall between Jan 2007 and Dec 2008 in Table B and that the amount is the same for records for period after Jan 2009. I’d only be testing that the new amount after the business logic calculation reflects in the new amount column of Table B.
A sql statement is required for this.
Thanks,
Dushyou might want to give this pseudo code a try
update [2nd table]
set amount = (select t.amount / .50 * 0.125
from (select id, rownum rn, amount
from [1st table]
where period_date between '01-JAN-07' and '31-MAR-09'
order by id) t
where t.rn <= 15
and t.id = [2nd table].id)
where id in (select t.id
from (select id, rownum rn, amount
from [1st table]
where period_date between '01-JAN-07' and '31-MAR-09'
order by id) t
where t.rn <= 15)still it's better if you can post the actual tables, columns, and some sample data -
Script Logic wrong results in migration to BPC 7.5M
Hi Experts,
We have an issue with Script Logic calculation after migration of BPC 7.0M to BPC 7.5M. At the beginning we thought that was the issue mentioned in SAP note 1515973, because we had SP03.
Now we have SP07 and the problems persist. The result of a simply product between two numbers is wrong. For example in the next Default Script Logic:
*WHEN TIME.GROUP
*IS INPUT
*WHEN CATEGORY
*IS <> "ACTUAL","B_ACTUAL"
*WHEN ACCOUNTP
*IS "M_SALES"
*REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_BASIC"),ACCOUNTP="700200")
*REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_PROMO"),ACCOUNTP="700230")
*REC(FACTOR=GET(ACCOUNTP="PRCT_SALES_LIMITED"),ACCOUNTP="700235")
*ENDWHEN
*ENDWHEN
*ENDWHEN
*COMMIT
Input: M_SALES = -195,75933
Input: PRCT_SALES_BASIC = 1
Result: 700200 = -195
Are there some application parameter that defins de presicion of logic calculations?
Some ideas? Thanks in advance.
Best Regards
AlbertHi Jörg,
We changed to a new server with a multi-server architecture 64 bit (BPC Server and DB Server).
Did you have the same problem? How do you resolve it?
Thanks in advance.
Best regards,
Albert -
Hi all,
Is it possible execute a script logic when i execute the import package? i added in the DEFAULT.LGF the code:
WHEN *
is *
REC(Expression=get(account="ccp0001")*get(account="ccq0001"), account="ccv0001")
endwhen
commit
The idea is calculate value = price * quantity and put in a new rec when i load the data.
value =ccv0001
price = ccp0001
quantity = ccq0001
i dont know whats wrong but thats calculate nothing.Unfortunately you really don't exactly know if a scope is exactly right, unless you work out the tuples specific to each calculation and the define independent script calcs for each tuple set. A fancy way of saying, breaking down the calculation to each basic account by all the other dimension members that are to get together in a calculation.
There is a way of testing the script starting in version 7.0SP4 ithink, called the logic debugger. This process actually has you define some form of scope in order to test the calculations as a dry run, but not run based on an import, rather based on your request to run.
There are also various rules used during the logic calculation process, such as the engine will query all Accounts for values in the DB that match your inbound data set, or scope. Category, Time and Entity play an critical role in any caluclation, and the processing of values. And remember that logic that works in default may not look the same as when data is loaded, based onthe sets of data that are used during the passing of inbound detals to the engine for the logic processing.
hope this helps. -
Problem to update data in a Customized table
Hi,
I want to update the internal tables record into a ztable i am using
Loop at itab.
UPDATE ZTABLE
Endloop.
Comit Work.
this program is running fine in Test environment but while i run in some other environment the fields are updated correctly except one field (amt value i get this amt by doing some logical calculation it can be negative sign also) .
I dont know how this was not updated correctly. anyone please give me the suggestion,
If any changes was happened in this environment.
Thanks in Advance
John VictorHi Try
MODIFY ZTABLE.
Jey -
Web ADI Report set, excel is not showing the data for any of the three repo
We are currently working on 11.5.10.2 and moving from Desktop ADI to Web ADI. At the time of publishing report in Web ADI the excel is empty.
AFter successfully running the WEB Adi reportset for Consolidate Balncesheet ( for a period ex: APR-2012), there were 3 reports that were publlished as a set. Then I went to Repository Management and went to the folder and subfolder where I saved all the above 3 reports. When I click on view on one of the reports, the excel spreadsheet opens and try to load something for a while but finally ends up loading nothing.
I am unable to figure out what went wrong. Do you have any idea.
If someone can help me, I really appreciate.
Thanks
UdayHi ,
In u r query what I observed was unit cost*gross profit is Amount Sold. Can u make this calculation with Physical calculation rather than and logical calculation.
See if u have kept logical joins for both the tables with the fact and set the content level at detail level in the content level of fact.
Then it will work
Thanks
S -
Hello All,
Is anybody well versed with formula's in CO-PA Report forms. Im struck in a place, i have three columns X, Y, Z. I have setup a formula like (Z - X) / 1000 * Y. For eg, X= 500, Y=200, Z=900, as per the formula, the output i will get is 80. It works perfectly fine, when all the three columns have values. But suppose if a column doesnt have value it should not work, meaning if column X doesnt have value, for eg, X=0, Y=200, Z=900, as per the formula the output i will get is 180, which is wrong. Is there my any change i can setup in the formula, if column X=0 then the output of the formula should be 0.
Please share you experience in this regards, i am doing all these setup in CO-PA drill down report forms.
Thanks
With Regards
GJHi,
I don't think your requirement could be filled.
Forms could manage mathematical calculations but not the logical calculations.
You can go for ABAP development reports.
Regards,
Murali -
Are there any guidelines on how to customize R/3 reports into BW
Hi Everyone,
I have quite a number of R/3 reports that is required to be converted into a BW report but I do not know what I am supposed to do.
Are there any guidelines on how to determine if a R/3 report should be created in BW? If it should be done in BW, how do I consider if it should be reported of a cube or an ODS?
I have been doing development for ard 3years and this is the first time I have to analyze and come up with a functional/design specs. Need help.
If there is any documents on the guidelines, please send it to [email protected]
Thanks.
Regards,
Shunhui.Hi Shunhui
TABS -> here Venkat was refering to SAP education courses on BW on extraction,reporting etc.
I am not aware if there are any guidelines given by SAP.
I will try to help you build the approrach for this:-
1. You should collect functional specification of R/3 report. This will include the functionality of that report, logic & calculations involved, usage of report output by end users etc.
2. Collect technical specification- In this you create excel sheet with all fields in R/3 report with relevant details such as formulas used, calculations involved etc.
3.Map these technical specs with BW business content. Try to see if you can get Business content datasource which will be a fit for majority of your R/3 report fields.
4.Carry out gap analysis and end of this excerise determine how you are going to fill this gap - whether buy using Zinfoobject,routines,datasource enhancements etc.
5.Classify the reports as Aggregate or transactional level. If it is transactional level then you need to make use of ODS.This will determine your data model in BW.
6.Based on 5 steps mentioned above,create a design document with dataflow & data model details.
7. Get a Sign off on functional,technical specs & design document with proposed dataflow from users and implement it.
For templates of functional & technical specs , you can refer to blueprint section of Accelerated SAP.
Hope this helps
Regards
Pradip -
High Speed Clock Signal Generation Using FPGA Ouput
Hi,
This a screen shot of a LabVIEW FPGA program. Here I am trying to generate 5MHz Clock signal at Connector 0 DIO12. But I get around 2MHz when I measure the signal using an oscilloscope. Would some tell me what’s wrong ?
LabVIEW 2011
FPGA Target : PXI 7841
I set DIO 12 to Nerver Arbitrate in the property setting.
Solved!
Go to Solution.I'm not certain but maybe some of the delay is happening because you are changing the mode of the pin. According to the specs on the card it is capable of having a Maximum Clock Rate of 40MHz under the DIO section. So if you are purely doing digital reads, or digital writes you should be able to update/read 40,000,000 times a second. If you perform a read, which can take up to 1/40M of a second, then invert which takes some time but practically none, then another write which can take up to 1/40M of a second, your loop rate should still be faster than the 10MHz you showed. That's why I suspect there is time involved in changing over the pin from a read mode to a write.
If you try to do something similar with the analog you'll notice the maximum update rate is only 1MHz. So while your logic and code can run at 40MHz you can only update the analog value at 1MHz. Because of this in the past I have had two loops. One running a at the maximum clock rate doing the logic calculations, and then sending the result to another loop that updates the output at the maximum rate which in the case of an analog out is only 1MHz.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously. -
Run Data Package from custom Menu00F9/VBA macro
HI guys,
I have a problem:when creating VBA macro to run Data Package.
I get the pop-up error "400" . This is the VBA code I'm using:
Application.Run "MNU_eDATA_RUNPACKAGE(""Opening""; ""/CPMB/Opening_Balances""; ""Company""; ""Financial Processes"")"
Have you any suggestion for me?
Thanks
Marco UccelloHi Marco,
I'm guessing by prompts you mean user inputs for Entity, Category, Time etc.
These are controlled by the dynamic script associated with the data package.
If you go to the menu eData -> Organise Packages then select a package and go through :
Modify Package -> View Package -> Advanced
You should get to the Data Manager Dynamic Script window.
The following is an example of what should be in here. This is taken directly from the SAP How to Guide "How To Pass Dynamic Parameters to script logic.pdf"
It's the "PROMPT" parts at the start that control the prompts shown to the user (and passed to the data package) :
PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
PROMPT(TEXT,%WS_PERCT%,"Input W/S Percent in decimals",)
PROMPT(TEXT,%EXP_PERCT%,"Input Exp. Percent in decimals",)
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,TAB,%TAB%)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,EQU,%EQU%)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SUSER,%USER%)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPPSET,%APPSET%)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPP,%APP%)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SELECTION,%SELECTION%)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,LOGICFILENAME, INCREASEPERCENTAGE.LGF)
TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,REPLACEPARAM,WS_PERCT%EQU%%WS_PERCT%%TAB%EXP_PERCT%EQU%%EXP
_PERCT%)
If you paste that in exactly it will resolve into the right package information which can be seen one step back (via Modify Package -> View Package).
You can modify the prompts as appropriate for the script you are running - the one above from the how to guide has two inputs for percentages which are used within the associated script logic calculation.
Hope this helps.
Thanks.
Bradley Newcombe. -
Business rules: Account transformation
Hi everyone.
I am trying to populate my cash flow statement using the Account Transformation. E.g For the changes in my inventories: I want the difference between the closing balance of DEC (of the previous year) and the closing balance of the current month.
I thought I could use "Source Period" and "Source Year" in the account transformation. Any idea how they can be used? I want to use a property: u201CPrevious yearu201D to make the time dynamic. Is that possible?
Thanks for your help
EstherI would suggest using the dimension Account library functions and a dimension calculations or script logic calculations to create the value from the cube values, rather than during the data load process.Script Logic might look something like the following:
INCLUDE SYSTEM_CONSTANTS.LGL
*SYSLIB CONSOLIDATION_LIBRARY.LGL
// MOVE INCOME STATEMENT ITEMS TO CASH FLOW STATEMENT
RUNSUMMARIZE(ThisApp,CF_SUMM,%CATEGORY_SET%,%LC_RPT_CURR%)
//CALCULATE BALANCE SHEET MOVEMENTS AND POST TO CASH FLOW STATEMENT
*SELECT(%FROM_ACCOUNT%, "[ID]", "ACCOUNT", "[CF_TO_ACCT] <> ''")
*XDIM_MEMBERSET ACCOUNT = %FROM_ACCOUNT%
*XDIM_ADDMEMBERSET TIME = PRIOR
*XDIM_MEMBERSET RPTCURRENCY=%LC_RPT_CURR%
*WHEN TIME
*IS %TIME_SET%
*REC(ACCOUNT=ACCOUNT.CF_TO_ACCT)
*IS PRIOR
*REC(FACTOR=-1,ACCOUNT=ACCOUNT.CF_TO_ACCT,TIME=NEXT)
*ENDWHEN
*COMMIT
But this will require a few properties on the accounts members to support the calculations. The idea for cash flow is to have the basic values in the accounts, and then provide the calculations to place values into another set of accounts that build the CAshFLow statement. The most difficult part will be dealing with the exceptions, changes to the Cash Flow statement process a customer will need to work with each reporting period. But Script logic generally works the best.
Maybe you are looking for
-
how to use '|' delimited as seprator in GUI_DOWNLOAD ? Plz suggest me ,, i want the output should be seprated by '|' delimited when i download the file.
-
How do I resolve CS6 issues on Mac Yosemite 10.10.2?
An error message on an open file from Indesign said it had lost data connection. Indesign crashed, and so did my whole computer -Macbook pro 10.10.2. Had to get data recovery service to recover my HD contents, but all open INDD files during crash we
-
Nokia lumia 710 update to 7.8
sir.. still there is no 7.8 update for my lumia 710 on zune..when ever i check it shows your phone is uptodate 7.10..
-
I need help writing a HI-Low program where the computer chooses a number and the user has to guess, I'm not sure how to get the computer to choose its own number
-
Thunderbird doesn't pick up mail from Cox server
I just reinstalled Thunderbird after my computer (Windows 7) was wiped. I backed it up first, and I can see my email and address book. I can send mail, but I can't receive it, although I can see mail in my webmail at Cox. Thanks in advance. (It's pos