How to avoid GRC provisioning dynamically
Hi All,
I have typical scenario like this:
I have integrated IDM with GRC for risk analysis and SAP system provisioning. I have various workflows where GRC provisioning framework is getting called when GRC privileges are assigned or revoke.
But in one workflow, I need to assign GRC privileges to user but I do not want "AC Submit request" to be invoked.I want privileges to be assigned to the user without sending to GRC.
Any suggestions how I can stop invoking "AC Submit Request" dynamically?
Thanks,
Dhiman Paul.
Hi jai,
Yes {A}{BYPASS_MEMBER_TASK=1} is working if we are writing directly in the To IdentityStore pass. Please find the below screenshot.
But if we are using the script and trying to set the BYPASS_MEMBER_TASK=1 then we are not able to set the value.
Below is the code:
var PrivMskey = uIS_sGet(IDStore,"MSKEYVALUE",BRolePrivilege,true);--> Used to fetch the Mskey of the privileges.
var task_property="{A}{BYPASS_MEMBER_TASK=1}";
var tempval=task_property+PrivMskey;
var SetPrivToUser = uIS_SetValue(mskey,IDStore,"MXREF_MX_PRIVILEGE",tempval);
We are calling uIS_Setvalue to assign privileges to User through Action pass.
This method is returning the following error, {A}{BYPASS_MEMBER_TASK=1}PrivMSKEY BYPASS_MEMBER_TASK=1 is getting concatenated with PrivMskey while BYPASS_MEMBER_TASK should have got set to 1.
Please find the below screenshot.
Thanks,
Dhiman
Similar Messages
-
Urgent: how to avoid automatically generate dynamic ACLs?
PIX501 v6.3(3)is configured as Easy VPN client and authentication is done on
ACS server.
Downloadable ACL is applied to this vpn h/w client after the VPN connection
is established (shown in blue colour in the sh access-list output).
However, the are 2 dynamic ACL applied to the same connection which
override the downloadable ACL as defined in the ACS server for this VPN
group.
Question: How to get rid of the 2 dynamic ACLs as shown below?
access-list dynacl128; 1 elements
access-list dynacl128 line 1 permit ip any host 218.189.206.74 (hitcnt=0)
access-list dynacl129; 1 elements
access-list dynacl129 line 1 permit ip any FBP_Staging 255.255.255.0 (hitcnt=1)I think it is not possible to avoid automatically generated dynamic ACLs, you may have to use some other interface for this or configure PIX with proper VPN configuration for client.
-
Please reply:how to avoid extra trailing spaces while using cursor sharing
i am using cursor sharing with FORCE or SIMILAR.
what is the solution to avoid extra trailing spaces without any java code change.
do we have any option in oracle to avoid extra trailing spaces during the query processing ?
I am using Oracle 10g
CURSOR SHARING is a feature in which multiple sql statements
which are same will have a shared cursor (in the library cache) for an oracle session,
i.e, the first three steps of the sql processing (hard parse, soft parse, optimization)
will be done only the first time that kind of statement is executed.
There are two ways in which similar SQL statements with different condition values can be made to "SHARE" cursor during execution:
1. Writing SQLs with Bind Variables: SQLs having no hard coded literals in them
For e.g., the query below
SELECT node.emp_name AS configid
FROM emp node
WHERE emp_no = :1
AND dept_no =
DECODE (SUBSTR (:2, 1, 3),
:3, :4,
(SELECT MAX (dept_no)
FROM emp
WHERE emp_no = :5 AND dept_no <= :6)
AND node.dept_type = :7
ORDER BY node.emp_name
Here all the variables are dynamically bound during the execution. The ":X" represents BIND Variable and the actual values are bound to the SQL only at the 4th step of the execution of the SQL.
In applications: The queries written with "?" as bind variables will be converted into ":X" and are sqls with Bind Variables.
2. The CURSOR_SHARING parameter: Only Useful for SQL statements containing literals:
For eg., the query below:
SELECT node.emp_name AS configid
FROM emp node
WHERE emp_no = 'H200'
AND dept_no =
DECODE (SUBSTR (:1, 1, 3),
'PLN', :2,
(SELECT MAX (dept_no)
FROM emp
WHERE emp_no = :3 AND dept_no <= :4)
AND node.dept_type = :5
ORDER BY node.emp_name
In the query above, there are two hard coded literals H200 , PLN. In this case when the same SQL executed with different values like (H2003 , PLN), oracle will create a new cursor for this statement and all the first three steps ( hard & soft parse and optimization plan) needs to be done again.
This can be avoided by changing the CURSOR_SHARING parameter which can be set to any of three values:
1. EXACT: Causes the mechanism not be used, i.e. no cursor sharing for statements with different literals. This is the default value.
2. FORCE: Causes unconditional sharing of SQL statements that only differ in literals.
3. SIMILAR: Causes cursor sharing to take place when this is known not to have any impact on optimization.
So, FORCE and SIMILAR values of the parameter will be helping in cursor sharing and improve the performance of the SQLs having literals.
But here the problem arises if we use the FORCE and SIMILAR other than EXACT.
alter session set cursor_sharing ='EXACT'
select 1 from dual;
'1'
1
alter session set curson_sharing='FORCE'
select 2 from dual;
'2'
2
alter session set curson_sharing='SIMILAR'
select 3 from dual;
'3'
3
So, this will give extra trailing spaces in when we retrieve from java method and any
further java processing based on the hardcoded literal values will fail. this needs lot of
effort in remodifying the existing millions of lines of code.
My question is i have to use cursor sharing with FORCE or SIMILAR and can't we do the trimming
from the oracle query processing level ?
please help me on this ?
Message was edited by:
Leeladhar
Message was edited by:
LeeladharPlease reply to this thread
How to avoid extr trailing spaces using Cursor sharing opton FORCE, SIMILAR -
How To Remap Contexts in Dynamically..
Dear Experts,
in My scenario, I have one View, this view using for both Create and Chance Options, But I map only Same Context of ctxInputCreate.
But When i Using this View on Chance mode CtxtinputCreate Context to Map to CtxinputChange.
ctxtInputChange, CtxtInputCreate are same elements and same cordiality all same..
I don't what i fallow method write or not.
for Change and Create view i am using only one context which is mapped to Create Model. When I changing time Just I Copy this context to Change Model Context. So its Working Fine. But Problem is one User Working in Two Windows on browser one Window working on Create and one Window working Change then its Conflict. so How To Avoid this Conflict.
Please Anyone Suggestion Designee time Context Mapping to Change Dynamically.
SincerelyFriends its Stupid quetion.. Sorry.. leave this thread.
Regards -
Hi how to avoid nested loops in this program to improve the performence
Hi all
How to avoide the nested loops in this programing what is the replacement for the nested loops in this program coding......
LOOP AT itb_ekpo.
READ TABLE itb_marc WITH KEY
matnr = itb_ekpo-matnr
werks = itb_ekpo-werks BINARY SEARCH.
CHECK sy-subrc = 0.
FAE 26446 fin remplacement
itb_pca-ebeln = itb_ekpo-ebeln.
itb_pca-ebelp = itb_ekpo-ebelp.
itb_pca-lifnr = itb_ekko-lifnr. "-FAE26446
itb_pca-lifnr = itb_ekpo-lifnr. "+FAE26446
itb_pca-ekgrp = itb_ekpo-ekgrp. "+FAE26446
itb_pca-dispo = itb_ekpo-dispo. "+FAE26446
itb_pca-matnr = itb_ekpo-matnr.
itb_pca-werks = itb_ekpo-werks.
Recherche du libellé article
READ TABLE itb_makt
WITH KEY matnr = itb_ekpo-matnr
spras = text-fra
BINARY SEARCH.
IF sy-subrc = 0.
itb_pca-maktx = itb_makt-maktx.
ELSE.
READ TABLE itb_makt
WITH KEY matnr = itb_ekpo-matnr
spras = text-ang
BINARY SEARCH.
IF sy-subrc = 0.
itb_pca-maktx = itb_makt-maktx.
ENDIF.
ENDIF.
IF NOT itb_ekpo-bpumn IS INITIAL.
itb_pca-menge = itb_ekpo-menge * itb_ekpo-bpumz /
itb_ekpo-bpumn.
ENDIF.
Sélect° ds la table EKES des dates de livraisons et des qtés
en transit
CLEAR w_temoin_ar.
CLEAR w_etens.
LOOP AT itb_ekes
FROM w_index_ekes.
IF itb_ekes-ebeln = itb_ekpo-ebeln
AND itb_ekes-ebelp = itb_ekpo-ebelp.
IF itb_ekes-ebtyp = text-arn.
itb_pca-eindt = itb_ekes-eindt.
w_temoin_ar = 'X'.
ELSE.
Si c'est une qté en transit alors on recupere
la quantité et la date.
IF itb_ekes-dabmg < itb_ekes-menge.
itb_pca-qtran = itb_pca-qtran + itb_ekes-menge -
itb_ekes-dabmg.
ENDIF.
IF itb_ekes-etens > w_etens.
w_etens = itb_ekes-etens.
itb_pca-dtran = itb_ekes-eindt.
ENDIF.
ENDIF.
ELSEIF itb_ekes-ebeln > itb_ekpo-ebeln
OR ( itb_ekes-ebeln = itb_ekpo-ebeln
AND itb_ekes-ebelp > itb_ekpo-ebelp ).
w_index_ekes = sy-tabix.
EXIT.
ENDIF.
ENDLOOP.
S'il n'y a pas d'AR alors récupérat° de la date livraison dans EKET.
LOOP AT itb_eket
FROM w_index_eket.
IF itb_eket-ebeln = itb_ekpo-ebeln
AND itb_eket-ebelp = itb_ekpo-ebelp.
IF w_temoin_ar IS INITIAL.
itb_pca-eindt = itb_eket-eindt.
ENDIF.
itb_pca-slfdt = itb_eket-slfdt.
Calcul du portefeuille fournisseur à partir de la
qté commandée et la qté reçue
itb_pca-attdu = itb_pca-attdu + itb_eket-menge -
itb_eket-wemng.
Calcul du montant du poste
itb_pca-netpr = itb_ekpo-netpr * itb_pca-attdu.
IF itb_ekpo-peinh NE 0.
itb_pca-netpr = itb_pca-netpr / itb_ekpo-peinh.
ENDIF.
Calcul quantité réceptionnée.
itb_pca-wemng = itb_pca-wemng + itb_eket-wemng.
Calcul du retard en nombre de jours calendaires
Le calcul du retard ne doit pas prendre en compte
le jour de livraison
ADD 1 TO itb_eket-eindt.
IF NOT itb_pca-attdu IS INITIAL
AND itb_eket-eindt LT sy-datum.
Calcul du retard en nombre de jours ouvrés
CLEAR w_retard.
CALL FUNCTION 'Z_00_BC_WORKDAYS_PER_PERIOD'
EXPORTING
date_deb = itb_eket-eindt
date_fin = sy-datum
IMPORTING
jours = w_retard.
itb_pca-rtard = itb_pca-rtard + w_retard .
ENDIF.
ELSEIF itb_eket-ebeln > itb_ekpo-ebeln
OR ( itb_eket-ebeln = itb_ekpo-ebeln
AND itb_eket-ebelp > itb_ekpo-ebelp ).
w_index_eket = sy-tabix.
EXIT.
ENDIF.
ENDLOOP.
Recherche de la derniere date de livraison.
LOOP AT itb_mseg
FROM w_index_mseg.
IF itb_mseg-ebeln = itb_ekpo-ebeln
AND itb_mseg-ebelp = itb_ekpo-ebelp.
READ TABLE itb_mkpf
WITH KEY mblnr = itb_mseg-mblnr
mjahr = itb_mseg-mjahr
BINARY SEARCH.
IF sy-subrc = 0.
IF itb_mkpf-bldat > itb_pca-bldat.
itb_pca-bldat = itb_mkpf-bldat.
ENDIF.
ENDIF.
ELSEIF itb_mseg-ebeln > itb_ekpo-ebeln
OR ( itb_mseg-ebeln = itb_ekpo-ebeln
AND itb_mseg-ebelp > itb_ekpo-ebelp ).
w_index_mseg = sy-tabix.
EXIT.
ENDIF.
ENDLOOP.
APPEND itb_pca.
CLEAR itb_pca.
FAE26446 suppression parag. suivant
ELSEIF itb_ekpo-ebeln > itb_ekko-ebeln.
w_index_ekpo = sy-tabix.
EXIT.
ENDIF.
ENDLOOP.
Fin FAE26446
ENDLOOP.
Thanks in advance for all.....Hi
these are the performance tips
Instead of using nested Select loops it is often better to use subqueries.
SELECT * FROM SPFLI
INTO TABLE T_SPFLI
WHERE CITYFROM = 'FRANKFURT'
AND CITYTO = 'NEW YORK'.
SELECT * FROM SFLIGHT AS F
INTO SFLIGHT_WA
FOR ALL ENTRIES IN T_SPFLI
WHERE SEATSOCC < F~SEATSMAX
AND CARRID = T_SPFLI-CARRID
AND CONNID = T_SPFLI-CONNID
AND FLDATE BETWEEN '19990101' AND '19990331'.
ENDSELECT.
The above mentioned code can be even more optimized by using subqueries instead of for all entries.
SELECT * FROM SFLIGHT AS F INTO SFLIGHT_WA
WHERE SEATSOCC < F~SEATSMAX
AND EXISTS ( SELECT * FROM SPFLI
WHERE CARRID = F~CARRID
AND CONNID = F~CONNID
AND CITYFROM = 'FRANKFURT'
AND CITYTO = 'NEW YORK' )
AND FLDATE BETWEEN '19990101' AND '19990331'.
ENDSELECT.
<b>Internal Tables</b>
1. Table operations should be done using explicit work areas rather than via header lines.
2. Always try to use binary search instead of linear search. But dont forget to sort your internal table before that.
3. A dynamic key access is slower than a static one, since the key specification must be evaluated at runtime.
4. A binary search using secondary index takes considerably less time.
5. LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE evaluates the specified condition internally.
6. Modifying selected components using MODIFY itab TRANSPORTING f1 f2.. accelerates the task of updating a line of an internal table.
Point # 2
READ TABLE ITAB INTO WA WITH KEY K = 'X BINARY SEARCH.
IS MUCH FASTER THAN USING
READ TABLE ITAB INTO WA WITH KEY K = 'X'.
If TAB has n entries, linear search runs in O( n ) time, whereas binary search takes only O( log2( n ) ).
Point # 3
READ TABLE ITAB INTO WA WITH KEY K = 'X'. IS FASTER THAN USING
READ TABLE ITAB INTO WA WITH KEY (NAME) = 'X'.
Point # 5
LOOP AT ITAB INTO WA WHERE K = 'X'.
ENDLOOP.
The above code is much faster than using
LOOP AT ITAB INTO WA.
CHECK WA-K = 'X'.
ENDLOOP.
Point # 6
WA-DATE = SY-DATUM.
MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.
The above code is more optimized as compared to
WA-DATE = SY-DATUM.
MODIFY ITAB FROM WA INDEX 1.
7. Accessing the table entries directly in a "LOOP ... ASSIGNING ..." accelerates the task of updating a set of lines of an internal table considerably
8. If collect semantics is required, it is always better to use to COLLECT rather than READ BINARY and then ADD.
9. "APPEND LINES OF itab1 TO itab2" accelerates the task of appending a table to another table considerably as compared to LOOP-APPEND-ENDLOOP.
10. DELETE ADJACENT DUPLICATES accelerates the task of deleting duplicate entries considerably as compared to READ-LOOP-DELETE-ENDLOOP.
11. "DELETE itab FROM ... TO ..." accelerates the task of deleting a sequence of lines considerably as compared to DO -DELETE-ENDDO.
Point # 7
Modifying selected components only makes the program faster as compared to Modifying all lines completely.
e.g,
LOOP AT ITAB ASSIGNING <WA>.
I = SY-TABIX MOD 2.
IF I = 0.
<WA>-FLAG = 'X'.
ENDIF.
ENDLOOP.
The above code works faster as compared to
LOOP AT ITAB INTO WA.
I = SY-TABIX MOD 2.
IF I = 0.
WA-FLAG = 'X'.
MODIFY ITAB FROM WA.
ENDIF.
ENDLOOP.
Point # 8
LOOP AT ITAB1 INTO WA1.
READ TABLE ITAB2 INTO WA2 WITH KEY K = WA1-K BINARY SEARCH.
IF SY-SUBRC = 0.
ADD: WA1-VAL1 TO WA2-VAL1,
WA1-VAL2 TO WA2-VAL2.
MODIFY ITAB2 FROM WA2 INDEX SY-TABIX TRANSPORTING VAL1 VAL2.
ELSE.
INSERT WA1 INTO ITAB2 INDEX SY-TABIX.
ENDIF.
ENDLOOP.
The above code uses BINARY SEARCH for collect semantics. READ BINARY runs in O( log2(n) ) time. The above piece of code can be more optimized by
LOOP AT ITAB1 INTO WA.
COLLECT WA INTO ITAB2.
ENDLOOP.
SORT ITAB2 BY K.
COLLECT, however, uses a hash algorithm and is therefore independent
of the number of entries (i.e. O(1)) .
Point # 9
APPEND LINES OF ITAB1 TO ITAB2.
This is more optimized as compared to
LOOP AT ITAB1 INTO WA.
APPEND WA TO ITAB2.
ENDLOOP.
Point # 10
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING K.
This is much more optimized as compared to
READ TABLE ITAB INDEX 1 INTO PREV_LINE.
LOOP AT ITAB FROM 2 INTO WA.
IF WA = PREV_LINE.
DELETE ITAB.
ELSE.
PREV_LINE = WA.
ENDIF.
ENDLOOP.
Point # 11
DELETE ITAB FROM 450 TO 550.
This is much more optimized as compared to
DO 101 TIMES.
DELETE ITAB INDEX 450.
ENDDO.
12. Copying internal tables by using ITAB2[ ] = ITAB1[ ] as compared to LOOP-APPEND-ENDLOOP.
13. Specify the sort key as restrictively as possible to run the program faster.
Point # 12
ITAB2[] = ITAB1[].
This is much more optimized as compared to
REFRESH ITAB2.
LOOP AT ITAB1 INTO WA.
APPEND WA TO ITAB2.
ENDLOOP.
Point # 13
SORT ITAB BY K. makes the program runs faster as compared to SORT ITAB.
Internal Tables contd
Hashed and Sorted tables
1. For single read access hashed tables are more optimized as compared to sorted tables.
2. For partial sequential access sorted tables are more optimized as compared to hashed tables
Hashed And Sorted Tables
Point # 1
Consider the following example where HTAB is a hashed table and STAB is a sorted table
DO 250 TIMES.
N = 4 * SY-INDEX.
READ TABLE HTAB INTO WA WITH TABLE KEY K = N.
IF SY-SUBRC = 0.
ENDIF.
ENDDO.
This runs faster for single read access as compared to the following same code for sorted table
DO 250 TIMES.
N = 4 * SY-INDEX.
READ TABLE STAB INTO WA WITH TABLE KEY K = N.
IF SY-SUBRC = 0.
ENDIF.
ENDDO.
Point # 2
Similarly for Partial Sequential access the STAB runs faster as compared to HTAB
LOOP AT STAB INTO WA WHERE K = SUBKEY.
ENDLOOP.
This runs faster as compared to
LOOP AT HTAB INTO WA WHERE K = SUBKEY.
ENDLOOP.
<b>Reward if usefufll</b> -
How to avoid hidden menu in framesets
Hi All,
I have modified apex template to have 3 frames in frameset. We have dropdown menus in frame2 those are hidden by frame3.
Code for frameset:
<frameset rows="15,6,79" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="/apex/f?p=&APP_ID.:102:&APP_SESSION." name="Frame1" scrolling="NO" noresize>
<frame src="/apex/f?p=&APP_ID.:10:&APP_SESSION." name="Frame2" scrolling="NO" noresize>
<frame src="/apex/f?p=&APP_ID.:107:&APP_SESSION." name="Frame3" scrolling="YES">
</frameset>How to avoid hidden frame2 dropdown menus by frame3.
pls suggest.
Thanks in advance,
Nagpnr wrote:
pls give me the sample code for frameset to avoid overlapping frames.The HTML spec is very clear:
>
Elements in the following list are entirely obsolete, and must not be used by authors
>
What part of that is unclear? Do not use <tt>frame</tt> and <tt>frameset</tt>.
In APEX terms this means using:
<li>Page 0 to render components on multiple pages.
<li>Dynamic Actions and AJAX for partial page refreshes.
<li><tt>iframe</tt> to include content from other URLs. -
How can I create classes dynamically?
Guys
My requirment is I want to create classes and their instancess too dynamically. First is it possible in Java?
If so, then my next question is how can I refer such dynamically created classes in my code to avoid compilation error.
Thanks in advance
Regards
SunilFor other ways to generate classes on runtime you could also have a look at BCEL:
http://jakarta.apache.org/bcel
And dynamic proxies:
http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html
If so, then my next question is how can I refer such
dynamically created classes in my code to avoid compilation
error.Generally the classes that you load should either implement some interface or extend some abstract class you know of at compile time so that the compiler knows what methods are available for use. If that's not possible you can only use reflection. -
How to avoid extended checks for the events used in ALV.
Hii,
I hav delvpd an alv report in which i hav used events for which i haven't declared PERFORM for the same. but when i had checkd in the Extended program checks it says that form interface is not called directly.. check for dynamic PERFORMS...
how to avoid this error in the extended check program.Another option can be calling the routine from the program itself with a check that never satisfies.
like:
if 1 = 2.
perform top_of_page.
endif.
form top_of_page.
endform.
Regards,
Joy. -
How to avoid repeatation of code
hi
My code is as mentioned below.
if l_location ='USA'
insert into location
select f1,f2,f3,f4
from usa_tab
else if l_location = 'FRANCE'
insert into location
select f1,f2,f3,f4
from france_tab f , x1_tab x
where f.id = x.id
else if l_location = 'UK'
insert into location
select f1,f2,f3,f4
from uk_tab u,y1_tab y
where u.id = y.id
end if;
how to avoid the repeatation of code here?954992 wrote:
it is an existing application. The tables can not be changed.
actually here the insert and select statements are fixed , only the from and where conditions are getting changed.
howf to avoid repeatation of the fixed code?Oracle supports features called "+partition views+" and "+instead of triggers+". This can be used to glue tables (same structure) together and select and insert against these tables via a view.
Basic example:
// tables that constitutes the partition view - a check constraint on
// country is used to specify which cities are in which table, similar
// to a partition key
SQL> create table location_france(
2 country varchar2(10) default 'FRANCE' not null,
3 city varchar2(20) not null,
4 --
5 constraint chk_france check (country in 'FRANCE'),
6 constraint pk_location_france primary key
7 ( country, city )
8 ) organization index;
Table created.
SQL> create table location_uk(
2 country varchar2(10) default 'UK' not null,
3 city varchar2(20) not null,
4 --
5 constraint chk_uk check (country in 'UK'),
6 constraint pk_location_uk primary key
7 ( country, city )
8 ) organization index;
Table created.
SQL> create table location_spain(
2 country varchar2(10) default 'SPAIN' not null,
3 city varchar2(20) not null,
4 --
5 constraint chk_spain check (country in 'SPAIN'),
6 constraint pk_location_spain primary key
7 ( country, city )
8 ) organization index;
Table created.A partition view is a view that uses union all to glue these tables together:
SQL> create or replace view locations as
2 select * from location_france
3 union all
4 select * from location_uk
5 union all
6 select * from location_spain
7 /
View created.To support inserts against the partition view, an instead-of trigger is used:
SQL> create or replace trigger insert_location
2 instead of insert on locations
3 begin
4 case :new.country
5 when 'FRANCE' then
6 insert into location_france values( :new.country, :new.city );
7 when 'UK' then
8 insert into location_uk values( :new.country, :new.city );
9 when 'SPAIN' then
10 insert into location_spain values( :new.country, :new.city );
11 else
12 raise_application_error(
13 -20000,
14 'Country name ['||:new.country||'] is not supported.'
15 );
16 end case;
17 end;
18 /
Trigger created.Rows can now be inserted into the view and the trigger will ensure that the rows wind up in the correct table.
SQL> insert into locations values( 'FRANCE', 'PARIS' );
1 row created.
SQL> insert into locations values( 'UK', 'LONDON' );
1 row created.
SQL> insert into locations values( 'SPAIN', 'BARCELONA' );
1 row created.As with a partition table, a select on a partition view that uses the "partition column" (in this case, the COUNTRY column), the CBO can prune the non-relevant tables from the view and only select against the relevant table. In the following example, the UK is used as country filter and the CBO shows that only table LOCATION_UK is used.
SQL> set autotrace on explain
SQL> select * from locations where country = 'UK';
COUNTRY CITY
UK LONDON
Execution Plan
Plan hash value: 1608298493
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 19 | 1 (0)| 00:00:01 |
| 1 | VIEW | LOCATIONS | 1 | 19 | 1 (0)| 00:00:01 |
| 2 | UNION-ALL | | | | | |
|* 3 | FILTER | | | | | |
|* 4 | INDEX RANGE SCAN| PK_LOCATION_FRANCE | 1 | 19 | 2 (0)| 00:00:01 |
|* 5 | INDEX RANGE SCAN | PK_LOCATION_UK | 1 | 19 | 2 (0)| 00:00:01 |
|* 6 | FILTER | | | | | |
|* 7 | INDEX RANGE SCAN| PK_LOCATION_SPAIN | 1 | 19 | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
3 - filter(NULL IS NOT NULL)
4 - access("COUNTRY"='UK')
5 - access("COUNTRY"='UK')
6 - filter(NULL IS NOT NULL)
7 - access("COUNTRY"='UK')
Note
- dynamic sampling used for this statement (level=2)
SQL>Oracle provides a number of methods to address flawed data models and problematic client code. However, despite this flexibility on Oracle's part, you should still consider fixing the flawed design and code - as that flaws invariable mean reducing flexibility, performance and scalability. -
i have one database table called "sms1" that table is updated every day or on daily basis it has the following fields in it:
SQL> desc sms1;
Name Null? Type
MOBILE NUMBER
RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)
SNO NUMBER
INDATE DATE
From this table the is one column "RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)" . I am splitting it into different columns like :
SQL> desc smssplit;
Name Null? Type
R VARCHAR2(2 CHAR)
C VARCHAR2(2 CHAR)
S VARCHAR2(1 CHAR)
TC VARCHAR2(3 CHAR)
NA VARCHAR2(3 CHAR)
TC2 VARCHAR2(3 CHAR)
NA2 VARCHAR2(3 CHAR)
TC3 VARCHAR2(3 CHAR)
NA3 VARCHAR2(3 CHAR)
TC4 VARCHAR2(3 CHAR)
NA4 VARCHAR2(3 CHAR)
WTHER VARCHAR2(10 CHAR)
SNO NUMBER
INSERTDATA VARCHAR2(25 CHAR)
Now I am written a procedure to insert the data from "Sms1" table to smssplit table...
CREATE OR REPLACE PROCEDURE SPLITSMS
AS
BEGIN
INSERT INTO scott.SMSSPLIT ( R,C,S,TC,NA,TC2,NA2,TC3,NA3,TC4,NA4,WTHER,SNO)
SELECT SUBSTR(RCSTCNATCNATCNATCNAWTHER,1,2) R,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,3,2) C,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,5,1) S,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,6,3) TC,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,9,3) NA,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,12,3) TC2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,15,3) NA2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,18,3) TC3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,21,3) NA3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,24,3) TC4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,27,3) NA4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,30,10) WTHER, SNO
FROM scott.SMS1 where SNO=(select MAX (sno) from SMS1);
END;
Now in order to update the second table with data from first table on regular basis I have written a job scheduler and I am using oracle 9.0. version...
DECLARE
X NUMBER;
JobNumber NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
job => X
,what => 'scott.SPLITSMS;'
,next_date => SYSDATE+1/1440
,interval => 'SYSDATE+1/1440 '
,no_parse => FALSE
:JobNumber := to_char(X);
END;
Now this job scheduler is working properly and updating the data for every one minute but it is taking or updating the duplicate values also ..like example:
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
Now I do not want the duplicate values to be updated ...and want them to ignore them.....
please I need a help on this query........How to avoid the duplicate values............Look at the posts closely:might not be needed if formatted ;)
create or replace procedure splitsms as
begin
insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
select substr(rcstcnatcnatcnatcnawther,1,2) r,
substr(rcstcnatcnatcnatcnawther,3,2) c,
substr(rcstcnatcnatcnatcnawther,5,1) s,
substr(rcstcnatcnatcnatcnawther,6,3) tc,
substr(rcstcnatcnatcnatcnawther,9,3) na,
substr(rcstcnatcnatcnatcnawther,12,3) tc2,
substr(rcstcnatcnatcnatcnawther,15,3) na2,
substr(rcstcnatcnatcnatcnawther,18,3) tc3,
substr(rcstcnatcnatcnatcnawther,21,3) na3,
substr(rcstcnatcnatcnatcnawther,24,3) tc4,
substr(rcstcnatcnatcnatcnawther,27,3) na4,
substr(rcstcnatcnatcnatcnawther,30,10) wther,
sno
from scott.sms1 a
where sno = (select max(sno)
from sms1
where sno != a.sno
); ---------------> added where clause with table alias.
end;Regards
Etbin -
How to avoid Line Items(fields) in BAPI mapping.
Hi
Does any body help me for mapping between header and line items in BAPI..
my scenario is filerfcmail(wokflow)!
File is CSV based :
(ex: 001150,,1123,JERM,08122006,,,
,,,ANN,,01082006,
If you look at example csv file , there is some fields mixed with header and line items. But in RFC header can be 1 to 1 and line item should be 0 to Unbound.
Now my problem is if I sent above example csv file as source :
The payload coming like this(sxmb_moni) :
</HEADERDATA>
- <GLACCOUNTDATA>
- <item>
<COSTCENTER />
<PROFIT_CTR />
</item>
- <item>
<GL_ACCOUNT>738100</GL_ACCOUNT>
<ITEM_AMOUNT>60000</ITEM_AMOUNT>
<COMP_CODE>001150</COMP_CODE>
<ITEM_TEXT>*777-8030-861</ITEM_TEXT>
<COSTCENTER>7320</COSTCENTER>
<PROFIT_CTR>7320</PROFIT_CTR>
<ALLOC_NMBR />
</item>
- <item>
<GL_ACCOUNT>738100</GL_ACCOUNT>
<ITEM_AMOUNT>40000</ITEM_AMOUNT>
<COMP_CODE>001151</COMP_CODE>
<ITEM_TEXT>*777-8030-861</ITEM_TEXT>
<COSTCENTER>6010</COSTCENTER>
<PROFIT_CTR>6010</PROFIT_CTR>
<ALLOC_NMBR />
</item>
<item />
</GLACCOUNTDATA>
You can find there is one more item coming after headerdata with null values. It means map reading first line and one by one , if any field found in rows which belogs to GLAccount(Line item), then it writing one more item after headerdata with that fields only.
Remainig GLAccount data coming as per map after the item .
Can you tell me how to avoid extra line items.
Thanks,
SankarYes, It exist..
I cross checked ..with out givig fileds and giving some fields...its writing another items in after headerdata tag.
hope you understand , what my problem..
See: GLACCOUNTDATA under subnode
item is 0 to unbound in BAPI side, because of this its reading all rows , and if find any field which belongs to GLAccount , then it writing another item tag after headerr data.
Thnaks,
Sankar -
Please let me know how to avoid receiving the spam (from the spam folder on the server) into my email accounts on the iPad. It is very annoying!
My server puts it in a spam folder and I do not receive it in the Ms Outlook on my desk computer...why do I get it on the iPad? Is it avoidable and how?bYou actually cannot do anything to your ipad when its locked but look at pictures the time and date, you need to restore it, and if it dosent let you restore, good luck chuck Heres how to restore it: Okay, i only know the itunes way soz, lol. Try to connect your ipad to itunes, if it does let you then you should be able to select the device you have in the corner somewhere, once you do that you should see a screen that looks sort of like your ipads setting, you should have a button that says "Restore" click that and your ipad should be restored. If that dosent work you should try going to your regular office depot or something. Good Luck!
-
How to avoid printing a blank page when there is 'no data' in the report.
how to avoid printing a blank page when there is 'no data' in the report.
try like this
if@section:IND=1
this template
end ifsectionbreak
if@section:IND=2
this template
end if -
How to avoid creation of _(file.*), coping from tiger to pc?
how to avoid the creation of this file for ever on a pc environment??
I explain: as i copy any image file, it goes to a spooler directory and that begins instantly to process the file to an OPI server, separating CMYK channels, converting it to high and low resolution...
but as this _(file) is created (same name and extension, but 0Kb and with this _ underscore in the beggining of it name), it begins to process it, and as it really does not exists as an image itself, it crashes the OPI server, forcing us to restart it...
and then, you can imagine the mess, because we're a newspaper, with more than 100 machines logged in two cities simultaneously...
thanks for those who replied last topic I posted about some softwares to delete it! it really worked!!
but now, can anyone have a clue how to DON'T create this file?
thanks in advance!
alex borba
[email protected]I believe that command is supposed to stop the creation .DS_Store files on servers. Also, I think the plist file gets written to the user ~/Library/Pref, it probably ought to exist both there and in the /Library/Pref folder to really work.
I didn't think the Save for Web option would work for your purposes. I don't believe anything will work except to strip the resource fork off the files before you send them. There is an Applescript that will do it, using a UNIX command in the script. You select a folder, run the Applescript, and it strips the resource fork off all files in the folder and creates a sub-folder called Stripped with resourceless copies of the files in the original:
-- Strip resource fork and metadata in Tiger for one file.
-- If a folder is selected creates an unresourced subfolder of the selected folder
tell application "Finder"
try
set aFile to the selection as alias
set aFolder to the container of aFile
on error
display dialog "Select a file"
return
end try
set aFile to the quoted form of POSIX path of aFile
do shell script "rsync -a " & aFile & " " & aFile & "Stripped; mv " & aFile & "Stripped " & aFile
update aFolder
end tell
The "do shell script" line must be all a single line in Script Editor. It might wrap funny in the browser. Anyway, copy it, paste into Script Editor, hit compile, and save it as an application. I've only fooled with it a little tiny bit, so I'm not sure whether the rsync process would have any strange effects on complex Photoshop and EPS files or not.
As far as I know the only way to send Mac files without resource forks to a server is to strip them from the files.
Francine -
How can avoid the problem of Parameter Prompting when I submitting ?
I am developing web application in visual studio 2008 in csharp.How can avoid the issue or problem of Parameter Prompting when I send parameters programaticaly or dyanmicaly? I am sending the values from .net web form to crystal report but it is still asking for parameters. so when i submit second time that is when the reports is being genereated. How can i solve this problem. Please help. The code Iam using is below.
1. using System;
2. using System.Collections;
3. using System.Configuration;
4. using System.Data;
5. using System.Linq;
6. using System.Web;
7. using System.Web.Security;
8. using System.Web.UI;
9. using System.Web.UI.HtmlControls;
10. using System.Web.UI.WebControls;
11. using System.Web.UI.WebControls.WebParts;
12. using System.Xml.Linq;
13. using System.Data.OleDb;
14. using System.Data.OracleClient;
15. using CrystalDecisions.Shared;
16. using CrystalDecisions.CrystalReports.Engine;
17. using CrystalDecisions.Web;
18.
19.
20. public partial class OracleReport : System.Web.UI.Page
21. {
22. CrystalReportViewer crViewer = new CrystalReportViewer();
23. //CrystalReportSource crsource = new CrystalReportSource();
24. int nItemId;
25.
26. protected void Page_Load(object sender, EventArgs e)
27. {
28. //Database Connection
29. ConnectionInfo ConnInfo = new ConnectionInfo();
30. {
31. ConnInfo.ServerName = "127.0.0.1";
32. ConnInfo.DatabaseName = "Xcodf";
33. ConnInfo.UserID = "HR777";
34. ConnInfo.Password = "zghshshs";
35. }
36. // For Each Logon parameters
37. foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo)
38. {
39. cnInfo.ConnectionInfo = ConnInfo;
40.
41. }
42.
43.
44.
45.
46.
47.
48. //Declaring varibles
49. nItemId = int.Parse(Request.QueryString.Get("ItemId"));
50. //string strStartDate = Request.QueryString.Get("StartDate");
51. //int nItemId = 20;
52. string strStartDate = "23-JUL-2010";
53.
54. // object declration
55. CrystalDecisions.CrystalReports.Engine.Database crDatabase;
56. CrystalDecisions.CrystalReports.Engine.Table crTable;
57.
58.
59. TableLogOnInfo dbConn = new TableLogOnInfo();
60.
61. // new report document object
62. ReportDocument oRpt = new ReportDocument();
63.
64. // loading the ItemReport in report document
65. oRpt.Load("C:
Inetpub
wwwroot
cryreport
CrystalReport1.rpt");
66.
67. // getting the database, the table and the LogOnInfo object which holds login onformation
68. crDatabase = oRpt.Database;
69.
70. // getting the table in an object array of one item
71. object[] arrTables = new object[1];
72. crDatabase.Tables.CopyTo(arrTables, 0);
73.
74. // assigning the first item of array to crTable by downcasting the object to Table
75. crTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[0];
76.
77. dbConn = crTable.LogOnInfo;
78.
79. // setting values
80. dbConn.ConnectionInfo.DatabaseName = "Xcodf";
81. dbConn.ConnectionInfo.ServerName = "127.0.0.1";
82. dbConn.ConnectionInfo.UserID = "HR777";
83. dbConn.ConnectionInfo.Password = "zghshshs";
84.
85. // applying login info to the table object
86. crTable.ApplyLogOnInfo(dbConn);
87.
88.
89.
90.
91.
92.
93. crViewer.RefreshReport();
94.
95. // defining report source
96. crViewer.ReportSource = oRpt;
97. //CrystalReportSource1.Report = oRpt;
98.
99. // so uptill now we have created everything
100. // what remains is to pass parameters to our report, so it
101. // shows only selected records. so calling a method to set
102. // those parameters.
103. setReportParameters();
104. }
105.
106. private void setReportParameters()
107. {
108.
109. // all the parameter fields will be added to this collection
110. ParameterFields paramFields = new ParameterFields();
111. //ParameterFieldDefinitions ParaLocationContainer = new ParameterFieldDefinitions();
112. //ParameterFieldDefinition ParaLocation = new ParameterFieldDefinition();
113.
114. // the parameter fields to be sent to the report
115. ParameterField pfItemId = new ParameterField();
116. //ParameterField pfStartDate = new ParameterField();
117. //ParameterField pfEndDate = new ParameterField();
118.
119. // setting the name of parameter fields with wich they will be recieved in report
120.
121. pfItemId.ParameterFieldName = "RegionID";
122.
123. //pfStartDate.ParameterFieldName = "StartDate";
124. //pfEndDate.ParameterFieldName = "EndDate";
125.
126. // the above declared parameter fields accept values as discrete objects
127. // so declaring discrete objects
128. ParameterDiscreteValue dcItemId = new ParameterDiscreteValue();
129. //ParameterDiscreteValue dcStartDate = new ParameterDiscreteValue();
130. //ParameterDiscreteValue dcEndDate = new ParameterDiscreteValue();
131.
132. // setting the values of discrete objects
133.
134.
135. dcItemId.Value = nItemId;
136.
137. //dcStartDate.Value = DateTime.Parse(strStartDate);
138. //dcEndDate.Value = DateTime.Parse(strEndDate);
139.
140. // now adding these discrete values to parameters
141. //paramField.HasCurrentValue = true;
142.
143.
144.
145. //pfItemId.CurrentValues.Clear();
146. int valueIDD = int.Parse(Request.QueryString.Get("ItemId").ToString());
147. pfItemId.Name = valueIDD.ToString();
148.
149. pfItemId.CurrentValues.Add(dcItemId);
150. //ParaLocation.ApplyCurrentValues;
151. pfItemId.HasCurrentValue = true;
152.
153. //pfStartDate.CurrentValues.Add(dcStartDate);
154. //pfEndDate.CurrentValues.Add(dcEndDate);
155.
156. // now adding all these parameter fields to the parameter collection
157. paramFields.Add(pfItemId);
158.
159. //paramFields.Add(pfStartDate);
160. //paramFields.Add(pfEndDate);
161. /////////////////////
162. //Formula from Crystal
163. //crViewer.SelectionFormula = "{COUNTRIES.REGION_ID} = " + int.Parse(Request.QueryString.Get("ItemId")) + "";
164. crViewer.RefreshReport();
165. // finally add the parameter collection to the crystal report viewer
166. crViewer.ParameterFieldInfo = paramFields;
167.
168.
169.
170. }
171. }Keep your post to under 1200 characters, else you loose the formatting. (you can do two posts if need be).
Re. parameters. First, make sure yo have SP 1 for CR 10.5:
https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
Next, see the following:
[Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
CR Dev help file:
http://msdn2.microsoft.com/en-us/library/bb126227.aspx
Samples:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Maybe you are looking for
-
On my desktop, I have been using Firefox V27 on Ubuntu 12.04 for some time. It uses secure sites - such as https://mozilla.org - and accepts the Security Certificates quite happily, so I am not even aware there is any issue. My new laptop is Windows
-
How do I change the order of songs in a playlist?
I know that I used to be able to drag songs to a different order in my iTunes playlists, but tonight, no matter the order that I add the songs to the playlist, or Smart Playlist, the order of the songs is alphabetically arranged, and the only other o
-
I'm currently using xf86-video-intel for my video driver, however last night I attempted to use xf86-video-nouveau for my video driver, but could not get it to work. I've followed all the steps listed in the nouveau wiki, and still can't load a GUI.
-
Downloading audiobooks from audible.com works, but now, once I get them on my desktop, they won't go to itunes. I've done this countless times and had no problem, but now I've had parts of books go to itunes and other parts stay in the downloads fold
-
Position Based Busgeting/Personnel Cost Planning
Hi, I am new to this topic and so I have some questions which may be very basic. I apologize in advance. 1. When we extract HR information from R/3 is the position information rolled up or can we get individual records by position ID? 2. Do we need