Sort operations in several orders
I have a requirement for a report where I could list all the operations for a revision.
The user wants to be able to sort these operations to be able to perform the maintenance in the right order. One idea was to use the sort term on the operation but then the user has to go in on each and every order and then to the operation and then update the field.
Any ideas on how to solve this?
Has anyone had any similar requirements?
Hi Kristoffer,
' I have a requirement for a report where I could list all the operations for a revision. '
The Revision Selection field in General/Administration Tab of Tcode IW37n , is giving the desired results. Isn't this the requirement?
See this picture.
Jogeswara Rao K
Similar Messages
-
Confusion in FILTER and SORT operations in the execution plan
Hi
I have been working on tuning of a sql query:
SELECT SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), 0)),
SUM(DECODE(CR_FLG, 'C', 1, 0)),
SUM(DECODE(CR_FLG, 'R', NVL(TOT_AMT, 0), 0)),
SUM(DECODE(CR_FLG, 'R', 1, 0)),
SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), -1 * NVL(TOT_AMT, 0))),
SUM(1)
FROM TS_TEST
WHERE SMY_DT BETWEEN TO_DATE(:1, 'DD-MM-YYYY') AND
TO_DATE(:1, 'DD-MM-YYYY');Table TS_TEST is range partitioned on smy_dt and there is an index on smy_dt column. Explain plan of the query is:
SQL> explain plan for SELECT SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), 0)),
2 SUM(DECODE(CR_FLG, 'C', 1, 0)),
3 SUM(DECODE(CR_FLG, 'R', NVL(TOT_AMT, 0), 0)),
4 SUM(DECODE(CR_FLG, 'R', 1, 0)),
5 SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), -1 * NVL(TOT_AMT, 0))),
6 SUM(1)
7 FROM TS_TEST
8 WHERE SMY_DT BETWEEN TO_DATE(:1, 'DD-MM-YYYY') AND
9 TO_DATE(:1, 'DD-MM-YYYY');
Explained.
SQL> @E
PLAN_TABLE_OUTPUT
Plan hash value: 766961720
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 14 | 15614 (1)| 00:03:08 | | |
| 1 | SORT AGGREGATE | | 1 | 14 | | | | |
|* 2 | FILTER | | | | | | | |
| 3 | TABLE ACCESS BY GLOBAL INDEX ROWID| T_TEST | 79772 | 1090K| 15614 (1)| 00:03:08 | ROWID | ROWID |
|* 4 | INDEX RANGE SCAN | I_SMY_DT | 143K| | 442 (1)| 00:00:06 | | |
Predicate Information (identified by operation id):
2 - filter(TO_DATE(:1,'DD-MM-YYYY')<=TO_DATE(:1,'DD-MM-YYYY'))
4 - access("SMY_DT">=TO_DATE(:1,'DD-MM-YYYY') AND "SMY_DT"<=TO_DATE(:1,'DD-MM-YYYY'))
17 rows selected.
SQL>I am not able to understand the FILTER & SORT operations. As there is an index on SMY_DT column, so index range scan is fine. But why a FILTER (Step no 2) and SORT (Step no 1) operation after that ?
Oracle version is 10.2.0.3 on AIX 5.3 64 bit.
Any other information required please let me know.
Regards,
Amardeep SidhuSort aggregate tells you that there was performed an aggregate operation which returns one row, in opposite to sort order by or hash group by which indicates you have grouping, and there more than one row can be returned.
SQL> SELECT SUM(comm) FROM emp;
SUM(COMM)
2200
Plan wykonywania
Plan hash value: 2083865914
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 | 3 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 2 | | |
| 2 | TABLE ACCESS FULL| EMP | 14 | 28 | 3 (0)| 00:00:01 |
SQL> SELECT AVG(comm) FROM emp;
AVG(COMM)
550
Plan wykonywania
Plan hash value: 2083865914
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 | 3 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 2 | | |
| 2 | TABLE ACCESS FULL| EMP | 14 | 28 | 3 (0)| 00:00:01 |
SQL> SELECT MIN(comm) FROM emp;
MIN(COMM)
0
Plan wykonywania
Plan hash value: 2083865914
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 | 3 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 2 | | |
| 2 | TABLE ACCESS FULL| EMP | 14 | 28 | 3 (0)| 00:00:01 |
SQL> SELECT deptno, SUM(comm) FROM emp GROUP BY deptno;
DEPTNO SUM(COMM)
30 2200
20
10
Plan wykonywania
Plan hash value: 4067220884
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 3 | 15 | 4 (25)| 00:00:01 |
| 1 | HASH GROUP BY | | 3 | 15 | 4 (25)| 00:00:01 |
| 2 | TABLE ACCESS FULL| EMP | 14 | 70 | 3 (0)| 00:00:01 |
SQL>Edited by: Łukasz Mastalerz on Jan 14, 2009 11:41 AM -
Please review following SQL and it's execution plan. Why am I seeing 2 WINDOW SORT operations even though in sql . analytic function "row_number" has been used only once?
Also, In step 3 of the plan, why "bytes" goes from 35 GB(4th step) to 88GB when row count remains the same. In fact , since I'm selecting just 1st row , both row count as well as "bytes" should have gone down. Shouldn't it?
SELECT orddtl.ord_dtl_key, orddtl.ld_nbr, orddtl.actv_flg,
orddtl.ord_nbr
FROM (SELECT /*+ parallel(od, 8) parallel(sc,8) */ od.ord_dtl_key, od.ld_nbr, od.actv_flg,
od.ord_nbr,
ROW_NUMBER () OVER (PARTITION BY od.ord_dtl_key, od.START_TS ORDER BY sc.START_TS DESC)
rownbr
FROM edw.order_detail od LEFT OUTER JOIN edw.srvc_code sc
ON ( sc.srvc_cd_key = od.srvc_cd_key
AND od.part_nbr = sc.part_nbr
AND od.item_cre_dt >= sc.START_TS
AND od.item_cre_dt < sc.END_TS
WHERE od.part_nbr = 11 ) orddtl
WHERE orddtl.rownbr = 1;Execution Plan
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 88M| 121G| | 2353K (65)| 00:33:07 | | | | | |
| 1 | PX COORDINATOR | | | | | | | | | | | |
| 2 | PX SEND QC (RANDOM) | :TQ10002 | 88M| 121G| | 2353K (65)| 00:33:07 | | | Q1,02 | P->S | QC (RAND) |
|* 3 | VIEW | | 88M| 121G| | 2353K (65)| 00:33:07 | | | Q1,02 | PCWP | |
|* 4 | WINDOW SORT PUSHED RANK | | 88M| 35G| 75G| 2353K (65)| 00:33:07 | | | Q1,02 | PCWP | |
| 5 | PX RECEIVE | | 88M| 35G| | 2353K (65)| 00:33:07 | | | Q1,02 | PCWP | |
| 6 | PX SEND HASH | :TQ10001 | 88M| 35G| | 2353K (65)| 00:33:07 | | | Q1,01 | P->P | HASH |
|* 7 | WINDOW CHILD PUSHED RANK| | 88M| 35G| | 2353K (65)| 00:33:07 | | | Q1,01 | PCWP | |
|* 8 | HASH JOIN RIGHT OUTER | | 88M| 35G| | 1610K (92)| 00:22:39 | | | Q1,01 | PCWP | |
| 9 | PX RECEIVE | | 1133K| 32M| | 1197 (20)| 00:00:02 | | | Q1,01 | PCWP | |
| 10 | PX SEND BROADCAST | :TQ10000 | 1133K| 32M| | 1197 (20)| 00:00:02 | | | Q1,00 | P->P | BROADCAST |
| 11 | PX BLOCK ITERATOR | | 1133K| 32M| | 1197 (20)| 00:00:02 | KEY | KEY | Q1,00 | PCWC | |
| 12 | TABLE ACCESS FULL | SRVC_CODE | 1133K| 32M| | 1197 (20)| 00:00:02 | 1 | 1 | Q1,00 | PCWP | |
| 13 | PX BLOCK ITERATOR | | 88M| 32G| | 188K (27)| 00:02:39 | KEY | KEY | Q1,01 | PCWC | |
| 14 | TABLE ACCESS FULL | ORDER_DETAIL | 88M| 32G| | 188K (27)| 00:02:39 | 1 | 1 | Q1,01 | PCWP | |
Predicate Information (identified by operation id):
3 - filter("orddtl"."rownbr"=1)
4 - filter(ROW_NUMBER() OVER ( PARTITION BY "od"."ORD_DTL_KEY","od"."START_TS" ORDER BY INTERNAL_FUNCTION("SC"."START_TS"(+))
DESC )<=1)
7 - filter(ROW_NUMBER() OVER ( PARTITION BY "od"."ORD_DTL_KEY","od"."START_TS" ORDER BY INTERNAL_FUNCTION("SC"."START_TS"(+))
DESC )<=1)
8 - access("od"."part_nbr"="SC"."part_nbr"(+) AND "SC"."SRVC_CD_KEY"(+)="od"."SRVC_CD_KEY")
filter("od"."ITEM_CRE_DT"<"SC"."END_TS"(+) AND "od"."ITEM_CRE_DT">="SC"."START_TS"(+))Thanks Jonathan for your reply.
This type of pattern happens quite frequently in parallel execution with aggregation. A layer of slave processes can do partial aggregation before passing a reduced result set to the query co-ordinator to finish the job.
I wouldn't be 100% sure without building a model to check, but I think the logic of your quer allows the eight slaves to identify each "rownumber() = 1" for the data set they have collected, and the allows the query coordinator to do the window sort on the eight incoming rows (for each key) and determine which one of the eight is ultimate the highest date.So is it a normal pattern? Will step#7 & #4 do the same amount work as stated in PREDICATE information part of execution plan.?
You’re correct! There are 8 slave processes appears to be performing WINDOW PUSHED RANK ( Step#7 in Execution Plan ) as you see in following output. Per execution plan and your comment, each one appears to be finding partial set of rows row_num <= 1. It’s apparently doing lots of work and very slow even with 8 processes. So not sure , how slow would be QC doing the same work just by itself.
And as you see below , it’s [Step#7 ] very slow and half of the slaves performing multi pass sort operation. Even though , it was estimated 35GB for that operation, why it’s estimating work area size of only 6-14MB only? Also, It’s allocating so low amount of PGA than expected. P_A_T was set to approx 11 GB. Currently this was the only query/operation on the Instance.
Why it’s not allocating more PGA for that operation? [My apologies for diverting from my original question ].
I have included PGA stats as well here which was taken 5-10 minutes later than other PQ session information. It’s still shows that there is no shortage of PGA.
Moreover, I have observed this behavior (under allocation of PGA) especially for WINDOWS SORT operations for other SQLs too. Is it normal behavior ? I’m on 10.2.0.4.
select
decode(px.qcinst_id,NULL,username,
' - '||lower(substr(pp.SERVER_NAME,
length(pp.SERVER_NAME)-4,4) ) )"Username",
decode(px.qcinst_id,NULL, 'QC', '(Slave)') "QC/Slave" ,
to_char( px.server_set) "SlaveSet",
to_char(s.sid) "SID",
to_char(px.inst_id) "Slave INST",
decode(sw.state,'WAITING', 'WAIT', 'NOT WAIT' ) as STATE,
case sw.state WHEN 'WAITING' THEN substr(sw.event,1,30) ELSE NULL end as wait_event ,
to_char(s.ROW_WAIT_OBJ#) wait_OBID,
decode(px.qcinst_id, NULL ,to_char(s.sid) ,px.qcsid) "QC SID",
to_char(px.qcinst_id) "QC INST",
px.req_degree "Req. DOP",
px.degree "Actual DOP"
from gv$px_session px,
gv$session s ,
gv$px_process pp,
gv$session_wait sw
where px.sid=s.sid (+)
and px.serial#=s.serial#(+)
and px.inst_id = s.inst_id(+)
and px.sid = pp.sid (+)
and px.serial#=pp.serial#(+)
and sw.sid = s.sid
and sw.inst_id = s.inst_id
order by
decode(px.QCINST_ID, NULL, px.INST_ID, px.QCINST_ID),
px.QCSID,
decode(px.SERVER_GROUP, NULL, 0, px.SERVER_GROUP),
px.SERVER_SET,
px.INST_ID
UNAME QC/Slave SlaveSet SID Slave INS STATE WAIT_EVENT WAIT_OBID QC SID QC INS Req. DOP Actual DOP
APPS_ORD QC 1936 2 WAIT PX Deq: Execute Reply 71031 1936
- p006 (Slave) 1 1731 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p007 (Slave) 1 2159 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p002 (Slave) 1 2090 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p005 (Slave) 1 1965 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p001 (Slave) 1 1934 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p004 (Slave) 1 1843 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p000 (Slave) 1 1778 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p003 (Slave) 1 1751 2 WAIT PX Deq: Execution Msg 71021 1936 2 8 8
- p009 (Slave) 2 2138 2 NOT WAIT 71031 1936 2 8 8
- p012 (Slave) 2 1902 2 NOT WAIT 71031 1936 2 8 8
- p008 (Slave) 2 1921 2 NOT WAIT 71031 1936 2 8 8
- p013 (Slave) 2 2142 2 NOT WAIT 71031 1936 2 8 8
- p015 (Slave) 2 2091 2 NOT WAIT 71031 1936 2 8 8
- p014 (Slave) 2 2122 2 NOT WAIT 71031 1936 2 8 8
- p010 (Slave) 2 2146 2 NOT WAIT 71031 1936 2 8 8
- p011 (Slave) 2 1754 2 NOT WAIT 71031 1936 2 8 8
SELECT operation_type AS type ,
workarea_address WADDR,
operation_id as OP_ID,
policy ,
vwa.sql_id,
vwa.inst_id i#,
vwa.sid ,
vwa.qcsid QCsID,
vwa.QCINST_ID QC_I#,
s.username uname,
ROUND(active_time /1000000,2) AS a_sec ,
ROUND(work_area_size /1024/1024,2) AS wsize ,
ROUND(expected_size /1024/1024,2) AS exp ,
ROUND(actual_mem_used/1024/1024,2) AS act ,
ROUND(max_mem_used /1024/1024,2) AS MAX ,
number_passes AS p#,
ROUND(tempseg_size/1024/1024,2) AS temp
FROM gv$sql_workarea_active vwa ,
gv$session s
where vwa.sid = s.sid
and vwa.inst_id = s.inst_id
order by vwa.sql_id, operation_id, vwa.inst_id, username, vwa.qcsid
TYPE WADDR OP_ID POLI SQL_ID I# SID QCSID QC_I# UNAME A_SEC WSIZE EXP ACT MAX P# TEMP
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 2 2146 1936 2 APPS_ORD 1181.22 13.59 13.59 7.46 90.98 1 320
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 2142 1936 2 APPS_ORD 1181.07 7.03 7.03 4.02 90.98 0 288
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 2091 1936 2 APPS_ORD 1181.06 7.03 7.03 4.5 90.98 0 288
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 1921 1936 2 APPS_ORD 1181.09 13.59 13.59 2.24 90.98 1 320
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 2138 1936 2 APPS_ORD 1181.16 7.03 7.03 1.34 90.98 0 288
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 1754 1936 2 APPS_ORD 1181.09 14.06 14.06 5.77 90.98 1 320
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 2122 1936 2 APPS_ORD 1181.15 6.56 6.56 .24 90.98 0 288
WINDOW (SORT) 07000003D2B03F90 7 AUTO 8z5s5wdy94ty3 1902 1936 2 APPS_ORD 1181.12 14.06 14.06 9.12 90.98 1 320
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 2142 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 2138 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 2122 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 2091 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 1921 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 1902 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 2146 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
HASH-JOIN 07000003D2B03F28 8 AUTO 8z5s5wdy94ty3 1754 1936 2 APPS_ORD 1183.24 98.64 98.64 100.44 100.44 0
sum 872.07 838.21
PGA Stats – taken 5-10 minutes later than above.
select name, decode(unit,'bytes',round(value/1048576,2)||' MB', value) value from v$pgastat
NAME VALUE
aggregate PGA target parameter 11264 MB
aggregate PGA auto target 9554.7 MB
global memory bound 1024 MB
total PGA inuse 902.21 MB
total PGA allocated 3449.64 MB
maximum PGA allocated 29155.44 MB
total freeable PGA memory 2140.56 MB
process count 107
max processes count 379
PGA memory freed back to OS 77240169.56 MB
total PGA used for auto workareas 254.14 MB
maximum PGA used for auto workareas 22797.02 MB
total PGA used for manual workareas 0 MB
maximum PGA used for manual workareas 16.41 MB
over allocation count 0
bytes processed 323796668.77 MB
extra bytes read/written 183362312.02 MB
cache hit percentage 63.84
recompute count (total) 2054320
SELECT
PGA_TARGET_FOR_ESTIMATE/1048576 ESTMTD_PGA_MB,
PGA_TARGET_FACTOR PGA_TGT_FCTR,
ADVICE_STATUS ADV_STS,
BYTES_PROCESSED/1048576 ESTMTD_MB_PRCD,
ESTD_EXTRA_BYTES_RW/1048576 ESTMTD_XTRA_MB,
ESTD_PGA_CACHE_HIT_PERCENTAGE ESTMTD_CHIT_PCT,
ESTD_OVERALLOC_COUNT O_ALOC_CNT
FROM V$PGA_TARGET_ADVICE
ESTMTD_PGA_MB PGA_TGT_FCTR ADV ESTMTD_MB_PRCD ESTMTD_XTRA_MB ESTMTD_CHIT_PCT O_ALOC_CNT
1,408 .125 ON 362,905,053 774,927,577 32 19973
2,816 .25 ON 362,905,053 571,453,995 39 709
5,632 .5 ON 362,905,053 249,201,001 59 5
8,448 .75 ON 362,905,053 216,717,381 63 0
11,264 1 ON 362,905,053 158,762,256 70 0
13,517 1.2 ON 362,905,053 153,025,642 70 0
15,770 1.4 ON 362,905,053 153,022,337 70 0
18,022 1.6 ON 362,905,053 153,022,337 70 0
20,275 1.8 ON 362,905,053 153,022,337 70 0
22,528 2 ON 362,905,053 153,022,337 70 0
33,792 3 ON 362,905,053 153,022,337 70 0
45,056 4 ON 362,905,053 153,022,337 70 0
67,584 6 ON 362,905,053 153,022,337 70 0
90,112 8 ON 362,905,053 153,022,337 70 0 -
Swap, temporary tablespace and sort operations
Hello.
I have an Oracle 8.1.7 on Linux RH7.1. I see a very interesting situation: when users begin to execute large selects with many sorts operation swapping grows, but temporary tablespace does'nt grow. As I know, when Oracle has no memory to use as "sort_area_size" it uses temporary tablespace. But looks like that when Oracle ask for memory Linux begin to swap (in order to give memory for Oracle). I mean that Oracle don't use temporary tablespace but use swap instead of it. Is it true? Is it problem? Is it Oracle, Linux or my own configuration bug? Is it better to use swap or to use temporary tablespace? What is faster?
Thanx for all advises and ideas. ANd sorry for pure Englishlogin to your database as DBA (SYS AS SYSDBA) and issue the following query:
SQL> select name, value from v$parameter where name = 'sga_max_size' ;
see the value defined for this parameter. If this is larger than what you have configured as your SGA size,
Oracle will assume that it can expand the SGA to "sga_max_size" value, and will try to expand the SGA when
required. This will result in Oracle asking more memory from the linux kernel and then linux starts to use
the swap space.
Try changing the value of this parameter and see if it helps. -
Hi All,
Can any one please explain where and why SORT operation will performed while executing below code?
PROCEDURE process_all_rows
IS
TYPE employees_aat IS TABLE OF employees%ROWTYPE INDEX BY PLS_INTEGER;
l_employees employees_aat;
BEGIN
SELECT * BULK COLLECT INTO l_employees FROM employees;
FOR index IN 1 .. l_employees.COUNT
LOOP
analyze_compensation
(l_employees(indx));
END LOOP;
END process_all_rows;
The code from below link:
http://www.oracle.com/technetwork/issue-archive/2008/08-mar/o28plsql-095155.html
Thanks in advance.Red Penyon wrote:
An associative array (formerly called PL/SQL table or index-by table) is a set of key-value pairs. Each key is a unique index, used to locate the associated value with the syntax variable_name(index).
The data type of index can be either a string type or PLS_INTEGER. Indexes are stored in sort order, not creation order. For string types, sort order is determined by the initialization parameters NLS_SORT and NLS_COMP.So then associative arrays with name-value pairs where the name is numeric, are not sorted? Why would an associative array indexed by number not be sorted? -
Why Sort operation on clustered columstore index insert?
Looking at the execution plan for a clustered columnstore index insert I noticed a Sort operation. My T-SQL has no sort and I understand that the clustered columnstore is not a sorted index. Why would there be a Sort operation in the execution plan?
This is running on:
Microsoft SQL Server 2014 - 12.0.2000.8 (X64)
Feb 20 2014 20:04:26
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)Hello,
It's because how a columnstore index works: The index is created & compressed on column Level, not on row level. SQL Server orders the data to have the same data after each other to calculate the compressed index values.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Custom exit or badi for changing the user fields in operation of process order
Hi all
I want to find a exit or badi to set default value to the user fields in operation of process order when COR1.
I have tried exit 'PPCO0001', but this exit is call after commit work, so I can not change any thing
I also tried to use badi 'workorder_update', 'before_update', but all parameters in this BADI are importing, can't be changed, I've tried to change it and then program dump.
Do you have any solution for this question?
ThanksDo a Implicit Enhancement at the PBO of this subscreen.
-
How To: Sort Numbers in Ascending Order in a Generated List
Greetings! How do I set up a Generated List of Paragraphs so that it sorts in true ascending order? What I want is:
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
I have tried every trick I can think of with the sort order listed on the reference page. But all I can get is something that sorts by individual number (ignoring the numeric value) like:
1.1
1.10
1.11
1.2
1.20
1.21
1.3
Any help is much appreciated!Hello there, Michael! Thanks so much for looking at my post! Alas, the LOP will not work. I should have explained more, but it was so complicated I thought folks would give up reading.
Here's the best I can render it without getting permission to share a good example document. I do not blame anyone if it's too cumbersome or convoluted to wade through...
This is a requirements document which has sort of a "legal" tinge to it--as the document evolves we must maintain traceability for individual requirements. This means, for example:
Version 1 - I have requirements 1 and 2.
Version 2 - I need to add a new requirement, which should appear before requirement 1 in the document. Even though it comes before requirement 1 in the document, numerically it will be requirement 3 and requirement 1 will remain requirement 1.
Version 3 - I need to remove requirement 2. Even though I now have only 2 requirements, their numbers will not change (they remain requirements 1 and 3, appearing in reverse order).
Version 4 - I need to move requirement 3 to be after requirement 1. Again, the requirements keep their original number, even though their position has changed and there is no longer a "requirement 2" number in use.
Originally, I told the team (I'm doing this for a different dept), that they would have to hand-number requirements, which they did for a while. But that was getting very cumbersome, and the scenarios above are limited to one or two occurrences per document. So I created an auto-number sequence for them to use in the initial version and added a little smoke-and-mirrors work process to take care of changes in later versions. The last bit of chicanery I cannot get to work is the index...
Even if there are no changes to the requirements after the initial version, the index still does not sort in ascending numeric order. It was working with the hand-numbered requirements because they were using leading zeros. But without being able to include leading zeros in the auto-numbering formats (I tried the "use a zero as a tab leader" solution and like to have thrown my new monitor out of the window), I cannot find a solution.
Or rather, I think the solution is "you have to hand-number requirements".
For anyone who has made it this far, I truly appreciate your time and patience!
SFT -
Sort field in maintenance order
Hello;
I want to make sort field in maintenance order as a mandatory field. But if I make it as a mandatory field, system still allows me to save the order as long as I have not clicked 'Location' tab. So there is no positive control over this field. May I know, how do I achieve this? I have even tried to put order type as the influencing field but it does not help.
Points assured.
Regards
HemantHello Hemant,
access to the SAP service marketplace via www.service.sap.com to create an OSS message. Choose link "product errors". Therefore you need an OSS user and you have to be authorized to create OSS messages.
To create an user-exit, you have to go to transaction CMOD. There you have to create a project and assign the enhancement you want to use (I'm not really sure, but I think IWO10009 is the correct one in your case - you can search the user-exits via transaction SMOD - search for IWO*).
After this you have to implement your coding and then you have to activate the project.
The implementation of the user-exit should be done by an ABAP developer.
By the way - I've had a look at the OSS. There's note 768576.
Reason and Prerequisites
The problem is caused by a missing function.
Influences set via field selection will only become effective if a screen with the corresponding fields is processed. You must also refer to the documentation defined in the corresponding Customizing area. For the location & account assignment data, no additional check is (such as with the general order header data) is realised during the saving.
Prerequisite
Via field selection you declared fields of the location & account assignment data as mandatory field, and no screen that contains these fields was passed.
Solution
By means of the example code, you must implement a corresponding mandatory field check via customer enhancement IWO10009 at the time of the order backup.
1. Create subroutine Z_IWO10009_GET_DATA_FOR_FAW in program SAPMILA0. It would be best if you create an own include ZMILA0F1 for this so that you will not have any unnecessary expenditure for future Support Packages (via Transaction SE80).
FORM Z_IWO10009_GET_DATA_FOR_FAW.
CALL FUNCTION 'CO_IH_GET_HEADER'
IMPORTING
CAUFVD_IMP = CAUFVD.
CALL FUNCTION 'CO_IH_GET_ILOA'
EXPORTING
CAUFVD_IMP = CAUFVD
IMPORTING
ILOA_WA = ILOA.
ENDFORM. "Z_IWO10009_GET_DATA_FOR_FAW
2. Create the following source code in customer enhancement IWO10009:
STATICS: XTFAWF LIKE TFAWF OCCURS 0 WITH HEADER LINE.
tables: tfawf.
DATA: wa_screen LIKE screen.
FIELD-SYMBOLS: 'A'.
perform Z_IWO10009_GET_DATA_FOR_FAW(SAPMILA0).
if xtfawf[] is initial.
SELECT * FROM TFAWF INTO TABLE XTFAWF
WHERE PROG = 'SAPMILA0'.
endif.
LOOP AT XTFAWF WHERE CUST_M = 'X'.
CALL FUNCTION 'FIELD_SELECTION_INFLUENCE'
EXPORTING
dynprogruppe = '7 '
mode = 'C'
modulpool = 'SAPMILA0'
fieldname = XTFAWF-MFELD
IMPORTING
input = wa_screen-input
output = wa_screen-output
active = wa_screen-active
required = wa_screen-required
intensified = wa_screen-intensified
invisible = wa_screen-invisible
EXCEPTIONS
OTHERS = 1.
if wa_screen-required = 1.
clear lv_mfeld.
lv_mfeld = 'CAUFVD_IMP-'.
case XTFAWF-MFELD.
when 'ILOA-AUFNR'.
lv_mfeld+11 = 'IAUFNR'.
when 'ILOA-KOKRS'.
lv_mfeld+11 = 'IKOKRS'.
when 'ILOA-BUKRS'.
lv_mfeld+11 = 'IBUKRS'.
when 'ILOA-GSBER'.
lv_mfeld+11 = 'IGSBER'.
when 'RILA0-ARBPL'.
lv_mfeld11 = xtfawf-mfeld6.
when others.
lv_mfeld11 = xtfawf-mfeld5.
endcase.
ASSIGN (lv_mfeld) TO IS INITIAL.
Message E461(IW)
with 'Mussfelder der Standort&Kontierungsdaten füllen'.
EXIT.
ENDIF.
endif.
endloop.
endif.
3. Activate the changes
Correspondingly you can implement this solution also for the order release, for example, via customer enhancement IWO10002.
Bear in mind that this is a source code proposal. It might be useful or necessary to adjust this source code to special applications.
Best regards
Stephan
Edited by: Stephan Theis on Jan 5, 2008 11:20 AM -
How to sort data in descending order when user clicks on the column heading
Hi
I have a report called "Top customers", which shows the top customers for a specific product line. It displays the customer name and one column with the total amount spent in the period for each product line. By default, the leftmost product line is sorted in descending order.
If the user wants to know who are the top customers for another product line, they simply click on the column heading to sort the list by that column.
The problem is that when you click for the first time on a sortable column heading, Apex sorts it in ascending order; you need to click on the same column heading again to sort in descending order.
Is it possible to change this behaviour and sort the data in descending order in the first click? So the users don't have to click twice...
Thanks
Luis
PS: Apex 3 running on Oracle 10.2.0Luis,
See: Can I "catch" a click on a sortable column header of a report?
Take a look at Anton Nielsen's answer with regards to hiding a column and displaying its value instead of the sortable column.
Asumming the following simple report query:
select product,sales
from <table>
Change that into:
select product
,sales*-1 as reverse_sales -- Select this one as an extra column
,sales -- Hide this column
from <table>
In your report column attributes (of column reverse_sales), html-expression, type #sales#. It then displays the normal sales. However apex will generate a 'order by 2 asc' for the first time. The '2' will refer to the sales*-1 value: sorting it asc, is the same as sorting sales descending...
Toon -
How to get F4 help for Standard Text Key of a operation based on Order type
Hi Experts,
How to get F4 help for Standard Text Key (STK) of a operation based on Order type entered in selection screen. The F4 help should give the STK of related order type. At the same time the F4 help for Task Types based on Notification type. How to acheive the above two. Please provide the table names or any search help name if exists or Function modules...
Thanks in Advance.
Regads,
BujjiHi Guys,
Any help on this...
Regards,
Bujji
Edited by: Bujji on Dec 22, 2008 12:42 PM
Edited by: Bujji on Jan 5, 2009 2:00 PM -
Re-sorting albums in chronological order?
I used to have all my iPhoto '09 albums organized in chronological order, I just added a new one to the bottom every month or so.
Unfortunately, I did something and now they're all in alphabetical order:
April 2008
April 2009
August 2008
August 2009
You get the idea.
How can I re-sort them into chronological order?do it manually
or
rename them so the alpha sort works
2009-08-31
2009-08-21
2009-07-04
etc
There is no date sort - on alpha and it can not be undone
Suggest to Apple -- iPhoto menu ==> provide iPhoto feedback
LN -
Scheduling issue for splitted operations in process order
Hello All,
I am facing problem after scheduling splitted operation in process order. The scenario is as follows.
In process order there are 5 operations. 10, 20, 30, 40 and 50. Out of the above operations 30 is splitted and two different resources are assigned to it. Control key assigned to splitted operation (30) is also scheduling relevant. Now the flow of operations will be as below.
1. Operation 10
2. Operation 20
3. Operation 30 - Operations is splitted (Resource used is A), qty to be produced - 10 kg.
a. Operation 32 - Quantity of operation 32 is changed to 5 kg. Resource used is B.
b. Operation 34 - Quantity of operation 34 is changed to 5 kg. Resource used is C.
4. Operation 40
5. Operation 50
Relationship exists between opearion 10-20, 20-30, 40-50 and between 30,32, 34 with 40. But there is no relationship exists between splitted operations 32 and 34 with any of the previous operations for eg. 10 & 20.
Issue is after scheduling all operations relationship remains maintained between operations 32, 34, 40 & 50. As operation 30 is splitted to two different operations equally total time for scheduling gets reduced but after scheduling of all operations all previous operations before operations 30 does not get resceduled? Scheduling type maintained for order is Backward Scheduling.
Please check this and guide me how all operations before operation 30 can be rescheduled as per changed timing of operations 32 and 34.
Best Regards.
Edited by: Avinash Mohite on Mar 19, 2010 12:43 PM
Edited by: Avinash Mohite on Mar 19, 2010 3:14 PMHi,
I hope u r doing in this way:
In the capacity header screen enter individual capacity as 2. then click on Got( on top of same screen) and go to individual capacites. Enter the names of two individual capacities, for example 1 and 2. These are the names of two work centres where u r splitting ur operation.
Double Click on operation 0030 and go to tab 'splitting' . Tick on ' required splitting' and enter maximum no. of splits as 2.Then go to capacity requirements assignment tab. enter the individual capacity as 1 and 2 and enter the splitted quanitites.Save and reschedule .
Check and revert.
Regards. -
Phases/operation in process order does not exist
phases/operation in process order does not exist this error coming when cor6n is using.why?
HI
After creating Master recipe in C201, under the operations tab you need to define the operations involved in recipe . along with the operation column there is phase indicator column is there which is to be selected whether this operation is phase or not...
Check and revert
Regards
Anupam Sharma -
Sort albums in recorded order?
This is one thing that annoys me and hopefully there's a solution. Perhaps a script?
Some albums (say Dark Side of the Moon for instance) MUST be played in the order that was on the album/tape/CD, whatever. I have a huge library and would love to be able to sort the albums I have in the order they SHOULD be. I already spend waaaay too much time sorting my library and making sure everything is perfect but, I can only get so anal about it.
Is there possibly a script that could sort albums into the order that the artists recorded them in? I'm thinking something that could search Amazon for albums, see the order of the songs and sort accordingly. Nice thought eh? I realize the odds of this being around are about nil but, is there any progress on something like this or a place to look? Doug's Scripts doesn't have anything that I can see along these lines.On some tunes, yes. On others, no. Some have track
numbers in correct order. Some have no track numbers.
Aha. If you have albums without track numbers, well of course iTunes won't play them in the correct order — it doesn't know what the correct order is! Every album track needs to have the "Track Number X of Y" fields filled out; otherwise, iTunes has no way of ordering the tracks within an album.
These fields should be filled in automatically when iTunes rips your CDs, since all of the track numbers are available from the CDDB. If they're not, then, yes, you'll need to edit them by hand. (I can say for sure that "Dark Side of the Moon" is in the CDDB, though, so re-importing the CD while you're connected to the internet should get you your track numbers.)
Maybe you are looking for
-
Raising custom error message in generic service initialize method of Pr&for
Dear all, I am developing the HCM process form. Is it possible to raise an error if any condition is not met in initialize method in generic service of HCM process & forms? If possible could you please provide me the steps/process. Thanks & Regards,
-
Reading Data from a flat file in UCCX
We have UCCX 7.0 and I need to do a lookup on a flat file or cvs file from a script. Can that be done or does it have to be from a database?
-
Still images used in iMovie ('09) look bad, poor quality
I'm curious why my photos look poor in iMovie? Is this just a lo-res rendering that I'm seeing on screen, or is this really how they're going to look? I'm using the photo browser in iMovie and selecting photos from both iPhoto and Aperture, just as s
-
was cutting an hour long segment with A LOT of cuts..rough draft but still didnt want 5 seconds of black in one random spot..i forgot to keep two cuts snapped together! does anyone know a way that FCP can tell you if you have a gap in your sequence?
-
User in 2 user groups always picks the rights from the group with least access -BOBJ 4.1 SP2
We have BOBJ 4.1 SP2 installed. Lets say User1 is in a role1(User group) that has restricted access(no access to design menu for WEBI report in launchpad). Works fine when User1 logs into the launchpad. Cannot see the Design menu in Launchpad. User1