UDB scalar functions and parameter markers
Hello,
While using Prepared Statements in combination with UDB scalar functions (translate UDB function, for example), I get a Parameter marker error. The SQL statement works fine as an independent query.
SQL Query example from UDB manual used as is:
UPDATE EMPLOYEE
SET LASTNAME = TRANSLATE(CAST(? AS VARCHAR(12)))
WHERE EMPNO = ? When the above query is used as a Java prepared statement, an invalid parameter marker error occurs.
Any ideas?
Thanks.
Personally, I'd try that SQL as:
UPDATE EMPLOYEE
SET LASTNAME = CAST (UPPER(?) AS VARCHAR(12) )
WHERE EMPNO = ? not least because it makes the action of the translation explicit, but mostly because other DBs that have a TRANSLATE function don't support the "1 parameter implicitly means upper case" form you're using (at first, I thought you were getting a bogus message for a mangled function call, but then I dug out the old DB2 docs and saw what the hell the TRANSLATE was intended to do here..)
Also, my (old) reference doesn't list a CAST function, although it's certainly not up to date; instead it shows casting done in this style:
UPDATE EMPLOYEE
SET LASTNAME = VARCHAR (UPPER(?) , 12)
WHERE EMPNO = ? It doesn't show a VARCHAR2 function either, but I'd guess they're type-compatible in this application... hope this gives you something else to try...
Similar Messages
-
How to call PL/SQL function and pass parameter to ODI variable?
Can I call PL/SQL function and assign a return value to an ODI variable? Also can I assign ODI variable to IN paramter and assign OUT parameter to ODI variable? What ODI doc has that information?
ThanksHi,
Refer this http://odiexperts.com/how-to-use-plsql-procedures-and-functions-in-odi
Thanks,
Sutirtha -
Class overhead, function overhead and parameter overhead
Hi all,
I am interested in class overhead, function overhead (each function in a class) and parameter overhead (each parameter in function).
I saw somewhere that class overhead are 200 bytes.
Is it wise to give up on class and go for functional programming? (Only classes required to run the j2me app are created and nothing else)
How does function get called? Does it work like a stack? Where each parameters get pushed into the stack and later on pop out when control pass on to the function?
If your program is full of functions doesn't this make it very processor intensive?
What is the best solution?
Thanks in advance!Hallo,
silly question: but what exactly do you mean when you say "full of attributes and methods that will never be used for this instance"?
I assume that when you have created your class you thought about the attributes and methods you wanted to include, and have not included any unnecessary baggage. I can only think that, perhaps, you have a class X that you would like to reuse, because it does all that you want. The only problem is that, for your specific problem, it carries a lot of excess baggage with it. You only need a few of the attributes and methods. Am I correct?
Such a class reuse will certainly incur some overheads, but let us try to analyse where they are:
1. Extra Code. The 'big' class is already defined and probably already loaded, so there should not be any overheads for the code.
2. Extra Data. Certainly creating a new instance of the 'big' class will require more memory. The question is how big is 'big' class, and how many instances do you want to create or have in existance at any one time? If the class is less than a few kB big and you only need a few instances at any one time, then you can afford to ignore the overhead.
3. Performance. Every time that you create an instance of the 'big' class, the processor must do some work to initialize it. The question is, what is required to initialize the class? This depends on what is in the constructor.
4. Programmer Time. If there is an existing class, then it will (probably, depending on documentation) take less time to reuse the class
than to write another, streamlined class. Someone else will already (hopefully) have debugged the 'big' class.
I think my view would be to reuse 'big' class unless there good grounds not to do so (see above). Your time is more important than a few overheads. -
User-Defined Function and Context Manipulation
Hi Mapping Gurus, I need your help.
I have a user-defined function and one of my input parameter (c) is in a loop (EDI segment). So one, if I execute my function I get:
Exception:[java.lang.ArrayIndexOutOfBoundsException: 0]
If I change the context or use the remove context node function its working but its always taking the first row in consideration since I'm using c[0] . Here is the logic:
String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[0]"'";
So since c is an array [], I have tried different logic to get to the right row.
1- I tried using another parameter (e) to pass a counter or an index to my function. So each time it's looping, it's passing a new value to the function but Im still getting the first row and Im not to sure why?
int G = Integer.parseInt(e[0]); // e[] = My counter field
String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
2- I tried using a parameter stored in the container:
String Num;
Num = (String)getParameter(counter);
if (Num == null) G = 0;
else
G = Integer.parseInt(Num);
G = G + 1;
String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
Num = "" + G;
setParameter(e[0], Num);
and Im still getting the first one, look like its using a different container each time its looping so the Value is always the same?
4- I created a new user-defined function with the container logic, then its working but Im back to the same problem in my main function, its only looking at e[0] for my counter all the time.
5- I tried using the Seeburger Java Variables and guess what in the main fonction, as new UDF,... and guess what, same result!
So anybody out there that was able to get UDF's working into a multiple context scenario?
Am I missing something?
I will reward points and beer for any help!This is one of the text with passing a counter to the function to try to go to the right row in the array since I'm doing a remove context and I'm getting all the d_234's:
public void ReadTable(String[] a,String[] b,String[] c,String[] d,String[] e,ResultList result,Container container){
int G = Integer.parseInt(e[0]); // My counter
String var;
String DBTABLE = a[0];
String lookUpField = d[0];
String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
Now this one was with the internal container logic:
int G;
String DBTABLE = a[0];
String lookUpField = d[0];
String Num;
Num = (String)getParameter(e[0]);
if (Num == null) G = 0;
else
G = Integer.parseInt(Num);
G = G + 1;
Num = "" + G;
setParameter(e[0], Num);
String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
And now with the Seeburger Variables:
int G;
try {
VariableBean be=VariableFactory.getVariableInstance("");
G = Integer.parseInt(String.valueOf(be.getStringVariable("yves")));
} catch (Exception f) {
throw new RuntimeException(f);
String DBTABLE = a[0];
String lookUpField = d[0];
String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
try {
G = G + 1;
Num = "" + G;
VariableBean be=VariableFactory.getVariableInstance("");
be.setStringVariable("yves",Num);
catch (Exception f) {
throw new RuntimeException(f);
All 3 logics were returning always the first row or a counter of 1 if the logic is in the main ReadTable function. -
Hi All,
I have a function and a column with same name. No parameter passing into the function but function return type is number. I have a column name same as function name and datatype also number. In my query i want to use the return result of function when i am selecting from the table which have the column.
Can any body tell me how to do. Both are in same user.
Thanks in Advance
RkI've always known the French were weird, but shift for a period?That's not all, its shift for all the numbers too and a bunch of letters are swapped.
http://www.forlang.wsu.edu/help/kfrench.gif
I first used unix and vi on a French system, spent all my time looking down at the keyboard and couldn't understand why I kept deleting the wrong character when switching from insert to edit mode after making a typo of which there were plenty.
Finally I caught the cursor moving back one space when in edit mode, I have hated vi ever since. -
Calling functions and inserting tables based on values entered
Hello Everyone,
I am creating a function as below:
create or replace function func(flags in number,Ctry in varchar2) return number
is
maxv number;
flagv number;
begin
flagv:=1;
select max(num) into maxv from A;
if flags =1 then
insert into A(num,nam) values(maxv+1,Upper(Ctry));
else
flagv:=0;
end if;
return flagv;
end;
The function takes two parameters-The first one will be either 0 or 1.The second one will be name of a country.
If the first parameter is 1 then we would insert the country name passed, to the table name A.If its 0 then no insertion occurs and the function would return a value 0.
On compiling the function I get a success!.
When I do a
SQL>select distinct func(0,'UK') from B;
it works well and returns 0
However when I do
SQL>select distinct func(1,'UK') from B;
I expect an output of 1 & also expect UK to be inserted as anew row in the table A.However It throws an error saying "ORA-14551: cannot perform a DML operation inside a query .."
It is very important for me to use select to call the function, as my application would fire a select with that function and based on the value entered would insert or not insert at the back end.
Is there any way out to do this??
variable temps number
exec :number :=func(1,'UK');
does work but I cant use this in my application.
Hope you can help! Thanks!create or replace function func(flags in number,Ctry in varchar2) return number
is
PRAGMA AUTONOMOUS_TRANSACTION;
maxv number;
flagv number;
begin
flagv:=1;
select max(num) into maxv from A;
if flags =1 then
insert into A(num,nam) values(maxv+1,Upper(Ctry));
COMMIT;
else
flagv:=0;
end if;
return flagv;
end;
Is the above changes in BOLD enough or I need to do something else too in order to incorporate the autonomous transaction??
I am not too familiar with autonomous transaction.Could you please suggest the changes I need if any more required??
Thanks a ton for your suggestions!
Message was edited by:
user579245
Message was edited by:
user579245 -
How to call package function and procedure by PL/SQL
Dear all,
I created a package and I want test it by a select statement. e.g. select packagename.function(1, 'A') . However, there is an error message. "ORA-14551: cannot perform a DML operation inside a query ".
In the package, there is a function and I passed two parameters to the function and return a number. These two parameters will be used in the cursor select statment. Is there sth wrong that I use the cursor with the parameters? What can I do then?
On the other hand, I want to test the package procedure by using select statement in SQL Plus. How can I call it (with parameter)?
Remark: I am using Oracle 8i.
Thanks for advance!!
Regrads.Hi!
I don't know why it is not running in ur computer. Pls check the script --
SQL> ed
Wrote file afiedt.buf
1 create or replace package pack_test
2 is
3 function try_test(eno in number,depno in number)
4 return number;
5* end;
SQL> /
Package created.
SQL> create or replace package body pack_test
2 is
3 function try_test(eno in number,depno in number)
4 return number
5 is
6 saln number(10);
7 begin
8 select sal
9 into saln
10 from emp
11 where empno = eno
12 and deptno = depno;
13
14 return saln;
15 end;
16 end pack_test;
17 /
Package body created.
SQL>
SQL> select pack_test.try_test(7777,30) from dual;
PACK_TEST.TRY_TEST(7777,30)
3456-it is working fine in my system.
Regards.
Satyaki De. -
Can I add special character "$" in the function module parameter name??
Hi Friends
Can I add special character "$" in the function module parameter name??
awaiting for your reply,
Regards
Praveen>
prashanth kishan wrote:
> Thomas,
> ... What if Praveen passes the $ parameter in that unknown FM and suddenly theres smoke coming from the rear of the CPU? Who's answerable to that??
>
> pk
Blame Canada! -
Oracle stored functions and where clauses
Hello everybody,
I need to call an Oracle stored function and at the same time do a select on
the result of the query, it works well except when I use a where clause. I
am connecting to Oracle 8.1.7 through OLEDB using the Oracle provider for
OLEDB distributed with this Oracle version.
Here is the query I am doing:
select * from {call MC.SEC.QryTermbases(?, ?) where ID = ?}
If I remove the where clause it works well but I need to use the where. I
know that I could pass the parameter to the procedure instead of doing that
in the select but there are places where I can not do that since the SQL
query is generated dynamically. The code above is just a demo.
Thanks very much for your help,
Jose.Thanks for answering, it is actually possible to do a select on the return of a function, I have tested it with other than "select *" and it has worked well. What has not worked for me is using a "where" clause. That is "select" without "where" has worked but not with the "where".
I also suspect that it does not work but similar queries work well in MSSQL 2000 and Interbase 6.0 so I thought may be there was a way to do that with Oracle. That is in MSSQL I can treat the result of a function as a normal table and I can do the same thing with a stored procedure that returns a recordset in Interbase.
Thanks again for answering,
Jose. -
FUNCTION and OUT %ROWTYPE
Best Regards.
I tried running an Oracle function in. Net this function has an OUT parameter of type ROWTYPE, when I try to run the function always takes me the following error and
ORA-06550: line 1, column 15:
PLS-00306: wrong number or types of arguments in call to 'CONSULTAR_DIRECCION'
ORA-06550: line 1, column 15:
PLS-00306: wrong number or types of arguments in call to 'CONSULTAR_DIRECCION'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The code I'm using is this:
C#
OracleConnection conexion = new OracleConnection(StrCred);
conexion.Open();
OracleCommand comando = new OracleCommand();
comando.CommandText = "MP_DIRECCIONES_PKG.CONSULTAR_DIRECCION";
comando.CommandType = CommandType.StoredProcedure;
comando.Connection = conexion;
comando.Parameters.Add("DIRSTANDEPM", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.Input);
comando.Parameters.Add("MUNICIPIO", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.Input);
comando.Parameters.Add("DEPARTAMENTO", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.Input);
comando.Parameters.Add("RC_MP_DIRECCION", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Output);
comando.Parameters.Add("RETURN_VALUE", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.ReturnValue);
comando.Parameters[0].Value = DIRSTANDEPM_;
comando.Parameters[1].Value = MUNICIPIO_;
comando.Parameters[2].Value = DEPARTAMENTO_;
comando.ExecuteNonQuery();
conexion.Close();
and when I run it I get the above error. This is the function I'm using Oracle
FUNCTION CONSULTAR_DIRECCION(DIRSTANDEPM IN VARCHAR2, MUNICIPIO IN VARCHAR2, DEPARTAMENTO IN VARCHAR2,RC_MP_DIRECCION OUT MP_DIRECCION%ROWTYPE)
RETURN VARCHAR2 IS
vError VARCHAR2 (100);
-- Obtiene información del elemento a consultar
CURSOR cudireccion (wdirstandarepm MP_DIRECCION.DIRECCION%TYPE, wmunicipio MP_DIRECCION.MUNICIPIO%TYPE,
wdepartamento MP_DIRECCION.DEPARTAMENTO%TYPE)IS
SELECT *
FROM MP_DIRECCION
WHERE DIRECCION=wdirstandarepm AND MUNICIPIO=wmunicipio AND DEPARTAMENTO=wdepartamento ;
BEGIN
RC_MP_DIRECCION := NULL;
--abre el cursor
OPEN cudireccion(DIRSTANDEPM, MUNICIPIO, DEPARTAMENTO);
FETCH cudireccion INTO RC_MP_DIRECCION;
CLOSE cudireccion;
IF RC_MP_DIRECCION.CODINSTALACION IS NULL THEN
RETURN ('NO EXISTE INFORMACION PARA LA DIRECCION CONSULTADA: '||DIRSTANDEPM);
ELSE
RETURN NULL;
END IF;
EXCEPTION
WHEN OTHERS THEN
--vError := PKG_SIGMA_LOG.almacenar_error (SQLCODE,'CONSULTA','Error al consultar la direccion por dirección EPM: ' || SQLERRM,
--'FUNCION CONSULTAR DIRECCION POR DIRECCION EPM',NULL, DIRSTANDEPM, municipio, RC_MP_DIRECCION.Codinstalacion);
--RAISE_APPLICATION_ERROR(-20001,SUBSTR (SQLERRM||' * INCONSISTENCIA AL CONSULTAR DIRECCION POR DIRECCION ESTANDAR EPM', 1,1000));
null;
END;
Please who can help me to know how I should return the parameter value RC_MP_DIRECCION MP_DIRECCION% ROWTYPE OUT. Net?
Many thanks and blessings.Hi refer this Blogs for ur querry
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
<b>also refer these, as i replied earlier</b>
/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Also, you can check Sriram's blog for executing Stored Procedures,
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
This blog might be helpfull on stored procedures for JDBC
JDBC Stored Procedures
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
Please go through these threads and see if it helps...
Re: How to execute Stored Procedure?
Re: Problem with JDBC stored procedure
http://en.wikipedia.org/wiki/Stored_procedure
Thanks
pls reward if useful -
Exact difference between function and procedure
exact difference between function and procedure(real time diff.....not like return value, dml....) and function do some work at the same time that work also do procedure..why function
ranitB wrote:
1. Function is called Inline a query. A return value is must.
But, procedure may/may not contain a return value.Not true.
A function may be called in a query providing it meets certain limitations (no DDL, or transactional statements such as commit/rollback etc.).
A function does not have to be called from a query, it can be called from other PL/SQL code or from other external applications.
Regular functions must return a value, though pipelined functions do not...
SQL> CREATE OR REPLACE TYPE split_tbl IS TABLE OF VARCHAR2(32767);
2 /
Type created.
SQL> CREATE OR REPLACE FUNCTION split (p_list VARCHAR2, p_delim VARCHAR2:=' ') RETURN SPLIT_TBL PIPELINED IS
2 l_idx PLS_INTEGER;
3 l_list VARCHAR2(32767) := p_list;
4 l_value VARCHAR2(32767);
5 BEGIN
6 LOOP
7 l_idx := INSTR(l_list, p_delim);
8 IF l_idx > 0 THEN
9 PIPE ROW(SUBSTR(l_list, 1, l_idx-1));
10 l_list := SUBSTR(l_list, l_idx+LENGTH(p_delim));
11 ELSE
12 PIPE ROW(l_list);
13 EXIT;
14 END IF;
15 END LOOP;
16 RETURN;
17 END SPLIT;
18 /
Function created.
SQL> SELECT column_value
2 FROM TABLE(split('FRED,JIM,BOB,TED,MARK',','));
COLUMN_VALUE
FRED
JIM
BOB
TED
MARK... whilst the definition of the function shows a return type, the return statement inside the function simply returns, without a value. That's because the data is passed back through a special "pipeline", and you can write code to show that the data is available to a query as soon as it's piped, and before the function has completed (reached the return statement) if you like.
A procedure does not return a value (And no an OUT parameter is not a "returned" value, it's a writeable parameter, there's a difference)
2. There are some limitations in functions which is possbl through procedures.
Like - Oracle doesn't support DML in functions called in Select queries (using PRAGMA AUTONOMOUS_TRANSACTION will help).Not strictly true. and SQL query is considered to be DML, so a function could perform a query and then be used inside another query...
SQL> ed
Wrote file afiedt.buf
1 create or replace function f_dname(p_deptno in number) return varchar2 is
2 v_dname varchar2(10);
3 begin
4 select dname into v_dname
5 from dept
6 where deptno = p_deptno;
7 return v_dname;
8* end;
SQL> /
Function created.
SQL> ed
Wrote file afiedt.buf
1* select empno, ename, f_dname(deptno) as dname from emp
SQL> /
EMPNO ENAME DNAME
7369 SMITH RESEARCH
7499 ALLEN SALES
7521 WARD SALES
7566 JONES RESEARCH
7654 MARTIN SALES
7698 BLAKE SALES
7782 CLARK ACCOUNTING
7788 SCOTT RESEARCH
7839 KING ACCOUNTING
7844 TURNER SALES
7876 ADAMS RESEARCH
7900 JAMES SALES
7902 FORD RESEARCH
7934 MILLER ACCOUNTING
14 rows selected.It's been discussed many times on the forum... my favourite here...
{message:id=1668675}
Edited by: BluShadow on 17-Sep-2012 09:22 -
Calling Oracle function and Procedure using OCCI with in C++ code
Could any body send me the sample code to create and execute Oracle function and Procedure using OCCI concept in C++?.
Edited by: 788634 on Aug 16, 2010 4:09 AMHi Vishnu,
Yes, sure, you can create a PL/SQL procedure, function, package, package body, etc. from within an OCCI application. I would say that, generally, this is not the sort of activity a typical client application would perform unless there is some initialization/installation processes that need to happen. In any case, here is a simple demo showing how to create a stand alone procedure (in a real application I would use a package and body) that returns a ref cursor. The ref cursor is just a simple select of two columns in the hr.countries sample table. Of course, there is no error handling, object orientation, etc. in this demo - I wanted to keep the code as short and as simple as possible to illustrate the concept.
Regards,
Mark
#include <occi.h>
#include <iostream>
using namespace std;
using namespace oracle::occi;
int main(void)
// occi variables
Environment *env;
Connection *con;
Statement *stmt;
ResultSet *rs;
// database connection information
string user = "hr";
string passwd = "hr";
string db = "orademo";
// sql to create the procedure which returns a ref cursor as out parameter
// should be run as hr sample user or in a schema that has select privilege
// on the hr.countries table and a synonym (countries) that points to the
// hr.countries table
string sqlCreate =
"create or replace procedure get_countries(p_rc out sys_refcursor) as "
"begin"
" open p_rc for"
" select country_id, country_name from countries order by country_name; "
"end;";
// pl/sql anonymous block to call the procedure
string sqlCall = "begin get_countries(:1); end;";
// create a default environment for this demo
env = Environment::createEnvironment(Environment::DEFAULT);
cout << endl;
// open the connection to the database
con = env->createConnection(user, passwd, db);
// display database version
cout << con->getServerVersion() << endl << endl;
// create statement object for creating procedure
stmt = con->createStatement(sqlCreate);
// create the procedure
stmt->executeUpdate();
// terminate the statement object
con->terminateStatement(stmt);
// now create new statement object to call procedure
stmt = con->createStatement(sqlCall);
// need to register the ref cursor output parameter
stmt->registerOutParam(1, OCCICURSOR);
// call the procedure through the anonymous block
stmt->executeUpdate();
// get the ref cursor as an occi resultset
rs = stmt->getCursor(1);
// loop through the result set
// and write the values to the console
while (rs->next())
cout << rs->getString(1) << ": " << rs->getString(2) << endl;
// close the result set after looping
stmt->closeResultSet(rs);
// terminate the statement object
con->terminateStatement(stmt);
// terminate the connection to the database
env->terminateConnection(con);
// terminate the environment
Environment::terminateEnvironment(env);
// use this as a prompt to keep the console window from
// closing when run interactively from the IDE
cout << endl << "ENTER to continue...";
cin.get();
return 0;
} -
Calling Oracle Functions and Procedures in Java
I've looked online for a blurb on using Oracle SQL functions and
procedures in Java, but I haven't found anything. Can someone
either give me a quick crash course on this, or point me to the
best source of information for this?From the SQLJ FAQ.
http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#sqljplsql
Within your SQLJ statements, you can use PL/SQL anonymous blocks
and call PL/SQL stored procedures and stored functions, as in the
following examples: Anonymous
block:
#sql {
DECLARE
n NUMBER;
BEGIN
n := 1;
WHILE n <= 100 LOOP
INSERT INTO emp (empno) VALUES(2000 +
n);
n := n + 1;
END LOOP;
END
Stored procedure call (returns the maximum
deadline as an output parameter into an output host expression):
#sql { CALL MAX_DEADLINE(:out maxDeadline) };
Stored function call (returns the maximum
deadline as a function return into a result expression):
#sql maxDeadline = { VALUES(GET_MAX_DEADLINE)
Of course, you can also use JDBC code to achieve the same - the
standard JDBC escape sequences for stored function and procedure
calls are supported, using for example:
"{? = CALL GET_MAX_DEADLINE}"
or:
"{call MAX_DEADLINE(?)}"
and for the rest of the details, get that JDBC crash course... -
Passing field name in function as parameter
Hi
I want to pass the fields name as in parameter in function and then return the value of that field.
thanks
pramod patelCREATE OR REPLACE FUNCTION demo
(i_in IN number)
RETURN NUMBER
IS
BEGIN
RETURN i_in*2;
END demo;
Hope that helps ... also, remember you can't use precision and scale (in the case of NUMBER), or length (in the case of VARCHAR2) for the parameters but you can ANCHOR (%TYPE or %ROWTYPE)
Good luck! -
Passing Partner function and Partner number in Action container editor
Hi all,
We have a requirement to create a follow up transaction with different business units as partner functions depending on some logic. I tried defining one action using copy_document method and was able to pass the container values of partner function (CRMT_PARTNER_FCT) and partner number (CRMT_PARTNER_NO) along with transaction type (process_type). However, still the follow up transaction does not contain the relevant partner function and value.
Please let me know is there a way I can default differnt partner function and partner number while creating a transaction based on my actions.
Thanks and Regards,
Varun GuptaThanks maggie, I know couple of options using code like the one you mentioned in copy badi. There is another BADI only for partner function. I can activate it in the access sequence and can do my code over there. However, in actions (copy_document specifically) we can pass parameter like transaction type, activity category etc. SAP standard implementation automatically takes those parameter into consideration and create subsequent transaction with right transaction type and activity category. On similar basis I have also tried sending partner function and partner number without any success. So I thought of raising this and need all CRM experts advice on it.
Maybe you are looking for
-
Multiple inputs in BO for report generation
Is there some way that let says there are 100 records in an order and I want to process 45 of them based on certain characteristic which is not reflected in the report, can i input a value to indicate what action to take for 45 orders. The reason I h
-
ITunes freeze when on podcasts tab
I have a problem with the latest itunes 10.2. When i load itunes podcast tab it freezes. To sucessfully relaunch itunes, i need to delete the itunes.plist file in library/preferences directory and once i try to reload the podcast folder it freezes a
-
Why do I see 2Apple TV in my remote app
But I only have 1apple tv
-
End to End Monitoring confiuguration for 3rd party systems
Hi, I have been trying to racking up materials for end-end configurations for 3rd party systems and can't find any..All the ABAP systems are perfectly configured in our End-End Monitoring system but can't find any of the third party systems..Is ther
-
DataLoad Rule file - Date conversion
Hi, While working on a Dataload rule file,I was facing this problem. I'm getting date in the format "m(m)/d(d)/yyyy hh:mm:ss". Is there a way to change this to "mm/yy" ?? (There won't be anyproblem if I get mm/dd/yyyy hh:mm:ss style. but unfortunatel