Positioning grand totals outside of matrix (help)
I create a matrix which displays the right results.
I produce grand totals from the information in the matrix
My problem is I want to display these totals on the far right hand side below
the subtotal of each group.
My problem is how to I make the grand total display somewhere when its not part
of the matrix. I tried to anchor it but it did not work.
Help
Hi Michael,
Thank you for your response.
Do you mean that we have to have these columns as part of select statement and the select statement consisting of only the sum of the columns (grand total columns) Q1 and have the rest of query(Q2) embeded in this query(Q1).
Please let me know your thoughts.
With Warm regards,
Manjula
Similar Messages
-
Grand Total sorting in Pivot Table
Hi Everyone,
I have 4cols taken in row and one in col with measure and i now i calculated the grand total and i want to sort the values in grand total., could anyone pls help mehi Phantasm, do as it is mentioned as kart.
IT WORKS FINE, put agrregation rule as none and take row total as after.........
take aggregation rule as NONE for last 4 columns ok......
TRY NEATLY ONCE..........IT WORKS
Thanks & Regards
J Rushi -
How to access a Matrix cell value outside the matrix in textbox?
Hi
I have created a matrix in SSRS. Columns are grouped by Channel Type. I want to access indicated cells value outside the matrix.
After Running the report the report shows
How can I access cell values outside the matrix? Please helpHi Aladin92,
According to your description, there is a matrix in the report, you want to reference the first value of total outside the matrix, right?
In fact, Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope. Are the both textboxes in the same group. To workaround the issue, please refer to the following steps:
1. Click and select the matrix, copy it and paste it in the report above the original matrix.
2. Right-click handle of the first row in the upper matrix, click Insert Rows, then click Inside Group-Above.
3. Right-click second cell of the first row, then click Expression.
4. In the Expression text box, type the expression like below:
="A total of "& ReportItems!Textbox5.Value & "out of 258 BC CCRs have been evaluated"
5. Set the text boxes and rows visibility to be hidden except for the text box with expression.
The following screenshots are for your reference:
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
Grand total is not working...please help
Hi, here is my code
SORT S_ENDT BY LIFNR.
LOOP AT S_ENDT WHERE BUDAT IN P_BUDAT.
WRITE: 1 S_ENDT-BKTXT,
11 S_ENDT-BUKRS,
16 S_ENDT-LIFNR,
24 S_ENDT-NAME1,
49 S_ENDT-BLART,
53 S_ENDT-BELNR,
64 S_ENDT-AUGBL,
75 S_ENDT-AUGDT,
86 S_ENDT-BUDAT,
97 S_ENDT-WRBTR,
113 S_ENDT-WAERS,
117 S_ENDT-XBLNR,
130 S_ENDT-ZUONR.
AT END OF BKTXT. " Subtotal by Draft #
ULINE.
SUM.
WRITE: 20 'Total of draft', 37 S_ENDT-BKTXT, 97 S_ENDT-WRBTR.
ENDAT.
AT LAST. " Grand total
SUM.
SKIP.
WRITE: 20 'Grand Total', 97 S_ENDT-WRBTR.
ENDAT.
SKIP.
ENDLOOP.
EXIT.
ENDIF.
I am not getting the right total..I am getting it for all LIFNR and not the value in P_LIFNR only (which is what I want).
please help
thanks
BrianHi,
try this coding.
SORT S_ENDT BY LIFNR.
*data : gt(16) type p decimals 2.*
LOOP AT S_ENDT WHERE BUDAT IN P_BUDAT.
*gt = gt + S_ENDT-WRBTR.*
WRITE: 1 S_ENDT-BKTXT,
11 S_ENDT-BUKRS,
16 S_ENDT-LIFNR,
24 S_ENDT-NAME1,
49 S_ENDT-BLART,
53 S_ENDT-BELNR,
64 S_ENDT-AUGBL,
75 S_ENDT-AUGDT,
86 S_ENDT-BUDAT,
97 S_ENDT-WRBTR,
113 S_ENDT-WAERS,
117 S_ENDT-XBLNR,
130 S_ENDT-ZUONR.
AT END OF BKTXT. " Subtotal by Draft #
ULINE.
SUM.
WRITE: 20 'Total of draft', 37 S_ENDT-BKTXT, 97 *gt*.
ENDAT.
AT LAST. " Grand total
SUM.
SKIP.
WRITE: 20 'Grand Total', 97 S_ENDT-WRBTR.
ENDAT.
SKIP.
ENDLOOP.
EXIT.
ENDIF.
U are using where condition in a Loop ,while executing last record may or may not get executed becoz of restiction.Better declare a variable and SUM under such scenarios.
Regards,
Ballack.
Reward Points if helpful. -
Help regarding how to show total and grand total
hi all
please help me to show the total / grand total fund wise
i m giving final output that i want
which functions may i use .
following is my query
SELECT MUT_NAME , NATURE , BROK_TYPE ,sum(BROKERAGE) brokerage FROM (
SELECT MUT_NAME , NATURE , BROK_TYPE ,BROKERAGE FROM (
select mf.mut_name , si.nature ,'UPFRONT' BROK_TYPE , sum(up1.paid_brok) BROKERAGE from upfront_paid up , upfront_paid_dtl upd , upfront_pr up1 , scheme_info si , mut_fund mf
where up.slab_id = upd.slab_id
and up.SLAB_ID = up1.paid_slab_id
and up.sch_code = si.sch_code
and si.mut_code = mf.mut_code
-- and si.mut_code = 'MF004'
group by grouping sets ( (mf.mut_name , si.nature) ) ROLLUP(MF.MUT_NAME,SI.NATURE)
UNION ALL
select mf.mut_name , si.nature ,'TRAIL' BROK_TYPE , sum(up1.paid_brok) BROKERAGE from TRAIL_paid up , TRAIL_paid_dtl upd , TRAIL_pr up1 , scheme_info si , mut_fund mf
where up.slab_id = upd.slab_id
and up.SLAB_ID = up1.paid_slab_id
and up.sch_code = si.sch_code
and si.mut_code = mf.mut_code
-- and si.mut_code = 'MF004'
group by grouping sets ( (mf.mut_name , si.nature) ) ) ROLLUP(MF.MUT_NAME,SI.NATURE)
UNION ALL
SELECT 'TOTAL ' MUT_NAME , ' ' NATURE , ' ' BROK_TYPE ,SUM(BROKERAGE) FROM (
select mf.mut_name , si.nature ,'UPFRONT' BROK_TYPE , sum(up1.paid_brok) BROKERAGE
from upfront_paid up , upfront_paid_dtl upd , upfront_pr up1 , scheme_info si , mut_fund mf
where up.slab_id = upd.slab_id
and up.SLAB_ID = up1.paid_slab_id
and up.sch_code = si.sch_code
and si.mut_code = mf.mut_code
--and si.mut_code = 'MF004'
group by grouping sets ( (mf.mut_name , si.nature) ) ROLLUP(MF.MUT_NAME,SI.NATURE)
UNION ALL
select mf.mut_name , si.nature ,'TRAIL' BROK_TYPE , sum(up1.paid_brok) BROKERAGE from TRAIL_paid up , TRAIL_paid_dtl upd , TRAIL_pr up1 , scheme_info si , mut_fund mf
where up.slab_id = upd.slab_id
and up.SLAB_ID = up1.paid_slab_id
and up.sch_code = si.sch_code
and si.mut_code = mf.mut_code
-- and si.mut_code = 'MF004'
group by grouping sets ( (mf.mut_name , si.nature) ) ) ROLLUP(MF.MUT_NAME,SI.NATURE)))
GROUP BY grouping sets (MUT_NAME),( NATURE ),( BROK_TYPE)
ORDER BY MUT_NAME , NATURE , BROK_TYPE
Sl. No. Fund House Fund Type Brokerage Type "Type-wise
Commission " Gross Commission
(1) Fidelity Mutual Fund Equity Upfront Commission xxx
Trail xxx
Others xxx
Debt Upfront Commission xxx
Trail xxx
Others xxx
T O T A L : xxxxx
(2) Franklin Templeton Mutual Fund Equity Upfront Commission
Trail
Per Form
AUM Linked
SIP Advance Annual Brokerage
Others
Debt Upfront Commission
Trail
Others
T O T A L : xxxxx
CONSOLIDATED TOTAL COMMISSION : xxxxxany help appriciated.how can i use compute in procedure
actually i am giving the output from query to ref_cursor and from front end ( .NET) they are fetch rows and show the output.
i want output as fallows
fund name -- nature --- brok type --- brokerage
1] fidelity equity upfront 2000
equity trail 1000
debth upfront 1500
debth trail 500
Fidelity 5000
2] abc --
so on hope this clears you
Message was edited by:
Pankaj M -
Matrix row grand total, column grand total
matrix report layout in sql 2008
report shows column a column b column c total
row 1 4 5
8 17
row 2 3 5
2 10
row 3 2 7
6 15
total 9 17
16 grand total column 42
grand total row 42
How do I define the grand total cells to use column totals or row totals? Not just the sum of field in dataset?
Accounting wants justification that column totals add up to row totals.Hi JimHoopsDSC,
Based on my understanding, you want to show grand total columns and grand total rows in the report.
For your requirement, you can create a matrix and add total for row groups and column groups. Then you can add an additional row and populate the total value. Please refer to screenshots below:
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Need Help with the Total and Grand Total
Hi All,
I have posted a question couple of days ago regarding the COUNT and AVERAGES, for a minute i thought i got the work around, but the problem still exists. I'm trying to find the average work done and average revenue generated. I have to do this by the location,
employee id , date and the number of hours. Below is a sample for february 2014. I have two averages for the work done AvgWorkDone=(sum of work done/count of workingdays in month), the second one is AverageWorkDone1... which i skewed by multiplying by 16 (since
there are 16 hours in my data per day) Please need help
Year Name
Calendar 2014
Month Of Year Name
Month 2
Row Labels
workdone
STG WORKDONE VW Count
AvgRev
AvgWorkdone
AvgWorkdone1
1
2433.333333
368
1.591304348
6.612318841
105.7971014
1368
2433.333333
368
1.591304348
6.612318841
105.7971014
10AM
0
23
0
0
0
11AM
23.33333333
23
0
1.014492754
16.23188406
12PM
91.66666667
23
0
3.985507246
63.76811594
1PM
58.33333333
23
0
2.536231884
40.57971014
2PM
41.66666667
23
0
1.811594203
28.98550725
3PM
161.6666667
23
0
7.028985507
112.4637681
4PM
176.6666667
23
0
7.68115942
122.8985507
5AM
0
23
25.46086957
0
0
5PM
191.6666667
23
0
8.333333333
133.3333333
6AM
0
23
0
0
0
6PM
450
23
0
19.56521739
313.0434783
7AM
0
23
0
0
0
7PM
618.3333333
23
0
26.88405797
430.1449275
8AM
0
23
0
0
0
8PM
620
23
0
26.95652174
431.3043478
9AM
0
23
0
0
0
Grand Total
2433.333333
368
1.591304348
6.612318841
105.7971014
If you see the above report the number of days are adding upto 368, this causes the Individual Averages to be fine but the GrandToatl of the Average is messed up. If i multiply by 16 the Individual Averages are messed up, but the GrandAverage is coming RIGHT.
Please need help where i can get both the individual and the grand averages right.
SVHi All,
Finally i found a solution. a) I have a time dim from the ware house and its joined to the fact table based on the dateid, since the fact table is getting only the data for the working days , the ware house time dim is showing only those days as count.
b) I created a new time dim in SSAS TIMEDIMSSAS
c) I joined the new TIMEDIMSSAS to the warehouse time dimension and the fact table and created new measure AvgWorkDone over time and Avg Rev over time.
I'm getting what i wanted. BUT here is a new problem , when i select multiple months the grand total (which should be Average is showing wrong average and i'm not sure why), can anyone please help ?
Row Labels
AvgRevenue
AvgWorkDone
1
$4.17
277.6801802
1368
$4.17
277.6801802
February 2014
$1.59
105.7971014
January 2014
$0.97
64.66666667
March 2014
$9.52
634.5512821
Grand Total
$4.17
277.6801802
The values were supposed to be (1.59+.97+9.52)/3=4.02 and NOT 4.17 for Revenue. Similarly for WorkDone (105.79+64.66+634.55)/3=268.33 and NOT 277.68
Please can some one suggest what is going wrong here?
Thanks
SV -
Rank on column-level Grand total column in pivot table - Need help
Hi ,
I have developed the report, which is having a pivot view. In pivot view i have a column level grand total. I need to apply the rank for the grand total column..
will that be possible.. if possible let me know..
Thanks
KishoreMAY BE IT IS NOT POSSIBLE IN PIVOT VIEW< AS WE DONT HAVE FORMULA EDIT OPTION FOR COLUMNS IN PIVOT VIEW.......
Thanks & Regards
Rushi -
Need urgent Help on Grand Totals
Hi gurus,
I have a problem with a crosstab report I'm working on. I have a calculated column based on a pre-summed column. The formula is CASE WHEN material_size_num IN ('97', '93', '92') THEN material_qty_sum*1.5)
I have created grand totals for the rows and columns. My problem is that the grand total for the column does not have total of all 'grand totals'. My report looks like the following:
Case statement col1., Case statement col2., Total col1+col2
(total) (total) (total does not appear).
I would appreciate any suggestions. I have tried using cell sum, but that has not workedHi Melanie,
When I use Sum all datapoints the sum for that column doesn't appear. I have to put Sum "adjusted qty" (my calculated column) to show any totals. I'm wondering if it's an issue with the CASE statement I'm using. This problem seems to occur whenever I use a decode or CASE statement. Have you any similar experiences?
Thanks for your help -
Query Grand Total help required
Hi all ,
I have make the following query with followin output:
SELECT asset, SUM(decode(abc_ccy, 'PR1', (nvl(abc_accr_lab, 0) + nv(abc_market_lab, 0)))) PR1,
SUM(decode(abc_ccy, 'PR2', (nvl(abc_accr_lab, 0) + nv(abc_market_lab, 0)))) PR2,
SUM(decode(abc_ccy, 'PR3', (nvl(abc_accr_lab, 0) + nv(abc_market_lab, 0)))) PR3,
SUM(decode(abc_ccy, 'PR1', 0, 'PR2', 0, 'PR3', 0,
(nvl(abc_accr_lab, 0) + nv(abc_market_lab, 0)))) OTHERS,
SUM(nvl(abc_accr_lab, 0) + nv(abc_market_lab, 0)) total
FROM test_table
GROUP BY asset
Asset PR1 PR2 PR3 OTHERS TOTAL
Bonds 100 50 75 100 425
Shares 50 50 75 100 475
Accounts 50 100 100 50 350My required output is also Grand Total below the field...is it possible in sql ????
Asset PR1 PR2 PR3 OTHERS TOTAL
Bonds 100 50 75 100 425
Shares 50 50 75 100 475
Accounts 50 100 100 50 350
Grand Ttl 200 200 250 250 1250RegardsI don't think it'd accept that,
Here's a quick demo of what might work tho'
DROP TABLE TEST_TABLE PURGE;
create table test_table(Asset varchar2(20),PR1 number,PR2 number,PR3 number,OTHERS number, TOTAL number);
insert into test_table values('Bonds',100,50,75,100,425);
insert into test_table values('Shares',50,50,75,100,475);
insert into test_table values('Accounts',50,100,100,50,350);
insert into test_table values(NULL,50,100,100,50,350);
SELECT DECODE(ASSET,NULL,DECODE(GROUPING(ASSET),1,'GRAND TOTAL','NONE'),ASSET), SUM(PR1), SUM(PR2), SUM(PR3), SUM(OTHERS), SUM(TOTAL)
FROM TEST_TABLE
GROUP BY ROLLUP(ASSET); -
Alv subtotals and grand total for a field
Hi friends,
I Have an internal table ITAB1
in that i have a senario as below.
In my GRID display iam getting values in the layou as follows
BUKRS = 1000
LIFNR MATNR STCST
100 abc 500,00
100 pqr 400,00
100 xyz 200,00
sub total
200 pto 700,00
200 vbr 900,00
sub total
BUKRS = 2000
LIFNR MATNR STCST
150 abc 500,00
150 pqr 400,00
150 xyz 200,00
sub total
260 pto 700,00
260 vbr 900,00
sub total
GRAND TOTAL =
Now my requirement is at the end of every vendor i need sub total for STCST field.
and at the end of every company code i need GRAND TOTAL for STCST field.
Its alv grid display.
how can i do that.
Regards,
Priyanka.Check this sample code may it will help u:
*& Report Z_ALV_SUBTOTAL
REPORT z_alv_subtotal.
*& Table declaration
TABLES: ekko.
*& Type pool declaration
TYPE-POOLS: slis. " Type pool for ALV
*& Selection screen
SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.
*& Type declaration
* Type declaration for internal table to store EKPO data
TYPES: BEGIN OF x_data,
ebeln TYPE char30, " Document no.
ebelp TYPE ebelp, " Item no
matnr TYPE matnr, " Material no
matnr1 TYPE matnr, " Material no
werks TYPE werks_d, " Plant
werks1 TYPE werks_d, " Plant
ntgew TYPE entge, " Net weight
gewe TYPE egewe, " Unit of weight
END OF x_data.
*& Internal table declaration
DATA:
* Internal table to store EKPO data
i_ekpo TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
* Internal table for storing field catalog information
i_fieldcat TYPE slis_t_fieldcat_alv,
* Internal table for Top of Page info. in ALV Display
i_alv_top_of_page TYPE slis_t_listheader,
* Internal table for ALV Display events
i_events TYPE slis_t_event,
* Internal table for storing ALV sort information
i_sort TYPE slis_t_sortinfo_alv,
i_event TYPE slis_t_event.
*& Work area declaration
DATA:
wa_ekko TYPE x_data,
wa_layout TYPE slis_layout_alv,
wa_events TYPE slis_alv_event,
wa_sort TYPE slis_sortinfo_alv.
*& Constant declaration
CONSTANTS:
c_header TYPE char1
VALUE 'H', "Header in ALV
c_item TYPE char1
VALUE 'S'.
*& Start-of-selection event
START-OF-SELECTION.
* Select data from ekpo
SELECT ebeln " Doc no
ebelp " Item
matnr " Material*
matnr " Material*
werks " Plant*
werks " Plant*
ntgew " Quantity
gewei " Unit
FROM ekpo
INTO TABLE i_ekpo
WHERE ebeln IN s_ebeln
AND ntgew NE '0.00'.
IF sy-subrc = 0.
SORT i_ekpo BY ebeln ebelp matnr .
ENDIF.
* To build the Page header
PERFORM sub_build_header.
* To prepare field catalog
PERFORM sub_field_catalog.
* Perform to populate the layout structure
PERFORM sub_populate_layout.
* Perform to populate the sort table.
PERFORM sub_populate_sort.
* Perform to populate ALV event
PERFORM sub_get_event.
END-OF-SELECTION.
* Perform to display ALV report
PERFORM sub_alv_report_display.
*& Form sub_build_header
* To build the header
* No Parameter
FORM sub_build_header .
* Local data declaration
DATA: l_system TYPE char10 , "System id
l_r_line TYPE slis_listheader, "Hold list header
l_date TYPE char10, "Date
l_time TYPE char10, "Time
l_success_records TYPE i, "No of success records
l_title(300) TYPE c. " Title
* Title Display
l_r_line-typ = c_header. " header
l_title = 'Test report'(001).
l_r_line-info = l_title.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR l_r_line.
* Run date Display
CLEAR l_date.
l_r_line-typ = c_item. " Item
WRITE: sy-datum TO l_date MM/DD/YYYY.
l_r_line-key = 'Run Date :'(002).
l_r_line-info = l_date.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR: l_r_line,
l_date.
ENDFORM. " sub_build_header
*& Form sub_field_catalog
* Build Field Catalog
* No Parameter
FORM sub_field_catalog .
* Build Field Catalog
PERFORM sub_fill_alv_field_catalog USING:
'01' '01' 'EBELN' 'I_EKPO' 'L'
'Doc No'(003) ' ' ' ' ' ' ' ',
'01' '02' 'EBELP' 'I_EKPO' 'L'
'Item No'(004) 'X' 'X' ' ' ' ',
'01' '03' 'MATNR' 'I_EKPO' 'L'
'Material No'(005) 'X' 'X' ' ' ' ',
'01' '03' 'MATNR1' 'I_EKPO' 'L'
'Material No'(005) ' ' ' ' ' ' ' ',
'01' '04' 'WERKS' 'I_EKPO' 'L'
'Plant'(006) 'X' 'X' ' ' ' ',
'01' '04' 'WERKS1' 'I_EKPO' 'L'
'Plant'(006) ' ' ' ' ' ' ' ',
'01' '05' 'NTGEW' 'I_EKPO' 'R'
'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.
ENDFORM. " sub_field_catalog
*& Form sub_fill_alv_field_catalog
*& For building Field Catalog
*& p_rowpos Row position
*& p_colpos Col position
*& p_fldnam Fldname
*& p_tabnam Tabname
*& p_justif Justification
*& p_seltext Seltext
*& p_out no out
*& p_tech Technical field
*& p_qfield Quantity field
*& p_qtab Quantity table
FORM sub_fill_alv_field_catalog USING p_rowpos TYPE sycurow
p_colpos TYPE sycucol
p_fldnam TYPE fieldname
p_tabnam TYPE tabname
p_justif TYPE char1
p_seltext TYPE dd03p-scrtext_l
p_out TYPE char1
p_tech TYPE char1
p_qfield TYPE slis_fieldname
p_qtab TYPE slis_tabname.
* Local declaration for field catalog
DATA: wa_lfl_fcat TYPE slis_fieldcat_alv.
wa_lfl_fcat-row_pos = p_rowpos. "Row
wa_lfl_fcat-col_pos = p_colpos. "Column
wa_lfl_fcat-fieldname = p_fldnam. "Field Name
wa_lfl_fcat-tabname = p_tabnam. "Internal Table Name
wa_lfl_fcat-just = p_justif. "Screen Justified
wa_lfl_fcat-seltext_l = p_seltext. "Field Text
wa_lfl_fcat-no_out = p_out. "No output
wa_lfl_fcat-tech = p_tech. "Technical field
wa_lfl_fcat-qfieldname = p_qfield. "Quantity unit
wa_lfl_fcat-qtabname = p_qtab . "Quantity table
IF p_fldnam = 'NTGEW'.
wa_lfl_fcat-do_sum = 'X'.
ENDIF.
APPEND wa_lfl_fcat TO i_fieldcat.
CLEAR wa_lfl_fcat.
ENDFORM. " sub_fill_alv_field_catalog
*& Form sub_populate_layout
* Populate ALV layout
* No Parameter
FORM sub_populate_layout .
CLEAR wa_layout.
wa_layout-colwidth_optimize = 'X'." Optimization of Col width
ENDFORM. " sub_populate_layout
*& Form sub_populate_sort
* Populate ALV sort table
* No Parameter
FORM sub_populate_sort .
* Sort on material
wa_sort-spos = '01' .
wa_sort-fieldname = 'MATNR'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
* Sort on plant
wa_sort-spos = '02'.
wa_sort-fieldname = 'WERKS'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
ENDFORM. " sub_populate_sort
*& Form sub_get_event
* Get ALV grid event and pass the form name to subtotal_text
* event
* No Parameter
FORM sub_get_event .
CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
'SUBTOTAL_TEXT'.
DATA: l_s_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = i_event
EXCEPTIONS
list_type_wrong = 0
OTHERS = 0.
* Subtotal
READ TABLE i_event INTO l_s_event
WITH KEY name = slis_ev_subtotal_text.
IF sy-subrc = 0.
MOVE c_formname_subtotal_text TO l_s_event-form.
MODIFY i_event FROM l_s_event INDEX sy-tabix.
ENDIF.
ENDFORM. " sub_get_event
*& Form sub_alv_report_display
* For ALV Report Display
* No Parameter
FORM sub_alv_report_display .
DATA: l_repid TYPE syrepid .
l_repid = sy-repid .
* This function module for displaying the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_top_of_page = 'SUB_ALV_TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = i_fieldcat
it_sort = i_sort
it_events = i_event
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = i_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE i000 WITH 'Error in ALV report display'(055).
ENDIF.
ENDFORM. " sub_alv_report_display
* FORM sub_alv_top_of_page
* Call ALV top of page
* No parameter
FORM sub_alv_top_of_page. "#EC CALLED
* To write header for the ALV
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_alv_top_of_page.
ENDFORM. "alv_top_of_page
*& Form subtotal_text
* Build subtotal text
* P_total Total
* p_subtot_text Subtotal text info
FORM subtotal_text CHANGING
p_total TYPE any
p_subtot_text TYPE slis_subtot_text.
* Material level sub total
IF p_subtot_text-criteria = 'MATNR'.
p_subtot_text-display_text_for_subtotal
= 'Material level total'(009).
ENDIF.
* Plant level sub total
IF p_subtot_text-criteria = 'WERKS'.
p_subtot_text-display_text_for_subtotal = 'Plant level total'(010).
ENDIF.
ENDFORM. "subtotal_text
Edited by: Joyjit Ghosh on Aug 21, 2008 5:25 PM -
Printing Grand Totals in Footer along with page total
Hi
I have a report which prints PO Header and PO Lines. For each page while iterating thru PO Lines I print page total in the footer.
Once all PO Lines are printed with page totals in the footer of each page, I want to print Grand total in the last page in the footer along with last page total. Currently my XML data has pre-computed grand total in the PO Header block.
The problem
I have wrapped header and lines inside <?start:body?> and <?end:body?> which allows me to print page totals outside the <?end:body?> tag.
I print page totals and "Continue" next to it in the footer. But
Finally when grand total comes into picture in the outer loop I want to replace "Continue" text with grand total value in the last page and print it as footer.
I tried to use xdoxlt:set_variable() function to flag a variable value to 1 when iteration happens in HEADER block and set it to 2 in inner loop of lines block. But the scope of the variable is confined between <?start:body?> and < ?end:body? and is not visible outside the <?end:body?> tag.
The logic I want to accomplish is
if var = 1 then
print page total and "Continue"
elsif var = 2 then
print page total and Grand Total.
end if
This logic doest work as the value of var is not visible outside the body tag.
I want to use this variable value to print footer which lies outside <?end:body?> tag with grand totalor page total
Please suggest if there is any other way I can accomplish this functionality. Can we use parameter and update it. Syntax for update parameter value is not clear in user guide.
Any help would be appreciated.
thanks
sukarnathanks for the info, i was trying to avoid this but had already reached the same conclusion.
everything else seems to be very time consuming and may not work correctly in the end.
we're on Oracle Applications : 11.5.10.2 which has just been converted to utf-8 and is an Oracle On-Demand installation.
do you know if 5.6.3 of the publisher is supported and any ideas on how difficult it is to get it installed?
cheers
ellen -
Using variable in Grand Total Label
Hi All,
I am using OBIEE 11.1.1.5 on Windows Vista.
Can we use variable values in Grand Total label in pivot and table views?
For eg. If user chose 2013 in dashboard prompt and we saved that in a presentation variable and want to use in the Grand Total label
so that instead of text "Grand Total" we can show "Fiscal Year 2013 Total".
Regards,
Vikas
Edited by: Vikas Barsaiyan on Feb 1, 2013 2:34 AM
Edited by: Vikas Barsaiyan on Feb 1, 2013 2:34 AMI dont think but you may go for custom captions
You can refere @ for 'Grand Total'
In caption Year@ results YearGrand Total
Other workaround : Use Narrative views to refer the variables, you might need to call variable in any of column expression and call it @n
where n is for column position from left to right
If helps mark
Edited by: Srini VEERAVALLI on Jan 31, 2013 3:17 PM -
Hi,
I have a Report for GL Reconciliation and it shows Source System Balances and GL Balances along with the Variance in these two and % Variance.
Sample data is as follows:
Year Month SYS Source System Bal GL Balances Variance % Variance
2010 MAY A 66,100,676,002 60,994,246,811 -5106429191 -8.37%
2010 MAY B 29,081,192,665 29,066,650,415 -14542249.78 -0.05%
2010 MAY C 218,856,115 212,416,688 -6439426.71 -3.03%
2010 MAY D 14,601,939 -100.00%
2010 MAY E 808,716,681 822,453,990 13737309.05 1.67%
2010 MAY F 5,874,200,259 6,856,456,401 982256141.3 14.33%
2010 MAY G 2,181,160,124 2,164,379,222 -16780901.26 -0.78%
2010 MAY H 10,505,609,797 23,529,905,894 13024296097 55.35%
2010 MAY I 1,566,030,457 1,565,502,039 -528418.48 -0.03%
2010 MAY J 1,479,284,089 100.00%
2010 MAY K 10,939,680,559 7,481,930,011 -3457750548 -46.21%
2010 MAY L 8,774,737,817 8,831,160,339 56422521.84 0.64%
2010 MAY M 1,117,717,954 548,331,847 -569386106.3 -103.84%
2010 MAY N 73,670,961 55,680,430 -17990531.39 -32.31%
2010 MAY O 4,583,263,229 4,562,122,752 -21140477.19 -0.46%
2010 MAY P 204,382,965 206,288,734 1905768.97 0.92%
2010 MAY NULL 332,763,879 100.00%
MAYTotal 142,044,497,524 148,709,573,543 6665076018 4.48%
Now This is how the Report will work as Normal...
What the user wants is Instead of Variance he wants to see the Absolute variance. So If I run absolute function on This Column, I will get following results:
ABS(Variance)
5,106,429,191
14,542,250
6,439,427
13,737,309
982,256,141
16,780,901
13,024,296,097
528,418
3,457,750,548
56,422,522
569,386,106
17,990,531
21,140,477
1,905,769
6665076018 --- -This Total is Incorrect as it is showing only the Absolute value to the Total, where as it should be More than this and to achieve this, I changed the Aggreegation Rule to SUM
to Get the correct sum of the figures mentioned ablove which will show following output:
ABS(Variance)
5,106,429,191
14,542,250
6,439,427
13,737,309
982,256,141
16,780,901
13,024,296,097
528,418
3,457,750,548
56,422,522
569,386,106
17,990,531
21,140,477
1,905,769
23,289,605,688
Now Till this point everything is correct and can be achieved. The problem is with the % Variance:
Bydefault % Variance ( Calculated using Variance/GL Balances )*100 Is as follows:
% Variance
-8.37%
-0.05%
-3.03%
-100.00%
1.67%
14.33%
-0.78%
55.35%
-0.03%
100.00%
-46.21%
0.64%
-103.84%
-32.31%
-0.46%
0.92%
100.00%
4.48%
But the Users wants that The % variance be calculated on Variance Column and GL Balances Column ( Variance/ GL Balances)*100
But the Grand Total values at the bottom should be based on ( Grand Total of ABS(Variance)/ Grand Total of GL Balances ) *100
to get the Desired results as :
% Variance
-8.37%
-0.05%
-3.03%
-100.00%
1.67%
14.33%
-0.78%
55.35%
-0.03%
100.00%
-46.21%
0.64%
-103.84%
-32.31%
-0.46%
0.92%
100.00%
15.66%
(23,289,605,688/1,48,709,573,543)*100
If someone can help me with this...
Edited by: help-required on Oct 1, 2010 1:14 AMOK, there are a couple of things that have to be pointed out before getting to the actual problem. First of all, the column you named "Variance" is not a variance, but a "difference" and should be labeled as such. Second, what is the variance you are trying to calculate?
If the variance is from the "Source System Bal," then the calculation is ("GL Balances" - "Source System Bal")/"Source System Bal"
If the variance is from the "GL Balances," then the calculation is ("Source System Bal" - GL Balances")/"GL Balances"
You have ("GL Balances" - "Source System Bal")/"GL Balances" so do you know what you are measuring? Make sure you get this part right first. Now on to the issue itself.
This is the point of confusion with some I think: you want the individual rows of the "% Variance" column to display the +actual+ variance, positive or negative, but in just the total at the bottom, you want the "% Variance" to reflect the "absolute values of the differences, summed, and then divided by the GL Balances."
You can't have two different calculations on the same column like that, one for the rows and a completely different one for the total.
Here's a workaround. Uncheck the "totals" for the pivot table completely and just show the rows. (Make sure you change the name of the "Variance" column to "Difference" or something similar.)
Now create another pivot table view, but take out all the attributes so the measures sum up. Add an additional column called "ABS % Variance" and make this calculated column (do this in Criteria in the fx of a "dummy column"):
(ABS("GL Balances" - "Source System Balances")/"Source System Bal")*100.00
Don't forget to change the data format to "percentage."
Now place this pivot table view directly below the one with the individual rows. You should now have what you are looking for.
Edited by: David_T on Sep 30, 2010 10:58 AM -
Issue in ALV Grid Grand Totals
Hi Friends,
Hwo can i display grand total text in ALV Grid? Eventhough i am using Totals_text parameter in layout i am unable to display. any one vcan help me out in this refgard.
if pos send the code
Regards,
Vijay<REMOVED BY MODERATOR>
SAMPLE PROGRAM:
REPORT ysalesorder_alv_subtotals.
* Type Pools
TYPE-POOLS:slis.
* Tables
TABLES: vbak, "Sales Document: Header Data
vbap. "Sales Document: Item Data
* Global Structures
DATA:gt_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv,
gt_sortcat TYPE slis_t_sortinfo_alv,
wa_sortcat LIKE LINE OF gt_sortcat.
* Internal Table
DATA: BEGIN OF gt_salesorder OCCURS 0,
vbeln LIKE vbak-vbeln, " Sales Document Number
posnr LIKE vbap-posnr, " Sales Doc Item
netwr LIKE vbap-netwr, " Net Value
END OF gt_salesorder.
* SELECT OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME
TITLE text-001.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln. " Sales Document
Number.
SELECTION-SCREEN END OF BLOCK b1.
* Initialization
INITIALIZATION.
PERFORM initialization.
* Start Of Selection
START-OF-SELECTION.
PERFORM field_catalog. "For Structure Creation
PERFORM fetch_data. "Get the Data From DB Table
PERFORM sorting USING gt_sortcat.
* End Of Selection
END-OF-SELECTION.
PERFORM display_data.
*& Form initialization
* text
* --> p1 text
* <-- p2 text
FORM initialization .
s_vbeln-sign = 'I'.
s_vbeln-option = 'BT'.
s_vbeln-low = '4969'.
s_vbeln-high = '5000'.
APPEND s_vbeln.
ENDFORM. " initialization
*& Form field_catalog
* text
* --> p1 text
* <-- p2 text
FORM field_catalog .
REFRESH : gt_fieldcat.
CLEAR : wa_fieldcat.
wa_fieldcat-col_pos = '1'. "Column Position
wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table
wa_fieldcat-fieldname = 'VBELN'. "Field Name
wa_fieldcat-key = 'X'. "Blue Color
wa_fieldcat-seltext_m = 'Sales Doc No'. "Display Text In Screen
APPEND wa_fieldcat TO gt_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = '2'. "Column Position
wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table Name
wa_fieldcat-fieldname = 'POSNR'. "Field Name
wa_fieldcat-seltext_m = 'Sales Doc Item'."Display Text In Screen
APPEND wa_fieldcat TO gt_fieldcat.
CLEAR wa_fieldcat.
*SubTotal on the Field NETWR
wa_fieldcat-col_pos = '3'. "Column Position
wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table
wa_fieldcat-fieldname = 'NETWR'. "Field Name
wa_fieldcat-do_sum = 'X'. "Sum
wa_fieldcat-seltext_m = 'Net Value'. "Display Text In Screen
APPEND wa_fieldcat TO gt_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " field_catalog
*& Form sorting
* text
* -->P_IT_SORTCAT text
FORM sorting USING p_it_sortcat TYPE slis_t_sortinfo_alv.
CLEAR wa_sortcat.
wa_sortcat-fieldname = 'VBELN'.
wa_sortcat-up ='X'.
wa_sortcat-subtot = 'X'.
APPEND wa_sortcat TO p_it_sortcat.
ENDFORM. " sorting
*& Form display_data
* text
* --> p1 text
* <-- p2 text
FORM display_data .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
it_fieldcat = gt_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
it_sort = gt_sortcat
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_salesorder
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER
SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " display_data
*& Form fetch_data
* text
* --> p1 text
* <-- p2 text
FORM fetch_data .
REFRESH : gt_salesorder.
CLEAR : gt_salesorder.
SELECT a~vbeln
posnr
b~netwr
FROM vbak AS a
INNER JOIN vbap AS b ON a~vbeln = b~vbeln
INTO TABLE gt_salesorder
WHERE a~vbeln IN s_vbeln.
ENDFORM. " fetch_data
Edited by: Alvaro Tejada Galindo on Apr 11, 2008 12:24 PM
Maybe you are looking for
-
Table or view does not exist - Data Dictionary Import Wizard(Data Modeler)
Hi All, In Data Modeler, Data Dictionary Import Wizard, I'm able to connect to database.But while going to the second stage (Select Schema/Database), I'm getting an error "ORA-00942: table or view does not exist". I am able to select the table with s
-
Recalculation of dep by change in depreciation methods from wdv to slm
Dear all, advice me as per indian accounting standard. I am in great need for this solution. my scenerio we are on ECC 5.0. As per the standards if an organization change its depreciation method e.g from WDV to SLM or vise versa, system should recalc
-
I'm running arch on an Acer Aspire One. I just installed X and i3 and they seem to function just fine, but the mouse isn't working. Arch detects mouse clicks but not mouse movement, so the cursor is stuck in the middle of the screen. I tried reinst
-
Contract for Back-Billing and Period End Billing
Hi , Greetings I have done the required configuration for Period-end billing with schema steps for back-billing , However when I try to execute the Billing simulation for period -end billing , I am unable to select contracts and system informs me tha
-
I am making a second partition on a 300 GB external hard drive. Initially I made the 2nd partition 50 GB. After Disk Utility went through the initial process, a notification popped up that said it wouldn't make the partition and suggested I shrink th