Not able to pass table name as parameter in function
Hi,
i am not able to pass tablename as parameter. I am using below function.
function count_test(tabname varchar2) return number is
l_count number;
begin
select count(*) INTO l_count FROM tabname;
RETURN l_count;
END;
You can't do it with static SQL.
The only way is to do it with dynamic SQL:
EXECUTE IMMEDIATE 'select count(*) FROM '|| tabname INTO l_count;
Regards.
Al
Edited by: Alberto Faenza on May 10, 2012 1:44 AM
Mispelling
Similar Messages
-
Is it possible to pass table name as parameter to function calls?
Let's say I would like to retrieve data from table BSAD, BSID, BSIS, BSAS with the exact same WHERE conditions.
I.E.
SELECT SINGLE * FROM bsis
WHERE bukrs = zbukrs
AND belnr = zbelnr
AND gjahr = zgjahr
AND buzei = bseg-buzei.
SELECT SINGLE * FROM bsas
WHERE bukrs = zbukrs
AND belnr = zbelnr
AND gjahr = zgjahr
AND buzei = bseg-buzei.
Is there a way that I could put them into a function and do something like?
perform select_table_bsas using 'bsas'.
perform select_table_bsis using 'bsis'.
and I should get SELECT * FROM passed from the function calls.
Thanks.Hello,
You can try something like this
DATA : LV_DBTAB1 LIKE DD02L-TABNAME.
DATA : DREF TYPE REF TO DATA.
FIELD-SYMBOLS: <ITAB> TYPE ANY TABLE. " used to store dynamic tables
LV_DBTAB1 = 'MARA'. " in caps
CREATE DATA DREF TYPE STANDARD TABLE OF (LV_DBTAB1)
WITH NON-UNIQUE DEFAULT KEY.
ASSIGN DREF->* TO <ITAB> .
* chooses only english values
SELECT * FROM (LV_DBTAB1) INTO TABLE <ITAB> WHERE SPRAS = 'E'.
here, even the internal table is dynamic, but that can be static if you know the structure for sure -
Pass table name as parameter in prepared Statement
Can I pass table name as parameter in prepared Statement
for example
select * from ? where name =?
when i use setString method for passing parameters this method append single colon before and after of this parameter but table name should be send with out colon as SQL Spec.
I have another way to make sql query in programing but i have a case where i have limitation of that thing so please tell me is it possible with prepared Statment SetXXx methods or not ?
Thanks
Haroon Idrees.haroonob wrote:
I know ? is use for data only my question is this way to pass table name as parameterI assume you mean "how can I do it?" As I have already answered "is this the way?" with no.
Well, I would say (ugly as it is) String concatenation, or stored procedures. -
Passing TABLE NAME as parameter is possible or not?
I want develop a small/simple report like this
TABLE NAME :
WHERE :
ORDER BY :
QUERY ROWS
In the above model i want to pass all the three (TABLE NAME,WHERE and ORDER BY) as a parameter.
My doubt, is that possible to pass TABLE NAME as a parameter? If so!
When i enter any TABLE NAME it has to fetch me out the records of that table (Based on WHERE condition and ORDER BY).
Is that possible to do?
Need some help!
Edited by: Muthukumar Seshadri on Aug 10, 2012 6:19 PMYes, it is possible with lexical parameters. Look in the help for examples:
SELECT Clause
SELECT &P_ENAME NAME, &P_EMPNO ENO, &P_JOB ROLE FROM EMP
P_ENAME, P_EMPNO, and P_JOB can be used to change the columns selected at runtime. For example, you could enter DEPTNO as the value for P_EMPNO on the Runtime Parameter Form.
Note that in this case, you should use aliases for your columns. Otherwise, if you change the columns selected at runtime, the column names in the SELECT list will not match the Report Builder columns and the report will not run.
FROM Clause
SELECT ORDID, TOTAL FROM &ATABLE
ATABLE can be used to change the table from which columns are selected at runtime. For example, you could enter ORD for ATABLE at runtime.
If you dynamically change the table name in this way, you may also want to use lexical references for the SELECT clause (look at the previous example) in case the column names differ between tables.
WHERE Clause
SELECT ORDID, TOTAL FROM ORD WHERE &CUST
ORDER BY Clause
SELECT ORDID, SHIPDATE, ORDERDATE, TOTAL FROM ORD ORDER BY &SORT You have to be really careful with this approach. Dynamic SQL may cause serious performance problems.
Edited by: InoL on Aug 10, 2012 10:06 AM -
Dynamic SQL : passing table name as parameter
Hi
I have a SQL query (a store procedure ) that i want to convert to PLSQL
This is a part of my SQL query that i am trying to to find a solution for it, because i cant convert it to oracle :
DECLARE lookupTableRow CURSOR FOR
SELECT TableName FROM SYS_LookUpTable
OPEN lookupTableRow
FETCH NEXT FROM lookupTableRow INTO @tableName
WHILE @@FETCH_STATUS=0
BEGIN
SET @sql='SELECT * FROM '+@tableName
EXECUTE sp_executesql @sql
IF @counter=0
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table', @tableName)
END
ELSE
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table'+CONVERT(NVARCHAR(10),@counter), @tableName)
END
SET @counter=@counter+1
FETCH NEXT FROM lookupTableRow INTO @tableName
END
CLOSE lookupTableRow
DEALLOCATE lookupTableRow
As i understand i can't use ORACLE dynamic sql (execute immediate) when the table name is a parameter
Furthermore when i execute this dynamic query in my SQL store procedure each SELECT statement return me as a result the relevant table rows , those result are different in each loop .
So i cant do this too with ORACLE dynamic sql .
Please advice for any solution
* how can i use dynamic sql with table name as parameter ?
* how can i use a "dynamic" cursor, in order to be able to display the dynamic results ?
Thanks for the adviceHi,
b003cf5e-e55d-4ff1-bdd2-f088a662d9f7 wrote:
Hi
I have a SQL query (a store procedure ) that i want to convert to PLSQL
This is a part of my SQL query that i am trying to to find a solution for it, because i cant convert it to oracle :
DECLARE lookupTableRow CURSOR FOR
SELECT TableName FROM SYS_LookUpTable
OPEN lookupTableRow
FETCH NEXT FROM lookupTableRow INTO @tableName
WHILE @@FETCH_STATUS=0
BEGIN
SET @sql='SELECT * FROM '+@tableName
EXECUTE sp_executesql @sql
IF @counter=0
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table', @tableName)
END
ELSE
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table'+CONVERT(NVARCHAR(10),@counter), @tableName)
END
SET @counter=@counter+1
FETCH NEXT FROM lookupTableRow INTO @tableName
END
CLOSE lookupTableRow
DEALLOCATE lookupTableRow
As i understand i can't use ORACLE dynamic sql (execute immediate) when the table name is a parameter
Furthermore when i execute this dynamic query in my SQL store procedure each SELECT statement return me as a result the relevant table rows , those result are different in each loop .
So i cant do this too with ORACLE dynamic sql .
Please advice for any solution
* how can i use dynamic sql with table name as parameter ?
* how can i use a "dynamic" cursor, in order to be able to display the dynamic results ?
Thanks for the advice
I have a SQL query (a store procedure ) that i want to convert to PLSQL
I doesn't help when you use one term to mean another thing.
SQL is a language used in both Oracle and other products, such as Microsoft's SQL Server. I don't know much about SQL Server, but Oracle (at least) doesn't support stored procedures in SQL itself; they have to be coded in some other language, such as PL/SQL.
As i understand i can't use ORACLE dynamic sql (execute immediate) when the table name is a parameter
If the table name is a parameter (or only known at run-time for any reason), that's exactly the kind of situation where you MUST use dynamic SQL.
The number of columns that a query produces (and their datatypes) is fixed when you compile a query, whether that query is dynamic or not. If you have multiple queries, that produce result sets with different numbers of columns, then you can't combine them into a single query. The best you can do with one query is to add NULL columns to some of the queries so they all produce the same number of columns.
If you're just displaying the results, there might not be any reason to combine separate result sets. Just display one result set after another.
Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Help passing table name as parameter to a procedure
Hello,
i'm trying to write a procedure that takes a table name as input and uses a cursor to select a column,count(1) from the passed table to the cursor. The procedure i've come up with is as follows,
CREATE OR REPLACE
PROCEDURE excur(
p_tbl user_tables.table_name%type )
AS
type rc is ref cursor;
c rc;
res BOOLEAN;
BEGIN
open c for 'SELECT columnA,COUNT(1) FROM'|| p_tbl||';';
close c;
END excur;When i try to execute it, an error pops up informing that a table cannot be used in this context. As in i cannot pass a table name as an argument to a procedure. Kindly guide as to how to solve this situation.vishm8 wrote:
Hello,
i'm trying to write a procedure that takes a table name as input and uses a cursor to select a column,count(1) from the passed table to the cursor. The procedure i've come up with is as follows,
CREATE OR REPLACE
PROCEDURE excur(
p_tbl user_tables.table_name%type )
AS
type rc is ref cursor;
c rc;
res BOOLEAN;
BEGIN
open c for 'SELECT columnA,COUNT(1) FROM'|| p_tbl||';';
close c;
END excur;When i try to execute it, an error pops up informing that a table cannot be used in this context. As in i cannot pass a table name as an argument to a procedure. Kindly guide as to how to solve this situation.Generally speaking, Dynamic code is a bad idea for a staggering number of reasons.
That aside, what do you want to return? You're selecting a column and applying an aggregate function (count) but you're not grouping, that doesn't usually work out too well.
TUBBY_TUBBZ?select owner, count(*) from all_objects;
select owner, count(*) from all_objects
ERROR at line 1:
ORA-00937: not a single-group group functionWhy do you perceive the need to be able to take in ANY table name, can't you design an application where table names are known at compile time and not run time? -
Passing Table name as parameter to proc.
Hi,
I need to know how to pass a table name to a oracle procedure.
In that procedure I will put that table name in a variable and then I will make operations on that table like DELETE, UPDATE and INSERT.
Kinldy give me the solution for the above problem as soon as possible..
Thanks & regards,
KiranYou shouldn't do it, but if you do, you can use something like this:
Anton
create or replace type my_parm as object
( name varchar2(30)
, val anydata
create or replace type my_parms as table of my_parm
create table t1( c1 number, c2 varchar2(10), c3 date )
create or replace procedure doital( p_action in varchar2, p_tab in varchar2, parms in my_parms )
is
p_stmt1 varchar2(32000);
p_stmt2 varchar2(32000);
ind pls_integer;
curs integer;
dummy integer;
t_a anytype;
t_v varchar2(32000);
t_n number;
t_d date;
begin
curs := dbms_sql.open_cursor;
if upper( p_action ) = 'I'
then
ind := parms.first;
loop
exit when ind is null;
p_stmt1 := p_stmt1 || ', ' || parms( ind ).name;
p_stmt2 := p_stmt2 || ', :b' || to_char( ind );
ind := parms.next( ind );
end loop;
p_stmt1 := 'insert into ' || p_tab || ' (' || substr( p_stmt1, 2 ) || ' ) values (' || substr( p_stmt2, 2 ) || ' )';
dbms_sql.parse( curs, p_stmt1, dbms_sql.native );
ind := parms.first;
loop
exit when ind is null;
case parms( ind ).val.GetType( t_a )
when dbms_types.typecode_varchar2
then
dummy := parms( ind ).val.GetVarchar2( t_v );
dbms_sql.bind_variable( curs, ':b' || to_char( ind ), t_v );
when dbms_types.typecode_number
then
dummy := parms( ind ).val.GetNumber( t_n );
dbms_sql.bind_variable( curs, ':b' || to_char( ind ), t_n );
when dbms_types.typecode_date
then
dummy := parms( ind ).val.GetDate( t_d );
dbms_sql.bind_variable( curs, ':b' || to_char( ind ), t_d );
end case;
ind := parms.next( ind );
end loop;
end if;
dummy := dbms_sql.execute( curs );
dbms_sql.close_cursor( curs );
end;
begin
doital( 'I', 't1', my_parms( my_parm( 'c2', anydata.ConvertVarchar2( 'testje' ) )
, my_parm( 'c1', anydata.ConvertNumber( 3 ) )
, my_parm( 'c3', anydata.ConvertDate( sysdate ) )
doital( 'I', 't1', my_parms( my_parm( 'c1', anydata.ConvertNumber( 77 ) )
, my_parm( 'c2', anydata.ConvertVarchar2( 'goedzo' ) )
, my_parm( 'c3', anydata.ConvertDate( sysdate - 5 ) )
end;
/ -
Table name as parameter to function
Hi all,
can anybody help me on the below issue..
i have a function like this:
**create or replace**
**function "IL_SUM_AVG_FN" return number is**
**cursor c1 is**
** select sum_avg_val value**
** from wel_10_tab**
** where type='1';**
**v_sum number;**
**v_count number;**
**BEGIN**
** v_sum:=0;**
** v_count:=0;**
** for i in c1 loop**
** if v_count=0 then**
** v_sum:=i.value;**
** else**
** v_sum:=abs(i.value+v_sum);**
** end if;**
** v_count:=v_count+1;**
** end loop;**
** return v_sum;**
**END;**
now my requirement is like..i want to pass a value as parameter to the function..say i will pass 10 or11 or 12
then it should change the table name in the cursor according to the parameter.i.e
if the parameter is 10 it should be: select sum_avg_val value from wel_10_tab where type='1';
if the parameter is 11 it should be: select sum_avg_val value from wel_11_tab where type='1';
if the parameter is 12 it should be: select sum_avg_val value from wel_12_tab where type='1';
parameter has only these three possible values..
how to achieve this?
please help..Hi,
you can do without execute immediate and one cursor is sufficient, if you use open cursor for ...:
set serveroutput on;
drop table TestTab1;
drop table TestTab2;
create table TestTab1 (
val number
create table TestTab2 as (select * from TestTab1 where 0 = 1);
create or replace procedure TestProc (
TableName in varchar2)
is
rec TestTab1%rowtype;
cur sys_refcursor;
curStr varchar2(1024) := 'select * from ' || TableName;
begin
open cur for curStr;
loop
fetch cur into rec;
exit when cur%notfound;
dbms_output.put_line ('value = ' || rec.val);
end loop;
end;
insert into TestTab1 (val) values (1);
insert into TestTab1 (val) values (2);
insert into TestTab1 (val) values (3);
insert into TestTab1 (val) values (4);
insert into TestTab2 (val) values (101);
insert into TestTab2 (val) values (102);
insert into TestTab2 (val) values (103);
insert into TestTab2 (val) values (104);
begin TestProc('TestTab1'); end;
begin TestProc('TestTab2'); end;
/regards,
Frank
Edited by: user8704911 on Jul 11, 2011 10:35 PM
Edited by: user8704911 on Jul 11, 2011 10:36 PM -
How to pass Table name as parameter
For example, you have several tables (TableA, TableB, TableC...TableN) that have the same structure.
Ex.
CREATE TABLE TableA(
id VARCHAR(5),
name VARCHAR(20)
CREATE TABLE TableB(
id VARCHAR(5),
name VARCHAR(20)
And you want to create a stored procedure in Oracle that can be used for all of the tables (TableA, TableB, ...)
Ex. SELECT * FROM <tablename>
WHERE ID > 1;
How do you write the prepareCall and Callable Statement for that?
Thanks in advance.You can't, not directly.
You have two choices:
-Write the SQL in java, then you can use string concatenation.
-Use 'dynamic sql' in Oracle. There is a standard package that will take dynamic sql and run it. -
Pass table name as parameter PLS-00357
create or replace
PROCEDURE universal_p (
tab IN VARCHAR2,
col IN VARCHAR2,
whr IN VARCHAR2 := NULL)
IS
TYPE cv_type IS REF CURSOR;
cv cv_type;
val VARCHAR2(32767);
BEGIN
OPEN cv FOR
'SELECT ' || col ||
' FROM ' || tab ||
' WHERE ' || NVL (whr, '1 = 1');
LOOP
FETCH cv INTO val;
EXIT WHEN cv%NOTFOUND;
IF cv%ROWCOUNT = 1
THEN
DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
DBMS_OUTPUT.PUT_LINE (
'Contents of ' ||
UPPER (tab) || '.' || UPPER (col));
DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
END IF;
DBMS_OUTPUT.PUT_LINE (val);
END LOOP;
CLOSE cv;
END;
WHEN I CALL THIS PROCEDURE I got error messasge
ORA-06550: Table,View Or Sequence reference not allowed in this context.
PLS-00357:
Can anyone can help me, please ?
WHEN
Edited by: user6446424 on 11.3.2010 13:59Works for me:
SQL> create or replace
2 PROCEDURE universal_p (
3 tab IN VARCHAR2,
4 col IN VARCHAR2,
5 whr IN VARCHAR2 := NULL)
6 IS
7 TYPE cv_type IS REF CURSOR;
8 cv cv_type;
9 val VARCHAR2(32767);
10 BEGIN
11 OPEN cv FOR
12 'SELECT ' || col ||
13 ' FROM ' || tab ||
14 ' WHERE ' || NVL (whr, '1 = 1');
15
16 LOOP
17 FETCH cv INTO val;
18 EXIT WHEN cv%NOTFOUND;
19 IF cv%ROWCOUNT = 1
20 THEN
21 DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
22 DBMS_OUTPUT.PUT_LINE (
23 'Contents of ' ||
24 UPPER (tab) || '.' || UPPER (col));
25 DBMS_OUTPUT.PUT_LINE (RPAD ('-', 60, '-'));
26 END IF;
27 DBMS_OUTPUT.PUT_LINE (val);
28 END LOOP;
29
30
31 CLOSE cv;
32 END;
33
34 /
Procedure created.
SQL> exec universal_p('EMP','ENAME')
Contents of EMP.ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
PL/SQL procedure successfully completed.
SQL> select * from v$version
2 ;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - ProductionMax
http://oracleitalia.wordpress.com -
Pass table name as a parameter to function
Is there a way to pass table name as a parameter to functions? Then update the table in the function.
Thanks a lot.
JiaxinHi, Harm,
Thank you very much for your suggestion and example. But to get my program work, i need to realise code like follows:
CREATE OR REPLACE FUNCTION delstu_func(stuno char) RETURN NUMBER AS
BEGIN
EXECUTE IMMEDIATE 'DELETE FROM student s' ||
'WHERE' || 's.student_number' || '=' || stuno;
LOOP
DBMS_OUTPUT.PUT_LINE('record deleted');
END LOOP;
END;
SELECT delstu_func('s11') FROM STUDENT;
The intention is to check if such a function can perform operations such as update, delete and insert on occurence of certain values. When executing the above statement, the system returns an error message:
ERROR at line 1:
ORA-00933: SQL command not properly ended
ORA-06512: at "SCMJD1.DELSTU_FUNC", line 3
Could you tell me where is wrong?
Jiaxin -
hi
Can any one plz suggest me , how to pass
table name (that would be varchar) to a procedure,such that i
should be able to do DML and DDL on the table refered !!EXECUTE IMMEDIATE executes the SQL statement held in a specified
VARCHAR2. So, with a bit of string concatenation, you can make
the statement dynamic, thus:
EXECUTE IMMEDIATE 'DELETE * FROM emp' ;
could become:
EXECUTE IMMEDIATE 'DELETE * FROM '||p_table_name ;
where p_table_name is a VARCHAR2 parameter passed into your
procedure. Check out the PL/SQL User's Guide and Reference,
chapter 10, for full details. -
Not able to pass portal login page with valid credentials using WebDispatch
Hi,
We are implementing SAP BillerDirect Portal. To make BillerDirect Portal available over the internet, we Configured SAP WebDispatcher with SSL termination. We followed the steps mentioned in SAP Help Documentaion for SAP WebDispatcher with SSL termination.
http://help.sap.com/saphelp_nw2004s/helpdata/en/76/6d4fa247d0d647b5bd40745400d873/frameset.htm
We created certificate and send it to CA (TrustCenter CA). We received the CA response and we imported the certificate.
AS mentioned in the help document, we configured the SAP Web Dispatcher profile to support SSL termination
We tried to access our BillerDirect Portal over the internet using below link
https://company.com/bd
We are getting login page, once we enter correct user ID and Password, portal is not loading (not going to next page) portal remains on same login page.
If we enter invalid credentials portal login page is giving u201CUser Authentication Failedu201D error.
If we try to access any portal login pages which brings a pop-up for login, login gets succeeded and we are able to see next pages
Examples
1) https://company.com/bd/admin/xcm/init.do
2) https://company.com/monitoring/SystemInfo
All pages which bring up portal login page without pop-up, not able to pass through portal login screen.
We Tried the ProxyMapping option on Dispatcher using Visual admin. This option also didnu2019t work for us.
Here is the WebDispatcher Profile
SAPSYSTEMNAME = xxx
SAPGLOBALHOST = xxxxx
SAPSYSTEM = 00
INSTANCE_NAME = W00
DIR_CT_RUN = $(DIR_EXE_ROOT)\$(OS_UNICODE)\NTI386
DIR_EXECUTABLE = $(DIR_CT_RUN)
Accesssability of Message Server
rdisp/mshost = hostnameofportalserver with FQDN
ms/http_port = 8101
Configuration for medium scenario
icm/max_conn = 500
icm/max_sockets = 1024
icm/req_queue_len = 500
icm/min_threads = 10
icm/max_threads = 50
mpi/total_size_MB = 80
SAP Web Dispatcher Ports
icm/server_port_0 = PROT=HTTPS,PORT=443
icm/server_port_1 = PROT=HTTP,PORT=80
icm/HTTPS/verify_client = 0
SAP Web Dispatcher Web Administration
icm/HTTP/admin_0 = PREFIX=/sap/wdisp/admin,DOCROOT=D:\usr\sap\xxx\W00\data\icmanroot\admin,AUTHFILE= D:\usr\sap\xxx\SYS\global\security\data\icmauth.txt
Parameters for the SAP Cryptographic Library
ssl/ssl_lib = D:\usr\sap\xxxW00\sapcrypto.dll
ssl/server_pse = D:\usr\sap\xxx\W00\sec\SAPSSLS.pse
ssf/name = D:\usr\sap\xxx\W00\sec\SAPSSLS.pse
ssf/ssfapi_lib = D:\usr\sap\xxx\W00\sapcrypto.dll
sec/libsapsecu = D:\usr\sap\xxx\W00\sapcrypto.dll
wdisp/ssl_cred = D:\usr\sap\xxx\W00\sec\SAPSSLC.pse
Parameters for Using SSL to the backend server
wdisp/ssl_encrypt = 1
wdisp/ssl_auth = 1
wdisp/ssl_cred = D:\usr\sap\xxxW00\sec\SAPSSLC.pse
wdisp/ssl_certhost = hostnameofportalserver with FQDN
wdisp/ssl_ignore_host_mismatch = true
#ICM Parameters
icm/HTTP/j2ee_0 = PREFIX=/, HOST =hostnameofportalserver with FQDN PORT=50000,SPORT=50001, SSLENC=1,TYPE=1, CRED =D:\usr\sap\xxx\W00\sec\SAPSSLC.pse
We also tried below options in WebDispatcher profile but we are getting same problem.
wdisp/add_client_protocol_header = true
wdisp/add_clientprotocol_header = 1
wdisp/ssl_ignore_host_mismatch = true
#ICM Parameters
icm/HTTPS/forward_ccert_as_header = true
icm/HTTPS/trust_client_with_issuer = *
icm/HTTPS/trust_client_with_subject = *
we also tried
wdisp/ssl_encrypt = 0
wdisp/ssl_auth = 0
we also tried
wdisp/ssl_encrypt = 2
wdisp/ssl_auth = 2
We are not able to resolve issue. Please help us on resolving this issue.
Thanks
Praveen' in Host Names is not allowed. Our hosname has '_'.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/67/be9442572e1231e10000000a1550b0/frameset.htm -
Not able to Pass Reference Variables to Deferred task
Hi All,
I am not able to Pass the reference variables to Deferred task, With the following code, I am getting null values (for the passed refs) in Deferred Task.
Code is as:
<Action id='1' name='Set Deferred Task Action' application='com.waveset.session.WorkflowServices'>
<Argument name='op' value='addDeferredTask'/>
<Argument name='type' value='User'/>
<Argument name='name' value='$(empId)'/>
<Argument name='authorized' value='true'/>
<Argument name='task' value='WF_User Deferred Task'/> // Task defination
<Argument name='date'>
<Date>2008-11-19T14:50:18.840Z</Date>
</Argument>
<Argument name='taskDefinition'>
<block trace='true'>
<defvar name='usrObject'> // This is the variable I am passing to 'WF_User Deferred Task'
<new class='com.waveset.object.GenericObject'/>
</defvar>
<invoke name='setAttributes'>
<ref>usrObject</ref>
<map>
<s>accId</s>
<ref>empId</ref>
<s>updStatus</s>
<ref>newStatus</ref>
</map>
</invoke>
</block>
</Argument>
</Action>
<Transition to='End'/>
Please suggest me.
Thanks,
Ravi.yeah, you don't have your usrObject available in the deffered task however all variables that you put inside the usrObject are avialble. Like <ref>accId<ref> and <ref>updStatus</ref>. If you still need them organized hierarchically, you might try to add one more level to the object before passing it to addDefferedTask
<block>
<defvar name='objWrapper'>
<new class='com.waveset.object.GenericObject'/>
</defvar>
<defvar name='usrObject'>
<new class='com.waveset.object.GenericObject'/>
</defvar>
<invoke name='setAttributes'>
<ref>usrObject</ref>
<map>
<s>accId</s>
<s>yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy</s>
<s>updStatus</s>
<s>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</s>
</map>
</invoke>
<invoke name='setAttributes'>
<ref>objWrapper</ref>
<map>
<s>usrObject</s>
<ref>usrObject</ref>
</map>
</invoke>
<ref>objWrapper</ref>
</block>I hope you ve got the idea. Cheerz. -
Passing proc name as parameter
I have a procedure emp_proc,
Is there a way to write a working procedure of following type:
procedure mgr_proc(get_proc_name varchar2) is
begin
get_proc_name; --(this won't work,and this is where i need help)
end;
I need to be able to pass emp_proc as a parameter to mgr_proc and get
it executed inside mgr_proc.
thanksWhile this is often (if not generally) a bad idea, you can use dynamic SQL here, i.e.
BEGIN
EXECUTE IMMEDIATE 'BEGIN ' || get_proc_name || '(<<parameter list>>) END;';
END;Justin
Maybe you are looking for
-
Multi data sources with a mismatch of fields
Post Author: [email protected] CA Forum: General Hi, I'm writing a crystal report (using crystal XI), pulling data from two different databases. The first issue is how to display these concurrently - I'm guessing the best option is to build t
-
Errors in stand by alert.
though my 4 node stand by database is sync with 4 node primary.. my alert log on the stand by database filling with this erros.. RFS[1]: Archived Log: '/archive/kftscp_1/2_1490_690902567.dbf' Primary database is in MAXIMUM PERFORMANCE mode RFS[1]: No
-
Can not import nef files to lightroom 5.6 with Nikon D750, help?
Just bought Nikon D750 and tried to import nef from camera to lightroom 5,but couldn't find files. Afterwords I upgraded to lightroom 5.6, still noughing. Is the camera to new for the program or is there a fix?
-
How to archive the workitems?
Hi All, Can anyone of you let me know how to archive the workitems? Thanks, Venkatesh
-
No funciona adobe encore CS4 con windows 7
Hola amigos: ya solucioné el tema con photoshop y premiere. Me sigue quedando el adobe encore que no quiere arrancar con el windows 7 instalado. Me dice que hay problema de incompatibilidad. ¿Alquien tiene la solución?. Desde ya muy agradecido. Javie