Grouping and sum values in XI
Hello,
I 'm working with invoice and I have this source structure as XI input:
Invoice
-- |....
-- |....
-- |Item1
|taxcode=01
|Amount=12
--|Item2
|taxcode=08
|Amount=10
--|Item3
|taxcode=01
|Amount=24
Now my scope is to map these fields to the IDOC segment E1EDP04 grouping by taxcode (MWSKZ taxcode)and putting the sum of the group amount (MWSBT amount).
IDOC:
--|...
--|...
--|E1EDP01
|...
|...
|EIEDP04
|MWSKZ=01
|MWSBT=36
|...
--|E1EDP01
|...
|...
|EIEDP04
|MWSKZ=08
|MWSBT=10
|...
How can I group by a field in XI?
Thank you
Corrado
Hi Corrado,
If You want to do it in graphical mapping then I will do it this way:
1. sort by taxcode
(taxcode) --> split by value (valuechanged) --> formatByExample (Amount, and splitted value) --> sum(amount) --> MWSBT
I can send u a screenshot of something similar if u need.
best regards
Dawid
Similar Messages
-
Sql grouping and summing impossible?
I want to create an sql query to sum up some data but i'm starting to think it is impossible with sql alone. The data i have are of the following form :
TRAN_DT TRAN_RS DEBT CRED
10-Jan 701 100 0
20-Jan 701 150 0
21-Jan 701 250 0
22-Jan 705 0 500
23-Jan 571 100 0
24-Jan 571 50 0
25-Jan 701 50 0
26-Jan 701 20 0
27-Jan 705 0 300The data are ordered by TRAN_DT and then by TRAN_RS. Tha grouping and summing of data based on tran_rs but only when it changes. So in the table above i do not want to see all 3 first recods but only one with value DEBT the sum of those 3 i.e. 100+150+250=500. So the above table after grouping would be like the one below:
TRAN_DT TRAN_RS DEBT CRED
21-Jan 701 500 0
22-Jan 705 0 500
24-Jan 571 150 0
26-Jan 701 70 0
27-Jan 705 0 300The TRAN_DT is the last value of the summed records. I undestand that the tran_dt may not be selectable. What i have tried so far is the following query:
select tran_dt,
tran_rs,
sum(debt)over(partition by tran_rs order by tran_dt rows unbounded preceding),
sum(cred)over(partition by tran_rs order by tran_dt rows unbounded preceding) from that_tableIs this even possible with sql alone, any thoughts?
The report i am trying to create in BI Publisher.Maybe it is possible to group the data in the template and ask my question there?915218 wrote:
Is this even possible with sql alone, any thoughts?It sure is...
WITH that_table as (select to_date('10/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 100 debt, 0 cred from dual union all
select to_date('20/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 150 debt, 0 cred from dual union all
select to_date('21/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 250 debt, 0 cred from dual union all
select to_date('22/01/2012', 'dd/mm/yyyy') tran_dt, 705 tran_rs, 0 debt, 500 cred from dual union all
select to_date('23/01/2012', 'dd/mm/yyyy') tran_dt, 571 tran_rs, 100 debt, 0 cred from dual union all
select to_date('24/01/2012', 'dd/mm/yyyy') tran_dt, 571 tran_rs, 50 debt, 0 cred from dual union all
select to_date('25/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 50 debt, 0 cred from dual union all
select to_date('26/01/2012', 'dd/mm/yyyy') tran_dt, 701 tran_rs, 20 debt, 0 cred from dual union all
select to_date('27/01/2012', 'dd/mm/yyyy') tran_dt, 705 tran_rs, 0 debt, 300 cred from dual)
, brk AS (
SELECT tran_dt,
tran_rs,
debt,
cred,
CASE WHEN Nvl (Lag (tran_rs) OVER (ORDER BY tran_dt, tran_rs), 0) != tran_rs THEN tran_rs || tran_dt END brk_tran_rs
FROM that_table
), grp AS (
SELECT tran_dt,
tran_rs,
debt,
cred,
Last_Value (brk_tran_rs IGNORE NULLS) OVER (ORDER BY tran_dt, tran_rs) grp_tran_rs
FROM brk
SELECT Max (tran_dt),
Max (tran_rs),
Sum (debt),
Sum (cred)
FROM grp
GROUP BY grp_tran_rs
ORDER BY 1, 2
Boneist
MAX(TRAN_ TRAN_RS DEBT CRED
21-JAN-12 701 500 0
22-JAN-12 705 0 500
24-JAN-12 571 150 0
26-JAN-12 701 70 0
27-JAN-12 705 0 300
Me
MAX(TRAN_ MAX(TRAN_RS) SUM(DEBT) SUM(CRED)
21-JAN-12 701 500 0
22-JAN-12 705 0 500
24-JAN-12 571 150 0
26-JAN-12 701 70 0
27-JAN-12 705 0 300Edited by: BrendanP on 17-Feb-2012 04:05
Test data courtesy of Boneist, and fixed bug.
Edited by: BrendanP on 17-Feb-2012 04:29 -
I can't figure how to group those records
EmpID
ClientId
HourIn
HourOut
Date
TotalHours
12345
9999
8:00 AM
12:00 PM
01/05/2015
4
12345
9999
1:00 PM
3:00 PM
01/05/2015
2
12345
9999
3:30 PM
6:00 PM
01/05/2015
2.5
12345
9999
8:00 AM
5:00 PM
01/06/2015
9
12345
9999
8:00 AM
5:00 PM
01/07/2015
9
12345
9999
8:00 AM
5:00 PM
01/08/2015
9
12345
9999
8:00 AM
5:00 PM
01/09/2015
9
I want to group by date and sum total hours and hourin in the first and hour out is the last one.
FYI (date can be datetime) (eg i can make date to be (1/18/2014 12:00:00 AM)
EmpID
ClientId
HourIn
HourOut
Date
TotalHours
12345
9999
8:00 AM
6:00 PM
01/05/2015
8.5
12345
9999
8:00 AM
5:00 PM
01/06/2015
9
12345
9999
8:00 AM
5:00 PM
01/07/2015
9
12345
9999
8:00 AM
5:00 PM
01/08/2015
9
12345
9999
8:00 AM
5:00 PM
01/09/2015
9
Thanks in advanceHope this helps..do a group by and then select ..change the below accordingly
DataTable objtable = new DataTable();
objtable.Columns.Add("EmpID", typeof(int)); objtable.Columns.Add("ClientId", typeof(int));
objtable.Columns.Add("HourIn", typeof(DateTime)); objtable.Columns.Add("HourOut", typeof(DateTime));
objtable.Columns.Add("Date", typeof(DateTime)); objtable.Columns.Add("TotalHours", typeof(double));
objtable.Rows.Add(12345, 9999, Convert.ToDateTime("01/05/2015 8:00 AM"), Convert.ToDateTime("01/05/2015 12:00 PM"), Convert.ToDateTime("01/05/2015"), 4);
objtable.Rows.Add(12345, 9999, Convert.ToDateTime("01/05/2015 1:00 PM"), Convert.ToDateTime("01/05/2015 3:00 PM"), Convert.ToDateTime("01/05/2015"), 2);
objtable.Rows.Add(12345, 9999, Convert.ToDateTime("01/05/2015 3:30 PM"), Convert.ToDateTime("01/05/2015 6:00 PM"), Convert.ToDateTime("01/05/2015"), 2.5);
objtable.Rows.Add(12345, 9999, Convert.ToDateTime("01/06/2015 8:00 AM"), Convert.ToDateTime("01/06/2015 5:00 PM"), Convert.ToDateTime("01/06/2015"), 9);
objtable.Rows.Add(12345, 9999, Convert.ToDateTime("01/07/2015 8:00 AM"), Convert.ToDateTime("01/07/2015 5:00 PM"), Convert.ToDateTime("01/07/2015"), 9);
objtable.Rows.Add(12345, 9999, Convert.ToDateTime("01/08/2015 8:00 AM"), Convert.ToDateTime("01/08/2015 5:00 PM"), Convert.ToDateTime("01/08/2015"), 9);
objtable.AcceptChanges();
var result = objtable.AsEnumerable().GroupBy(x => x.Field<DateTime>("Date")).Select(g => new
empId = g.First().Field<int>("EmpID"),
clientID = g.First().Field<int>("ClientId"),
hoursIn = g.Min(e => e.Field<DateTime>("HourIn")),
hourOut = g.Max(e => e.Field<DateTime>("HourOut")),
totalhours = g.First().Field<double>("TotalHours")
foreach (var row in result)
Console.WriteLine("{0} {1} {2} {3} {4} ", row.empId,row.clientID, row.hoursIn.ToString("HH:mm tt"), row.hourOut.ToString("HH:mm tt"),row.totalhours); -
Calculate the max and sum value by weird way !!!
this code calculate the sum value without sum clause :-
DECLARE
x NUMBER;
y NUMBER := 0;
CURSOR cur_sal
IS
SELECT sal
FROM emp;
BEGIN
OPEN cur_sal;
LOOP
FETCH cur_sal
INTO x;
EXIT WHEN cur_sal%NOTFOUND;
y := y + x;
END LOOP;
CLOSE cur_sal;
DBMS_OUTPUT.put_line ('sum sal without using sum function = ' || y);
END;
and this code calculate the max value without max clause :-
DECLARE
x NUMBER;
y NUMBER := 0;
CURSOR cur_sal
IS
SELECT sal
FROM emp;
BEGIN
OPEN cur_sal;
LOOP
FETCH cur_sal
INTO x;
EXIT WHEN cur_sal%NOTFOUND;
IF (x > y)
THEN
y := x;
END IF;
END LOOP;
CLOSE cur_sal;
DBMS_OUTPUT.put_line ('max sal without using max function = ' || y);
END;
the Question is : how suppose that's happen ?
what's the secret in those codes ?
it's just new idea for me , but I don't understand !
is there any name for this way in ( Oracle® Database PL/SQL User's Guide and Reference ) ?
if not , so please anyone give me any help to understand those codes !Secret? What secret? It slowly and inefficiently fetch each row one at a time and consecutively add them together you get a sum. What the first, horribly inefficient, cursor loop is doing is roughly the equivalent of determining how many rivets are in a bucket by dumping them on the floor and picking them up one at a time rather than weighing one, weighing all, and then doing a simple division. The second loop does the same, horribly inefficient thing, by picking up each rivet and seeing if it is bigger than the previous one.
Cursor loops are obsolete and this code is about as inefficient as you can get without using an Excel macro. -
Select query with group and sum
Friends I have a table which has a list of item that are sold in many provinces and their selling price.
EMP_TABLE
item_code
item_desc
item_province
item_selling_price
Now I want a query which a row containing
distinct item code ,item desc,province ,sum of item_selling_price for Ontario,sum of item_selling_price for British Columbia,sum of item_selling_price for Quebec
Can anyone please tell me how to do it.
thx
mHello
It's always usefull to provide some test data and create table scripts etc, but does this do what you're after?
create table dt_test_t1
(item_code varchar2(3),
item_desc varchar2(10),
item_province varchar2(20),
item_selling_price number(3)
) tablespace av_datas;
INSERT INTO dt_test_t1 VALUES('ABC','Item1','Province1',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item1','Province2',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item1','Province2',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item2','Province1',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item2','Province1',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item2','Province1',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item3','Province2',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item3','Province2',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item3','Province2',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item4','Province1',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item4','Province1',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item4','Province2',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item5','Province2',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item5','Province1',10);
INSERT INTO dt_test_t1 VALUES('ABC','Item5','Province2',10);
SQL> SELECT
2 item_code,
3 item_desc,
4 SUM(DECODE(item_province,'Province1',item_selling_price,0)) province_1_total,
5 SUM(DECODE(item_province,'Province2',item_selling_price,0)) province_2_total
6 FROM
7 dt_test_t1
8 GROUP BY
9 item_code,
10 item_desc;
ITE ITEM_DESC PROVINCE_1_TOTAL PROVINCE_2_TOTAL
ABC Item1 10 20
ABC Item2 30 0
ABC Item3 0 30
ABC Item4 20 10
ABC Item5 10 20HTH
David -
Expression Grouping and Summing
I am working on a report where I have an expression that gets the Max value of a field in the detail row of my report. I have four levels of grouping that I then need this expression to sum. The expression is:
=Max(IIF(LEFT(Fields!JobNum.Value,1)="S" AND Fields!Week1STol.Value<>0, CDBL(Fields!Week1STol.Value), 0))
I am using Max, because I need a value from a result set that is one of the non-zero values from the result set. They will all be the same, or 0, so if there is a different way to get the non-zero value without using an aggregate I can change my expression
to do that, but I have not found a way to do that yet. Now since I am grouping this, and as each group rolls up I need the sum of the max values in the subgroup. When I get is the Max value of the new group.
I have tried various ways to try and get this to sum. I have tried creating total rows, added custom code to collect running totals, etc., I have also tried wrapping the whole thing in a SUM aggregate, and that will work in the detail, but will not
roll up into the groupings.
Any help as to how this can be done will be greatly appreciated.
Thank you,
ChadOk, after continuing to search the internet I finally found the extra piece that I was missing that gave me the results I needed. The new expression looks like this:
=runningvalue(Sum(Max(IIF(LEFT(Fields!JobNum.Value,1)="S" AND Fields!Week1STol.Value<>0, CDBL(Fields!Week1STol.Value), 0),"JobItem"),"JobItem"),SUM, "JobItem")
In this I wrapped the original expression of Max in both a Sum and a runningvalue both at the JobItem level to get this rollup value. Now when I open the grouping I get the correct running value at each level.
What this really gives to me is a running total at each of four groupings, even with a "max" value at the detail level. This also allows me to total a max value inline on the report, without needing a hidden row, or report footer.
Thank you to everyone who looked at this, I hope it helps someone else. If this answer is not clear enough, please don't hesitate to add to the comments and I will try to clarify.
Thank you, Chad -
Hi,
I have three objects Business Unit, Department and Revenue
I would like to group by Business Unit and Departement; sum of Revenue.
How to do this in report level?
Please let me know?
Thanks and Regards,
Manjunath N JoginHi Pumpactionshotgun ,
I did same thing in webi but revenue field is diplaying all records.
It is not aggreagting (sum) based on Business Unit and Departement.
How to do 'aggregation seting for Revenue in the universe'
I am waiting your replay.
Thanks and Regards,
Manjunath N Jogin -
Payscale group and levels values are not appearing in IT0008
Hi Friends,
I craeted Payscale group & Level in V_T510. Eventhough these values are not coming as F4 (drop down)values in IT0008.
Pls adivice where I have missed the configuration.
ThanksHi..
ESG/CAP and and its grouping in V-t510 have already been maintained. however still it is not coming as drop down values.
Pls suggest to resolve.
Thanks -
How to Group and Sum rtf elements
Dear Friends,
I am having limited knowledge of XML so looking for your help
I am trying to create external template for Bill Presentment Architecture which is in .rtf. Template is having 3 section Invoice header, Lines and Tax summary.
Invoice Header and line section is ok, but facing some issues with Tax section.
LINE SECTION
LINE_ID ITEM RATE QTY BASE_AMT TAX_RATE TAX_AMT TOTAL_AMT
1 P0001 20 10 200 21% 42 242
3 P0003 40 30 1200 21% 252 1452
4 P0004 20 100 2000 10% 420 2200
5 P0005 50 10 500 10% 105 550
2 P0002 50 20 1000 6% 210 1060
EXPECTED RESULT IN TAX SUMMARY SECTION WHICH I AM LOOKING FOR
TAX RATE BASE_AMT TAX_AMT TOTAL_AMT
21% 1400 294 1694
10% 2500 525 2750
6% 1000 210 1060
Looking for your help, much appriciated.
Regards,
Jay
Edited by: 992820 on Mar 9, 2013 5:20 AM>
Tax Code Taxable amount
VAT 6% 1200
VAT 6% 1400
VAT 7% 1000
VAT 7% 2000
I used you code
<?for-each-group:LINE;./tax_code?> G tag
and getting following result
VAT 6% 1200
VAT 7% 1000
>
because you have loop by tax_code and no loop and no aggregation function (e.g. sum) for amount, so amount will be from first row
try add sum function for amount
also http://docs.oracle.com/cd/E18727_01/doc.121/e13532/T429876T431325.htm#I_bx2Dcontent
Summary Lines: Check this box if you want to display summarized transaction lines. Grouped lines are presented in the Lines and Tax area of the primary bill page.so it's may be not template problem but some settings? -
MR11 diferrence in total and sum value of line items
Hello
MR11 was run and it was exported to excel - it is found that there is a difference in value between the total figure given under the indivudual lines and the amount got by adding all the line items of the difference values. Can somebody please explain why this happens
The total figure matched with another report taken outside SAPExport to word
-
Hello.
I have an excel structure here, this data is extracted from our company's software. The record was recorded from Dec 5, 2013 to Dec 11, 2013
Job Operator
Added
Job Opened
Job Revenue Recognition Date
Shipment ID
Joebeth Cañete
05-Dec-13
19-Dec-13
IMM
S00038408
Joebeth Cañete
05-Dec-13
19-Dec-13
IMM
S00038412
Joebeth Cañete
05-Dec-13
19-Dec-13
IMM
S00038414
Joebeth Cañete
05-Dec-13
10-Dec-13
IMM
S00038440
Sharlah Faye Solomon
09-Dec-13
09-Dec-13
IMM
S00038501
Rachel Rosales
09-Dec-13
09-Dec-13
IMM
S00038502
Sharlah Faye Solomon
09-Dec-13
09-Dec-13
IMM
S00038503
Sharlah Faye Solomon
09-Dec-13
09-Dec-13
IMM
S00038504
Sharlah Faye Solomon
09-Dec-13
09-Dec-13
IMM
S00038506
Sheena Dagandan
09-Dec-13
09-Dec-13
IMM
S00038508
May Jane Herrera
09-Dec-13
09-Dec-13
IMM
S00038509
Joebeth Cañete
09-Dec-13
17-Dec-13
IMM
S00038510
Sheena Dagandan
09-Dec-13
09-Dec-13
IMM
S00038512
Sheena Dagandan
09-Dec-13
09-Dec-13
IMM
S00038513
Sheena Dagandan
09-Dec-13
09-Dec-13
IMM
S00038514
Sheena Dagandan
09-Dec-13
09-Dec-13
IMM
S00038515
Sheena Dagandan
09-Dec-13
09-Dec-13
IMM
S00038516
Sheena Dagandan
09-Dec-13
09-Dec-13
IMM
S00038518
Joebeth Cañete
10-Dec-13
10-Dec-13
IMM
S00038523
Sharlah Faye Solomon
10-Dec-13
10-Dec-13
IMM
S00038524
May Jane Herrera
10-Dec-13
10-Dec-13
IMM
S00038525
May Jane Herrera
10-Dec-13
10-Dec-13
IMM
S00038526
Rachel Rosales
10-Dec-13
10-Dec-13
IMM
S00038528
May Jane Herrera
10-Dec-13
10-Dec-13
IMM
S00038530
May Jane Herrera
10-Dec-13
10-Dec-13
IMM
S00038531
May Jane Herrera
10-Dec-13
10-Dec-13
IMM
S00038532
Joebeth Cañete
10-Dec-13
10-Dec-13
IMM
S00038533
Rachel Rosales
10-Dec-13
10-Dec-13
IMM
S00038534
Sharlah Faye Solomon
11-Dec-13
11-Dec-13
IMM
S00038541
Sharlah Faye Solomon
11-Dec-13
11-Dec-13
IMM
S00038542
Sharlah Faye Solomon
11-Dec-13
11-Dec-13
IMM
S00038543
Sharlah Faye Solomon
11-Dec-13
11-Dec-13
IMM
S00038544
May Jane Herrera
11-Dec-13
11-Dec-13
IMM
S00038548
May Jane Herrera
11-Dec-13
11-Dec-13
IMM
S00038549
Rachel Rosales
11-Dec-13
11-Dec-13
IMM
S00038554
Rachel Rosales
11-Dec-13
11-Dec-13
IMM
S00038555
Rachel Rosales
11-Dec-13
11-Dec-13
IMM
S00038557
Rachel Rosales
11-Dec-13
11-Dec-13
IMM
S00038558
Now, my boss wants to have a matrix like this.
Job Operator Added Job Opened Shipment ID
Employee A
Total for (n) weeks [of Employee A]
Average Shipment Daily:
Average Shipment Weekly:
Employee B
Total for (n) weeks [of Employee B]
Average Shipment Daily:
Average Shipment Weekly:
Inshort, he wants to group the records by Job Operator and get the average number of shipments daily and weekly. Is it possible to do this job?What' the define of the 'Week' you mentioned?
It would be benefit for us to find the solution if you can provide the output you want.
E.g..
Job Operator
Total for (n) weeks
Average Shipment Daily
Average Shipment Weekly
Joebeth Cañete
2
1
3.5
But in any case, you can try to create a pivot table to analyze the data. -
Hi experts,
i have requirement to write end routine to read a DSO for last 12 months sales quantity for each month and sum value pass to keyfigure
not interested using bex variable, while data loading from source to target dso in end routine i am trying to read another DSO which is same as my
target dso where information is stored by fiscal period, year material etc. finally there is a keyfigure in target whih needs to be filled with sum of 12
months sales quantity, for each record form sourc to target maximum of 12 records will be in read dso (for 12 months) my routine is like below.
i am not expert in abap please kindly gothrough and guide me in this
TYPES: BEGIN OF s_/BIC/AZOSLS00,
FISCPER type /BI0/OIFISCPER,
FISCVARNT type /BI0/OIFISCVARNT,
PLANT type /BI0/OIPLANT,
STOR_LOC type /BI0/OISTOR_LOC,
/BIC/MATERIAL type /BIC/OIMATERIAL,
VTYPE type /BI0/OIVTYPE,
BILL_QTY type /BI0/OIBILL_QTY,
END OF s_/BIC/AZOSLS00.
DATA: it_/BIC/AZOSLS00 TYPE TABLE OF s_/BIC/AZOSLS00,
wa_/BIC/AZOSLS00 TYPE s_/BIC/AZOSLS00.
SELECT
FISCPER
FISCVARNT
PLANT
STOR_LOC
/BIC/MATERIAL
VTYPE
BILL_QTY
FROM /BIC/AZOSLS00 INTO TABLE it_/BIC/AZOSLS00
FOR ALL
ENTRIES IN RESULT_PACKAGE
WHERE
below field is from value of fiscal period (which is fiscal period -999 ex: for 001.2014 this
value will be 002.2013 so 12 months including current period)
FISCPER >= RESULT_PACKAGE-/BIC/ZFISCPERF
below is result filed fiscal period (here i dont know which keyword or statement to be used to select
interval values this between statement giving syntax error that can not be used in where for for all entries
between RESULT_PACKAGE-FISCPER
AND
FISCVARNT = RESULT_PACKAGE-FISCVARNT AND
PLANT = RESULT_PACKAGE-PLANT AND
STOR_LOC = RESULT_PACKAGE-STOR_LOC and
/BIC/MATERIAL = RESULT_PACKAGE-/BIC/MATERIAL .
SORT it_/BIC/AZOSLS00 BY FISCPER FISCVARNT PLANT STOR_LOC
/BIC/MATERIAL .
LOOP AT RESULT_PACKAGE ASSIGNING <result_fields>.
READ TABLE it_/BIC/AZOSLS00 INTO wa_/BIC/AZOSLS00 WITH KEY
below dont know what statement i need to use in read statement for interval of fiscal periods
giving error that >= can not be used
FISCPER >= <result_fields>-/BIC/ZFISCPERF
FISCPER = <result_fields>-FISCPER
FISCVARNT = <result_fields>-FISCVARNT
PLANT = <result_fields>-PLANT
STOR_LOC = <result_fields>-STOR_LOC
/BIC/MATERIAL = <result_fields>-/BIC/MATERIAL
BINARY SEARCH.
BREAK-POINT.
IF sy-subrc = 0.
below for each record there will be 12 records in read so sume of 12 records quantity i need to pass to result again dont know what to say here
sum statement giving error
<result_fields>-/BIC/ZLSTSLS12 =
sum(wa_/BIC/AZOSLS00-BILL_QTY).
ENDIF.
ENDLOOP.
friends please help me in this.
Thanks
Chandra.Hiii,
If you only want to store last 12 months data in Target ODS .
Then Create filter in DTP and write routine in filter for calmonth or fiscal period.
Refer the below link to create filter routine :
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80b2db87-639b-2e10-a8b9-c1ac0a44a7a6?QuickLink=index&…
Regards,
Akshay -
Group dimension separation. Group and currency dimension
Hi experts!
As I am concerned, a new functionality of SAP BPC NW 7.5. is to separate group dimension on two: group and currency.
Could any explain me how it affects to consolidation system process and how could I set up?
Thank you
GG
Edited by: algarciagomez on Jul 26, 2010 12:07 PMHi experts,
Finallly we find a solution attending to our experience. You must defione both dimension RPTCURRENCY only for currencies and LC, and GROUP only for scope groups and NON_GROUP value.
Data must be introdue in NON_GROUP member and LC, then in conversion program, system save data in NON_GROUP and group currency (for example EUR), and finally in consolidation program, system save data in G_01 (group scope) and EUR.
I hope this could help you.
Regards,
Gabriel Garcí -
I have data
Type, Month, Amount
=========
4, 1, 43333.33333
4, 2, 43333.33333
4, 3, 43333.33333
8, 5, 16000
8, 6, 16000
8, 7, 16000
8, 8, 16000
4, 2, 100
4, 3, 100and I want to group and SUM() equal amounts and find MIN(month) and MAX(month), so the output should look like
Type, MIN(month), MAX(month), SUM(amount)
=========
4, 1, 3, 130000
8, 5, 8, 64000
4, 2, 3, 200How is it possible?Hi,
964656 wrote:
I have data
Month, Amount
=========
1, 43333.33333
2, 43333.33333
3, 43333.33333
5, 16000
6, 16000
7, 16000
8, 16000and I want to group and SUM() equal amounts and find MIN(month) and MAX(month), so the output should look like
MIN(month), MAX(month), SUM(amount)
=========
1, 3, 130000
5, 8, 64000How is it possible?You practially coded the whole thing already:
SELECT MIN (month) AS min_month
, MAX (month) AS max_month
, SUM (amount) AS sum_amount
FROM table_x
GROUP BY amount
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Point out a few places where the query above is giving the wrong results, and explain, using specific examples, how you get those results from that data in those places.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
You'll get better answers faster if you always supply this information whenever you post a question. -
Group Totals and row values to be repeated
All,
I have a data set like this
Category YearMonth Section Count1 Count2
Category1 201401 S1 15
5
Category1 201401 S2 10
0
Category1 201402 S1 5 5
Below is the result set that I want:
Category YearMonth Section %Count2
Category1 201401 S1 16.66% i.e. (5/30) * 100 (30, because if you
look at YearMonth 201401, I want to have a sum of 15 + 5 + 10 ))
Category1 201401 S2 (0/30) * 100 = 0%
Category1 201402 S1 (5/10) * 100 = 50% (Division by 10, coz the sum of counts for 201402 is 5 + 5)Hi SqlCraze,
According to your description, you want to calculate a percentage of Count1 in Total Counts. Right?
In this scenario, we can set the detail rows group on YearMonth. Since we can specify scope for sum function, so we can get the total counts value for each group and calculate the percentage. please try the following expression:
=Fields!Count2.Value/(Sum(Fields!Count1.Value,"YearMonth")+Sum(Fields!Count2.Value,"YearMonth"))
We have tested this scenario, the design and result look like below:
Reference:
Sum Function (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou
Maybe you are looking for
-
Trouble with CCME 4 and VIC2-2FXO; IOS 12.4(9)T
Trouble with CCME 4 and VIC2-2FXO; IOS 12.4(9)T I am having trouble making outgoing call or answering incoming call. When I try to call out from my IP 7961 phone, it fails with the message "unknown number". For incoming call, it rings but when I pick
-
Text Area Problem. Last Line not displayed
HI, I am using TextArea component in the MXML script. We are having the problem of not displaying the last line in textarea. The textarea has scroll also. But, when scrolling only last line is not displayed and we have to see only by moving the mouse
-
Hyper-V Fabric and Fabric Management Cluster
Dear All...........Would appreciate understanding of following: What is the difference between Fabric Cluster and Fabric Management Cluster? What virtual machines should be part of Fabric Cluster and Fabric Management Cluster respectively? Thanks in
-
I have been doing some video/dvd projects for someone and will be doing more. What I want to be able to do is to save the iMovie HD-6 projects to an external HD to give to him for future use and possible future editing. He currently dosent have a Mac
-
drop table din_inst_detail; create table din_inst_detail (instNo number, insdt date, amt number); insert into din_inst_detail values (1, '01-apr-2010', 10000); insert into din_inst_detail values (2, '01-may-2010', 10000); insert into din_inst_detail