Matrix - Total of column amount
Hi friends!
In some forms we can find a matrix where a total sum of the amounts of a column is displayed below the matrix under this column.
As an example we can see this in form Production/Bill of Materials where the sum of all amounts in column 'Total' is displayed below the matrix.
In this example each cell of column has the system information form=672, item=3, column=5, row=xx, where form=672 is the Bill of Materials-form and item=3 is the matrix of this form.
The sum of column 'Total' displayed below the matrix also has the system information form=672, item=3. Does this mean that thi sum is part of the matrix-object? In the UI object reference I couldn't find any property or method to access such a total-value.
And how can I read/write this value?
Many thanks in advance for helpful hints to this question!
Frank Romeni
Hi Frank Romeni,
I don't think we have an object for "Total" in the UI API.
I also came across the same problem, which I solved as following:
1) Create a Text box, and make it disabled.
2) Whenever matrix is resized:
(Catch the form resize event)
Calculate the position of your column. I guess there is no straightforward property and you need to calculate it by adding the width of all the previous columns.
For e.g, if you want to display the total of Column n:
Text1.Left = (matrix.left + column1.width + column2.width +...column(n-1).width)
3) Load the value of Total text box by sum of all the values in that column (Dont add values in the UI, try to use SQL => Select sum(columnN) from Tbl1,..)
Hope it helps.
Post in case you got any straightforward solution:)
Regards,
-Geetha
Similar Messages
-
SSRS 2008, have this report
Qty Column --------- Est cost column ----- Mark up Cost Column - Did add Total cost column
4 pcs- $ 2000.00 --------------$ 50.00 --------------- $ 2050.00
Avg Cost
$2050/4= 512.50
how to write this exp to get value $ 512.50
what I did , its not giving me correct result,
=Sum(Fields!estCOSTAMOUNT.Value+Fields!COSTMARKUP.Value)/(Fields!QTY.Value)
can some one please advise what I am doing wrong.
thanks in advanceI tried both exp, did not work
may be I was not clear in the question
Qty Column --------- Est cost column ----- Mark up Cost Column - Did add Total cost column
4 pcs- $ 2000.00 --------------$ 50.00 --------------- $ 2050.00
2 pcs ------------------$ 1500.00 --------------=$100.00 ----------------$1600.00
Total qty 6 pcs-----$ 3500.00------------------$150.00---------------$ 3650.00
Avg Cost
$3650..00/6= 608.33
my field name
=Sum(Fields!COSTAMOUNT.Value) + want to add cost amount and Mark up and divide with qty total
=Sum(Fields!COSTMARKUP.Value)
=Sum(Fields!QTY.Value)
please help how can I write it to get the result -
Webdynpro ABAP - ALV how can i display Total of Column
Hi friends,
Webdynpro ABAP - ALV how can i display Total of Columns.
Please tell me any metod is there or any solution.
Thanks,
Kumar.Hi
You can take help of following code snippet to create totals for a particular column
Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_column TYPE REF TO cl_salv_wd_column,
lt_column type salv_wd_t_column_ref,
ls_column type salv_wd_s_column_ref.
Data: lr_field_amnt type REF TO CL_SALV_WD_FIELD.
* get reference of ALV component
lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
* get function settings
lr_function_settings ?= wd_this->alv_config_table.
* display columns in correct order
lr_column_settings ?= wd_this->alv_config_table.
lt_column = lr_column_settings->get_columns( ).
loop at lt_column into ls_column.
CASE ls_column-id.
when 'AMOUNT'
* aggregate field
CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
EXPORTING
FIELDNAME = 'AMOUNT'
RECEIVING
VALUE = lr_field_amnt.
* create aggregate rule as total
CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
EXPORTING
AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
RECEIVING
VALUE = lv_aggr_rule.
endcase.
Regards
Manas DUa -
HOW TO GET TOTAL BEFORE DISCOUNT AMOUNT IN MARKETING DOCUMNET
HI.
I need one requirement in this,
i need to capture the Total before discount amount at A/R invoice.
i checked in tables Discount and Discount amount will be come below Total before Discount amount
but Total Before Discount Amount i am not able to get it from the Database.
Any information plz Update me.Hi Srinivas,
As already answered by Seniors that you have to apply Formula to get Total before Discount. Please check below
Total Before Discount = ( DocTotal + DiscSum - VatSum )
If you want to put FMS then please try below FMS for Header Level
SELECT ( $[OINV.DocTotal] + $[OINV.DiscSum] - $[OINV.VatSum] )
Hope this helps
Regards::::
Atul Chakraborty -
How to display total "items" and "amount " in header.jsp in CRM ISA B2B
Hi,
I am modifying header.jsp in standard CRM ISA B2B application. Here we have summary of total number of items and total amount but it is coming in to button and for that below code is there in header.jsp and it display it as button text.
if (!ui.homActivated) { %>
!!" alt="" border="0" height="16" width="20">
</td>
<td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.minibasket.default"/>" >
<form name="basketForm" action="javascript:show_basket();">
<input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.minibasket.default"/>"/>
</form>
</td>
<% } else { %>
<!-- HOM scenario - minibasket displays collective order -->
<td class="vertical-align-middle" align="right">
!!" alt="" border="0" height="16" width="20">
</td>
<td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.collorder.default"/>">
<form name="basketForm" action="javascript:show_collective_order();">
<input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.collorder.default"/>"/>
</form>
</td>
<% } %>
Now I want to display total number of items and total amount separately in two different <td> element.
How I can get total number of items and total amount in header.jsp I tried below code but did not get any success.
Insert below line in header.jsp with respective page import statement for class or let me know which class I have to import.
<%
HeaderSalesDocument hdr =
(HeaderSalesDocument) request.getAttribute(MaintainBasketBaseAction.RK_HEADER);
ItemList items =
(ItemList) request.getAttribute(MaintainBasketBaseAction.RK_ITEMS);
%>
And then I use
<td><%= hdr.getNetValue() %></td>
<td><%= items.size() %></td>
But it is not printing any thing and header page not display at all.
Pl. tell me how to get total amount and number of items in header area. Which class or object I have to use here.
I really appreciated any help from any one.
Thanks and regards.
Ashish Patel.Hi, I tried another logic. I took value from Standard button, in which B2B application display total items and amount and I hide this field, to another text element.
Now I Am breaking that value in words and stored them in array and then trying to display that array with particular number which contains total item and amount through Java Script on Focus.
But problem here is, It is not getting updated automatically I have to click on new text files to trigger Onfocus event. How I can achieve effect like as soon as Standard button changes it's value which is now hidden filed my new text box should update automatically.
Thanks.
Ashish -
Purchase order history : hide column 'Amount'
Hi,
On purchase order history, i want hide column 'Amount'.
This column must be always hide.
Have you a solution for this ???
Regards.Hi,
Check User Role , and then remove the authorization for Activity "09" or open purchase order history and then hidden the price by using layout option anf then from manage layout ,set the layout as in "Default"
User can able to change this layout ,then restrict all users with below mentioned authorization control.
Object to control layout for specific user as follows
Object-'S_ALV_LAYO' and 'ACTVT' -23.
Hope this will resolve your query.
Regards,
Sandesh Sawant -
HT204088 How to know the rest of money in a credit card and the total of purchase amount?
How to know the rest of money in a credit card and the total of purchase amount?
What do you mean 'the rest of money in a credit card' ? All you can see on your purchase history is what you've bought, you can't see how things were billed nor the total amount that you've spent in the store - you will need to sum your purchases yourself to see the total.
-
Formatting the total row column for a OATableBean
Hi,
I have an OATableBean with total row column.
I need to format one column and it's total value as 28,861.972528.
I used both codes below:
1-
Formatter formatter = new OADecimalValidater("###,###,##0.00000;-###,###,##0.00000", "###,###,##0.00000;-###,###,##0.00000");
OAMessageStyledTextBean unitBean = (OAMessageStyledTextBean)webBean.findChildRecursive("UnitLandedCost");
if(unitBean != null)
unitBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
2-
DictionaryData unitBeanFormat = (oracle.cabo.ui.data.DictionaryData)tableColumnFormats.getItem(pageContext.findChildIndex(tableBean, "UnitLandedCost"));
f(unitBeanFormat != null)
unitBeanFormat.put(ON_SUBMIT_VALIDATER_ATTR, formatter);
Both codes worked for the values, but the total value was not formatted in both cases. I tried to use the code below to get the column Footer, but the tableFooterBean is null:
OATableFooterBean tableFooterBean = (OATableFooterBean)tableBean.getColumnFooter();
Is there anything else that should be done to format the total value?
Thanks and Regards,
AndreaAs Tapash mentioned getTotalValues method will work. Another option can be to calculate the total value based on the rows of VO but that won't be required unless you are looking for Grand Total functionality.
--Shiv -
I am looking to see if anyone has figured out, from their iPad in Numbers how to calculate percentages or sums totalling other columns or rows?
The issue is I bought the G4 from my buddy a few months ago... the machine has been abused to say the least, both inside and out. It is almost falling apart and has a BUNCH of programs loaded on it. I have always used a PC and am still familiarizing myself with Macs, I need to clean out the machine and dump all the excess applications and files that are causing problems.
I think this is why I am having some trouble. Sometimes it works just fine, but I am only working with a few simultaneous tracks at a time. I am using the virtual instruments at this time but will be running guitars and bass through an external sound card soon. Similar to what you are doing it sounds like.
Anyway, wanted to give you some more insight. Last night it seemed to work alright, I am not going to rush into buying anything until I absolutely have to but want to get some direction as far as what I should be looking at.
Any further input is appreciated, thanks. -
Grands totals for % Columns coming incorrect in pivot view .
Hello ,
I have the below scenario . Iam trying to get the calculated grand total for % column . I tired several ways ...like report aggregates enabled in instanceconfig,tried creating cal colum using physical columns as well as logical columns in RPD , changing the aggregation rule. The row wise values (%) are coming correct but iam unable to get correct % grand total (36.8%) instead iam just getting the sum of the % total ( 83.3%) . I have tried the above options in my previous reports and those conditions work perfectly right but for this report they are not able to . kindly please let me know if anybody has a solution for this issue .
Department ...USD CAD Variance (USD/CAD)*100
XYZ 10 20 50%
ABC 25 75 33.3%
Total 35 95 36.8% ( 35/95)
Thanks
KarthikJust to cross check
Do you have following tag in your instanceconfig file ? if its not there then you may encounter grand total incorrect calculations.
<ReportAggregateEnabled>true</ReportAggregateEnabled> -
I want to make matrix with combobox column, it is not dificulte, but did somebody know is it posible with different values in each cell?
first row ( 0, Zero ), ( 1, One )
second row ( 0, Zero ), (2, Two ), (6, Six)
third row ( 0, Zero), (1, One )
.... ( Value, Description )
I make something but all cell's have the same set of pair (Value, Description )
P.S. Sorry for my englishHi Andy,
I have been playing around with this for a while now and (seeing that Ibai actually already gave you a solution) I'm just gonna post where I am up to now. I have a matrix with two columns on it (c_1 and c_2). c_1 holds the value 1, 2 or 3. Whenever the user clicks on c_2 I repopulate the combo box according to the value selected in c_1. The only problem is that it shows the second last selected row and not the one that is currently selected. I am just posting it here so it can maybe someday put someone onto the right track.
If pVal.FormTypeEx = "MainForm" Then
If pVal.ItemUID = "m_List" Then 'Matrix
If pVal.ColUID = "c_2" Then 'Column 2
If pVal.BeforeAction = False Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_GOT_FOCUS Then
Dim oForm As SAPbouiCOM.Form
Dim oEdit As SAPbouiCOM.EditText
Dim oCombo As SAPbouiCOM.ComboBox
Dim oMatrix As SAPbouiCOM.Matrix
Dim oCol As SAPbouiCOM.Column
Dim i As Integer
oForm = oApplication.Forms.ActiveForm
oMatrix = oForm.Items.Item("m_List").Specific
oCol = oMatrix.Columns.Item("c_1")
oEdit = oCol.Cells.Item(pVal.Row).Specific
oCol = oMatrix.Columns.Item("c_2")
oCombo = oCol.Cells.Item(pVal.Row).Specific
For i = oCombo.ValidValues.Count - 1 To 0 Step -1
oCombo.ValidValues.Remove(i, SAPbouiCOM.BoSearchKey.psk_Index)
Next
If oEdit.Value = "1" Then
oCombo.ValidValues.Add("1", "One")
ElseIf oEdit.Value = "2" Then
oCombo.ValidValues.Add("2", "Two")
oCombo.ValidValues.Add("22", "TwoTwo")
ElseIf oEdit.Value = "3" Then
oCombo.ValidValues.Add("3", "Three")
oCombo.ValidValues.Add("33", "ThreeThree")
oCombo.ValidValues.Add("333", "ThreeThreeThree")
End If
End If
End If
End If
End If
End If
Hope it helps,
Adele
PS: Ibai, why do you have a new user name? You are the same Ibai Peña right? -
In scripts i want to display the total puchage order amount in text format
Hi to all,
Here my requirement is to display puchage order number,date,amount for individual order and total purchage order amount in same window in decimal format and i want to display this purchage order total amount in text format in another window ,is it possible or not
please give solution asap urgent.
regards,
surya.Hi Surya
It is possible ....jst call the routine in script..
/:PERFORM SPELL_AMOUNT IN PROGRAM ZXYZ
/:USING ®UD-SWNES&
/:USING ®UD-WAERS&
/:CHANGING &WORDS&
/:CHANGING &DECIMAL&
/:CHANGING &WAERS&
/:ENDPERFORM
P1 <C1>&WORDS& AND &DECIMAL&
....and write the code in tht routine program....
data: it_spell like spell.
data: swnes type regud-swnes,
waers type regud-waers,
var1(20) type c,
var2(20) type c.
*& form spell_amount
text
-->input text
-->output text
form SPELL_AMOUNT tables input structure itcsy
output structure itcsy.
read table input index 1.
input = swnes.
replace all occurrences of '*' in input-value with space.
shift input-value left deleting leading space.
translate input-value using ', '.
condense input-value no-gaps.
split input-value at '.' into var1 var2.
condense: var1, var2.
swnes = input-value.
read table input index 2.
waers = input-value.
call function 'SPELL_AMOUNT'
exporting
amount = swnes
currency = waers
filler = ' '
language = sy-langu
importing
in_words = it_spell
exceptions
not_found = 1
too_large = 2
others = 3
if sy-subrc eq 0.
refresh: output.
output-name = 'WORDS'.
condense waers.
case waers.
when 'USD'.
concatenate it_spell-word 'DOLLARS' into
it_spell-word separated by space.
when 'EUR'.
concatenate it_spell-word '' into
it_spell-word separated by space.
concatenate var2 'euros' into var2 separated by space.
when others.
endcase.
output-value = it_spell-word.
append output.
output-name = 'WAERS'.
output-value = waers.
append output.
condense waers.
case waers.
when 'USD'.
concatenate var2 'CENTS***' into var2 separated by space.
when 'EUR'.
concatenate var2 'EUROS' into var2 separated by space.
when others.
endcase.
output-name = 'DECIMAL'.
output-value = var2.
append output.
endif.
endform. "spell_amount
this will give output as TEN DOLLARS & 20 CENTS....
u can change the code as per ur requrement...
Reward if Helpful....
thnx
Rohit -
CurrencyFormatter and grand total of column
Hey everyone,
I think I have have two bug’s or arror in my code, with the folowing application
The grand total of column Cost does not execute with creationComplete but I have to call it throu the button
And whean I clik in a row of Cost column and clik away the amound gets two extra digits, it has to do with precision="2" of the CurrencyFormatter dut how do I keep the format and not the dug.
Thanks in advance,
Dimitris Orlandos.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="loadData()" styleName="plain" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="376" xmlns:ordersopenservice="services.ordersopenservice.*">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.controls.Alert;
import mx.collections.ArrayCollection;
private function loadData():void
calculateTotalColumn();
initApp();
private function initApp():void
dataGrid.dataProvider = new ArrayCollection([
{Type:'Normal', Desc:'Normal 20/20', Cost:0},
{Type:'None', Desc:'Player has no optical receptors', Cost:-2},
{Type:'Enhanced', Desc:'Enhanced Vision', Cost:5},
{Type:'Infrared', Desc:'Player can see heat sources', Cost:5}
public function formatPrice(item:Object, column:DataGridColumn):String
var returnValue:String = setCurrencyFormat.format(item.Cost);
return returnValue;
[Bindable]
private var totalColumn:Number = 0;
private function calculateTotalColumn():void
for each (var row:Object in dataGrid.dataProvider)
totalColumn += Number(row.Cost);
]]>
</mx:Script>
<mx:CurrencyFormatter id="setCurrencyFormat" precision="2" rounding="none" decimalSeparatorTo=","
thousandsSeparatorTo="." useThousandsSeparator="true" useNegativeSign="true" currencySymbol="€" alignSymbol="left"/>
<mx:Text text="{setCurrencyFormat.format(totalColumn)}" x="363" y="240" height="35" fontWeight="bold" fontSize="16" id="text1" fontFamily="Eurostile" width="77" />
<mx:Button id="b1"
label="calculate"
click="calculateTotalColumn()"
x="352" y="298" />
<mx:DataGrid id="dataGrid" editable="true" width="348" height="205" x="22" y="10">
<mx:columns>
<mx:DataGridColumn dataField="Type"/>
<mx:DataGridColumn dataField="Desc"/>
<mx:DataGridColumn dataField="Cost" labelFunction="formatPrice"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
For everyone interested, this is my work around.
If there is a better way please let me know
private function calculateTotalColumn(evt:CollectionEvent):void
var totalColumn:Number = 0;
for each (var row:Object in OrdersOpenDataGrid.dataProvider)
totalColumn += Number(row.total_price);
text1.text = setCurrencyFormat.format(totalColumn.toFixed(2));
<mx:CurrencyFormatter id="setCurrencyFormat" useNegativeSign="true" currencySymbol="€" alignSymbol="left"/> -
Count by id not by total number of amount paid
hi i what to count by total id not by total number of amount paid
{SELECT COUNT(*)NoEcd,agr.SSCH_ID,SUM(amount)FROM SMS_AGREEMENTS agr,
SMS_AGREEMENT_YEARS yea,
SMS_PAYMENTS PAY
WHERE agr.id = YEA.agr_id
AND agr.ssch_id IN(1,3,24)
AND PAY.AYEA_ID = yea.ID
AND yea.FYEA_YEAR IN( 2008)
GROUP BY agr.SSCH_ID }
NOECD | SSCH_ID| SUM(AMOUNT)
*627* | 1 | 5186229
*10181* | 3 | 114057485
*336* | 24 | 1120882
this is the number of id without total amount paid when i put total amount paid the total id change
{SELECT COUNT(agr.SSCH_ID)NoEcd,agr.SSCH_ID FROM SMS_AGREEMENTS agr,
SMS_AGREEMENT_YEARS yea
-- SMS_PAYMENTS PAY
WHERE agr.id = YEA.agr_id
AND agr.ssch_id IN(1,3,24)
--AND PAY.AYEA_ID = yea.ID
AND yea.FYEA_YEAR = 2008
GROUP BY agr.SSCH_ID;}
i what this with the total amount paid like top
NOECD| SSCH_ID
*63* | 1
*868* | 3
*35* | 24
Edited by: user603350 on 2011/07/11 11:59 PM
Edited by: user603350 on 2011/07/12 1:29 AM
Edited by: user603350 on 2011/07/12 1:58 AM
Edited by: user603350 on 2011/07/12 2:00 AM
Edited by: user603350 on 2011/07/12 2:21 AM
Edited by: user603350 on 2011/07/12 2:24 AM
Edited by: user603350 on 2011/07/12 2:25 AMhi i what to count by total id not by total number of amount paid
i try to edited, i only what to count by id like in the last query,the last query muts have total piad like first query but with the total ecd in bold in last query
{SELECT COUNT(*)NoEcd,agr.SSCH_ID,SUM(amount)FROM SMS_AGREEMENTS agr,
SMS_AGREEMENT_YEARS yea,
SMS_PAYMENTS PAY
WHERE agr.id = YEA.agr_id
AND agr.ssch_id IN(1,3,24)
AND PAY.AYEA_ID = yea.ID
AND yea.FYEA_YEAR IN( 2008)
GROUP BY agr.SSCH_ID }
NOECD SSCH_ID SUM(AMOUNT)
*627* 1 5186229
*10181* 3 114057485
*336* 24 1120882
this is the number of id without total amount paid when i put total amount paid the total id change
{SELECT COUNT(agr.SSCH_ID)NoEcd,agr.SSCH_ID FROM SMS_AGREEMENTS agr,
SMS_AGREEMENT_YEARS yea
-- SMS_PAYMENTS PAY
WHERE agr.id = YEA.agr_id
AND agr.ssch_id IN(1,3,24)
--AND PAY.AYEA_ID = yea.ID
AND yea.FYEA_YEAR = 2008
GROUP BY agr.SSCH_ID;}
i what this with the total amount paid like top
NOECD SSCH_ID
*63* 1
*868* 3
*35* 24 -
Can I total the currency amounts in multiple cells i.e. auto sum in Excel?
Can I total the currency amounts in multiple cells i.e. auto sum in Excel?
Can I total the currency amounts in multiple cells i.e. auto sum in Excel?
Maybe you are looking for
-
Std report on pr(s) & po(S) released
hi mm experts, Looking for a standard report for me54n/me55 - PRs- released & me28/me29n - POs -released. I mean list display. thanks in advance Regards Srihari
-
MS homeserver 2011 connector error in Win 8.1 Update 1
Had dificulty in installing win 8.1 Update 1, which required the OS rebuild. The Win Homerserver 2011 connect program fails to install. Error message includes "-either another software installation is in progress, or, the computer has a restart pen
-
Why can't we "set visuals enabled" of iTunes via AppleScript anymore?
You used to be able to set visuals enabled of iTunes to true or false. But the current version of Leopard and iTunes prohibit this. Thus if you do: tell application "iTunes" set visuals enabled to true end tell you get the error: AppleScript Error iT
-
Restoring ipod
-
I can't get Itunes to recognize the oldest backup I have on my PC
So basically I lost photos and contacts during iOS 5 update. I messed up by doing a complete restore trying to get everything back but accidentally unplugged my phone while it was restoring the firmware. So I went under the appdata file/mobilesync/ba