Compute total based on separate iterator bindings
I have two view objects which are each producing a single value exposed on a page. I want to add those two values together to show the total. The values are exposed on the page with the following EL expressions:
<af:outputText value="#{bindings.SumAmount1.inputValue}" id="ot36">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.SumAmount1.format}"/>
</af:outputText>
<af:outputText value="#{bindings.SumAmount2.inputValue}"
id="ot38">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.SumAmount2.format}"/>
</af:outputText>
I want to show the total as the addition of the SumAmount1 and SumAmount2 values.
Doing the following only works when there is no format type:
<af:outputText id="totalAmount"
value="#{bindings.SumAmount1.inputValue.value + bindings.SumAmount2.inputValue.value}"/>
How can I easily achieve what I want while still using a control hints -> format type on the attributes?
Thanks,
Stephen
Edited by: 910447 on Jul 11, 2012 8:30 AM
Surendranath Kumar wrote:
Try this.
<af:outputText id="totalAmount" value="#{bindings.SumAmount1.inputValue.value} + #{ bindings.SumAmount2.inputValue.value}"/>That won't work. That statement prints out a literal "+". To do arithmatic operations it needs to all be in the same expression #{}.
There is something I am not getting about EL expressions and type conversion. Without any sort of convertNumber format the values are being used as Numbers like I want, but once I apply a convertNumber format to them the inputValue property seems to come back as a String. I tried putting a convertNumber on the outputText where I'm generating the total, but I wind up getting a NumberFormatException:
<RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
java.lang.NumberFormatException: For input string: "-23,692"
Similar Messages
-
Can not compute totals on a column based on a summary column
Hi. I'm new in Discoverer.
I have created a worksheet based on the following query:
SELECT O101158.COD_HACIENDA, O101158.NOMBRE, O101266.DESC_UNIDAD, SUM(( NVL(O101501.PESO_NETO,0)/1000 ))
FROM ASISTEN.SAT_HACIENDAS O101158, ASISTEN.SAT_UNIDADES O101266, ROMANA."BOLETO_CA#A" O101501
WHERE ( ( O101158.COD_UNIDAD_OPER = O101266.COD_UNIDAD ) AND ( O101501.COD_HACIENDA = O101158.COD_HACIENDA ) ) AND ( O101501.ZAFRA = '2004-2005' )
GROUP BY O101158.COD_HACIENDA, O101158.NOMBRE, O101266.DESC_UNIDAD
ORDER BY O101266.DESC_UNIDAD ASC
The expression SUM(( NVL(O101501.PESO_NETO,0)/1000 )) is defined in Discoverer as a calculated item.
I have created a total on the sum expression. The idea is to have it compute at the "DESC_UNIDAD".
The problem is that only the label "Sum" is printed at the right level. No total is calculated.
Is this a restriction on totals based on aggregation or am i missing somthing here?
Best regards, Luis ...!Hi Luis
There have been a number of questions concerning summations of totals in recent weeks.
Take a look at these threads:
Cell sum not working
Calculation shows Blank or NULL in Discoverer Viewer but not in Dis.Desktop
Do either of these help?
Best wishes
Michael -
After watching Youtube content often in HD full screen on pressing the icon to minimise the computer totally locks up totally unresponsive.
Doing the same in Chrome has no issues.I'd still prefer to keep separate user accounts. I never had any issues like this before. The only time I started having a problem was when I was just trying to force empty the trash a few months ago. I came on here looking for a solution and someone posted a way to empty the trash using the terminal. Before then, I hadn't used the terminal for anything--it was just another app in my utilities folder. (None of this has anything to do with having separate user accounts. Plenty of people with kids make second and third user accounts on their laptops so that multiple people can use one laptop, having more than one user on a laptop is not very difficult.) But thank you, I'll try that out and see if it works!
-
My wife and I share a computer, but we have separate Facebook accounts. How do we get iPhoto to share photos with a second Facebook account?
iPhoto -> Preferences -> Accounts. Add a second ccount for hers. Log out of one to use the other.
Regards
TD -
Problem in displaying totals based on the Unit of measurement.
Hi,
I have Problem in displaying totals based on the Unit of measurement.
I want to display the total in the output of the alv based on the unit of measurement. for example i have three fields in the output namely
Matnr Quantity UOM
51 10 EA
61 10 KG
71 10 KG
In the total i should get
10 EA
20 KG
Can anyone tell me how to do this?
The basic req is the exclude the qty with unit EA(each) in the totals.
Thanks,
AmitH i,
you can use the collect statement
to get the proper result
loop at itab. ( all the records)
move all the fields from itab to another
collect itab1.
write: itab1-fields, itab1-fields.
endloop.
this will solve your problem
reward points if helpful,
thanks & regards,
venkatesh -
Totals Based on Multiple Criteria in Repeating Rows
Hi All,
I have 3 dropdowns (DD1, DD2, DD3) and one textfield (TF1) in repeating rows (not in a table). Each dropdown has two choices and the textfield is free-form. Outside of the rows (in a different subform) I want totals based on multiple criteria from the dropdowns and textfields.
The following script works great to get a total number of one choice from one dropdown.
this.rawValue = xfa.resolveNodes('form1.Form.row[*].DD1.[$.rawValue == "2"]').length;
Problem is how do I calculate the totals for the following based on the criteria listed in each row.
Find the totals for ML
Number of New Forms 1-2 Pages: (result should be 2)
Number of New Forms 3+ Pages: (result should be 1)
Number of Revised Form: (result should be 0)
In row #1: select “New” as a choice from DD1, “Form” as choice from DD2, “ML” as a choice from DD3 and enter “5” in TF1.
In row #2: select “New” as a choice from DD1, “Form” as choice from DD2 , “ML” as a choice from DD3 and enter “1” in TF1.
In row #3: select “New” as a choice from DD1, “Form” as choice from DD2, “ML” as a choice from DD3 and enter “2” in TF1.
In row #4: select “Revised” as a choice from DD1, “Series” as choice from DD2, “ML” as a choice from DD3 and enter “1” in TF1.
In row #5: select “New” as a choice from DD1, “Form” as choice from DD2, “PM” as a choice from DD3 and enter “1” in TF1.Try something like;
var mlNewForms1or2Pages = 0;
var mlNewFormsOver3Pages = 0;
var mlRevisedForms = 0;
var rows = xfa.resolveNodes('form1.Form.row[*]');
for (var i = 0, limit = rows.length; i < limit; i++)
var currentRow = rows.item(i);
if (currentRow.DD1.rawValue == "1") // new
if (currentRow.DD2.rawValue == "1") // form
if (currentRow.DD3.rawValue == "1") // ML
if (parseInt(currentRow.TF1.rawValue, 10) > 2)
mlNewFormsOver3Pages++;
else
mlNewForms1or2Pages++;
else // revised
if (currentRow.DD2.rawValue == "1") // form
if (currentRow.DD3.rawValue == "1") // ML
mlRevisedForms++
console.println(mlNewForms1or2Pages);
console.println(mlNewFormsOver3Pages);
console.println(mlRevisedForms);
To do the same using predicates you could do;
var mlNewForms1or2Pages = 0;
var mlNewFormsOver3Pages = 0;
var mlRevisedForms = 0;
mlNewForms1or2Pages = xfa.resolveNodes('form1.Form.row.[DD1 == 1 and DD2 == 1 and DD3 == 1 and TF1 <= 2]').length;
mlNewFormsOver3Pages = xfa.resolveNodes('form1.Form.row.[DD1 == 1 and DD2 == 1 and DD3 == 1 and TF1 > 2]').length;
mlRevisedForms = xfa.resolveNodes('form1.Form.row.[DD1 == 2 and DD2 == 1 and DD3 == 1]').length;
But if you wanted totals for all the permutations then this could become slow.
Regards
Bruce -
Get transactional currency total based on currency type
hi,
i have created a custom report related to fi which is working fine.
but now the issue is in that report we r having a transaction currency field WRBTR.the users want to calculate totals based on currency.
for example my output is
tran curr curr type
500 inr
600 inr
400 inr
200 usd
500 usd
400 usd
so now the totals shld be calculated based on currncy wise.
i.e we need to get 2 lines in total
1500 inr
1100 usd
Any suggestions in this issue will be helpful.Hi,
Try to fill Field cataloue in the following manner .
then it will summ automatically based on Currency.
lfs_fieldcat-fieldname = 'AMOUNT'.
lfs_fieldcat-tabname = text-022.
lfs_fieldcat-CFIELDNAME = 'CURRENCY'.
lfs_fieldcat-col_pos = '1'.
APPEND lfs_fieldcat TO t_fieldcat.
lfs_fieldcat-fieldname = 'CURRENCY'.
lfs_fieldcat-tabname = text-022.
lfs_fieldcat-col_pos = '2'.
APPEND lfs_fieldcat TO t_fieldcat.
Regards.
Eshwar. -
Posting 'Total-Based Invoice Reduction' in MIRO
Hi,
You can use post invoices containing variances using :
u2022 Total-Based Invoice Reduction
u2022 Total-Based Acceptance
'Total-Based Acceptance' can be posted by selecting 'Edit --> Accept difference and post' on MIRO screen.
But how can I post the 'Total-Based Invoice Reduction' on MIRO screen.Hi Kapil,
Follow below steps,
at the item level:
In the Correctn ID field, choose Vendor Error: Reduce Invoice.
The system opens the Invoice Amount Acc. to Vendor field for input.
In the Invoice Amount Acc. to Vendor field, enter the amount as listed by the vendor, which is higher than the value the system displays.
Choose Enter and finish entering the invoice as usual.
Thanks and regards
Kedar -
Hi,
I have a column called record type and I would like to sub-total based on
selected rows from the record type at the bottom. how do I do it ?
for ex:
rtype load
s - 100
b - 150
r - 200
z - 10
total load1 b+r - 350
total load2 b+z - 160
------------------------------------------You can use calculations in pivot tables to operate with distinct values of a column. You can create a new column (or row) as 'b' + 'r' record types. You can select wether to see original and total columns or only totals.
See 'Examples of Calculations in Oracle BI Pivot Tables' section in "Oracle® Business Intelligence Answers, Delivers, and Interactive Dashboards User Guide" document. -
Move two iTunes accounts onto one computer and keep them separate?
I recently got a new mac os x lion and I need to put my families iTunes library on it. the problem is that one separate account is on a computer, and the other separate account is on an external hard drive. I need both different accounts on one computer and continue to be separate. Im hoping to be able to log in and out of my own account without disturbing the other one. Thanks in advance for the help!
Why don't you create a username (at OS level) for each one of the users? You can then import the contents of each one of the accounts you mention into the appropriate iTunes.
Jorge... -
How to show/hide total based on selected column in column selector
Hello,
Is there a way to show/hide the total based on what column is selected in the column selector? Or alternatively to hide the total based on the column selected? I'm using OBIEE 10g.
Basically, I have a pivot table with a handful of row variables and one measure. Then I allow the user to select the column variable. The default is to have nothing, which I have achieved using the hidden/dummy column trick (Re: How to add new columns by using Multiselect However, if my pivot table is set to have a total, I now get 2 columns that are the same. When the user selects any other choice (e.g. gender), I would want to see Male, Female and the total. Something like this:
Default:
Count
East 10
West 20
Total 30
Gender:
Male Female Total
Count Count Count
East 6 4 10
West 14 6 20
Total 20 10 30
Any thoughts?
Thanks!I recommend using view selector instead of column selector
-
Can evgts be used to pull a total based on a property value?
can evgts be used to pull a total based on a property value?
for example evgts(act,cc,pc,,time,acct.property='PPE")Hi Steven,
I assume you want to "EVGTS" the total value af accounts whose property is "PPE". This is not possible as any retrieval requires value readily available from the cube.
In such case you may need to use dimension formula (calculated account) to roll up data based on property. Quick and dirty option is to fetch the data with EVDRE (can only be used with small quantities of data) and summarize on the worksheet.
Hope this helps,
Madis -
Computer Totally Cannot be Power On
Hi hi to everyone,
Recently, i have replace some part of my PC. The parts replaced are 1GB(2 X 512MB)ram, new DVD-Rom and a new harddisk.
After connecting all the new parts, i power on the computer and everything run smoothly on the first run. Then, i switch off the computer to screw back the casing. When i tried to on it back, the whole computer totally cannot be power on as in totally no power even the power supply fan is not moving. Then, i tried troubleshooting the power supply and found that the power supply fan is running in stand-alone mode. Please advise on what to do...
My Computer Specification as follow:
1) Power Supply: Antec SmartPower 350W
+5V : Max - 35A Min - 1.5A
+12V : Max - 16A Min - 0.8A
+3.3V: Max - 28A Min - 0.5A
-5V : Max - 0.5A Min - 0A
-12V : Max - 0.8A Min - 0A
+5V SB : Max - 2A Min - 0A
2) Motherboard: MSI 865PE NEO2-S
3) CPU: Intel Pentium 4 2.6GHz
4) RAM: GEIL DDR400 1GB(2 X 512MB) CL2.5
5) VGA: MSI FX-5200 128MB 8X-AGP
6) Hard-Disk:
a) Seagate 7200rpm 160GB Hard-Disk
b) Hitachi 7200rpm 60GB Hard-Disk
7) Drive
a) LG 16X/52X DVD-Rom
b) Creative 24X/10X/40X CD-RW
8) 4 External Casing Fan
Thanks a million for any advice....Quote from: Carpe_Diem on 06-May-07, 00:06:38
Hi hi,
Firstly, thanks for the advice.... and sorry for my stupid question.
You suggest a new psu but it is basically working fine until the recent upgarde....
Thanks
"You suggest a new psu but it is basically working fine until the recent upgarde...."
stats of that PSU are too weak. it can't be not enough to handle the changes, or it can be just damaged.
try with better one with high amperes on +12V.
other possibilities due memory failure or underpowered sticks. try but back your old memory. -
Compute total on a field based on change in values in 2 other fields
I have the following requirement
ITAB has fields
PO# PO_LINE# ............ PRICE
100 1 500
100 2 100
200 1 300
300 1 200
300 2 700
300 3 100
and my required output in ALV is
PO# PO_LINE# ............ PRICE
100 1 500
100 2 100
Total 600
200 1 300
Total 300
300 1 200
300 2 700
300 3 100
Total 1000
i want to compute the total price for each PO#.
Can someone please suggest how ?
Thank u so much.Hello Asha,
It appears that you are looking for the subtotal functionality that is built into ALV. The "sort" table that is accepted by the ALV FM has a field named "subtot" that can be used to flag a field for subtotals. In your case you would flag the PO# field for subtotals.
A bare bones example of entering this information can be seen in the following:
" Fill out the field catalog, layout, etc.
" Now we will populate the sort information
ls_sort-fieldname = 'PONUMBER'.
ls_sort-up = 'X'.
ls_sort-subtot = 'X'. "This is the field that will allow subtotals
APPEND ls_sort TO gt_sort.
" Call the the display ALV FM
Now this comes with a number of conditions:
1. For simple cases, the field you want to subtotal over must be the left-most column. In your example it looks like you meet this requirement as PO# is the first column.
2. You also need to make sure that there is a column that allows totals. In your example you need to make sure price has the proper data type to allow for totals.
If you are still having trouble, I would recommend looking at the following code example: [Display subtotal text in ALV grid|http://wiki.sdn.sap.com/wiki/display/Snippets/DisplaysubtotaltextinALV+grid]. It contains a more complete example of how to use subtotals in ALV. -
My wife and I have our own Apple IDs, iphones, and separate itunes libraries. I'm trying to figure out whether we can share our libraries with each others iphones? Thanks in advance for any suggestions and insight.
Hi there,
First..I am new to this forum and find the information provided to be very helpful... I had followed the iTunes link above to enable sharing between users in the same computer but it appears to be working on partially. What setup am I looking for ?
1. We have an iMac (Snow Leopard) with 1 Adult ID and 2 children IDs
2. The iTunes music folder is stored in a Shared public folder where the Adult ID has read/write access and the 2 kids with read-only access (so that they don't accidently delete songs...:-)
3. The iTunes on the Adult ID has the access to purchase songs. The kids have no acccess to buy songs
4. All songs, podcasts to be visible to all users
What has happened ?
1. I am able to make the base of songs visible to all users
2. However when a song is purchased by the adult account ..it is not visible to the kids account ..:-{
3. The same thing occurs when a song is imported from a CD
4. When a new playlist is created by the Adult account it is not visible to the kids account ..:-(
How can I make changes made by the Adult be made visible to the kids without having the need to constant add music files or libraries for each kid..?
Thanks in advance..
Maybe you are looking for
-
Drilldown in BeX Query Designer
Hello, I am new in SAP. I am having problem creating Drill down. I have this report where all the data is Transactional data. So I haven't created any Master Data. So I won't be able to use Navigational Attribute for Drill down purpose and I don't wa
-
Hi any body have information regarding up gradation of BW-BPS to BI-IP
Hi any body have information regarding up gradation of BW-BPS to BI-IP, i need the procedure how to upgrade if any body explain thank full....... Vinay Edited by: vinay kumar on Aug 13, 2008 8:26 AM
-
Transfer of Assets one unit to another unit
Transfer of Assets one unit to another unit - Excise Invoice is required for the same, Excise Invoice Series, reversal of CENVAT and again credit of CENVAT by receiving unit*
-
Oracle Jive Forum Viewer Portlet problem in Firefox
Has anyone used the Oracle-provided JIVE Forum Viewer portlet? We have built one with the personalization function enabled, so users can go to the personalize page to select the forum they want to view in the portlet. Everything works fine now, excep
-
Can't download photoshop cc on my macbook
I'm unable to download the new cc on my macbook and can't figure out why...help!!!