How to use ODI procedures into a ODI variable
Hi,
I have the below condition
select c1 from table where c1>#ODIVAR1 and use the output of this query in a variable to define the package flow
If output=0 package flow goes as XXX
else
flow goes as YYY.
So please suggest how to use a ODI variable to capture the procedures putput and use it in package flow in this case.
Thanks,
Naveen.
Step1 . Refresh the variable in the package, which have this query select c1 from table where c1>#ODIVAR1
Step2. Evaluate above variable (operator = , value 0 )
Step 3. If true Package flow xxx , else false yyy
Please close the thread once you get the required flow.
Similar Messages
-
How to use Stored Procedures in form 6i Blocks
Dear Friends,
I would like to know how to use Stored Procedures while creating blocks in Data Block Wizard in forms 6i application.
Please send me sample code of stored procedure.
Regards,
Khader.The Data Block Wizard is not for creating stored procedures. It will allow you to use a stored procedure in your form. See the help documentation for how to use the wizard.
Here's an example of a simple procedure. If you search the database forum or the web, you will find many examples.
CREATE OR REPLACE PROCEDURE procedure_name (value OUT NUMBER ) AS
BEGIN
SELECT COUNT(*) INTO value
FROM your_table;
END;
Message was edited by:
Mark Roberts -
How to use Stored Procedure Call in Sender JDBC adapter
Hi All,
Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
XierHi Xler
refer these links
/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
Thnaks !! -
HOW TO USE STORED PROCEDURES IN JASPERREPORTS(URJENT)
Hi,
i'm using jasperreports in struts based project. How to use stored procedures in jasperreports. pls send the solution urjent
Thanks in advance
rameshHi,
Refer the below link:
JDBC:
Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
Stored Procedures-
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
http://www.ics.com/support/docs/dx/1.5/tut6.html
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
http://www.ics.com/support/docs/dx/1.5/tut6.html
http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
http://www.sqlteam.com/article/stored-procedures-an-overview
HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
refer the below link which has all the associated action
http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
Chirag -
How to use stored procedures in DIAdem and Can the stored procedures be used to return values?
Can anyone please tell me how to use stored procedures in diadem and to return values from it. Its really important, can you please answer it at the earliest.
Thanks In advance
spiyaHi Spria,
I'm very sorry for the mix-up, I thought Allen was going to answer you back with the particulars that we found out. Check out the attached Word document and the below tidbits:
The built-in DIAdem ODBC functions {SQL_...()} can only call stored functions, which return a scaler result {found then in SQL_Result(1,1)}. The syntax for this with an ORACLE db is
"select function(parameters) from package"
...where package defaults to "dual" if you don't use your own package.
There might be exceptions to that though, and the syntax will be different for other databases. Note that stored ORACLE procedures can NOT be called from the ODBC functions, instead you must use either ADO function calls in the DIA
dem VBScript or the OO4O COM wrapper that ORACLE provides (this is described in further detail in the below Word document).
Hope this helps,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
Attachments:
Calling_ORACLE_Stored_Procedures_from_DIAdem.doc 28 KB -
How to use Stored Procedures in JDBC sender side and receiver side
Hello,
Can anyone explain how to use stored procedures in configuring the scenario using JDBC adapter at bothe sides sender nad receiver..
Thanks,
SooryaHi,
Refer the below link:
JDBC:
Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
Stored Procedures-
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
http://www.ics.com/support/docs/dx/1.5/tut6.html
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
http://www.ics.com/support/docs/dx/1.5/tut6.html
http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
http://www.sqlteam.com/article/stored-procedures-an-overview
HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
refer the below link which has all the associated action
http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
Chirag -
How To use window.print() into Button Attributes
hi,
I want to print a report using an print button.so i am using window.print() function into Button Attributes .But Print pop up screen not pop up . How To use window.print() into Button Attributes .
Thanks
Manojdear hari
"Set button target as URL and put following js as URL Target
javascript:window.print();"
Will this be useful to my another thread raised as follows.
In case, if i am able to generate report as txt (ascii) file instead of doc / pdf and is it possible to send the txt file using host command. I am uable to try since i do not know where to place host command on click &print.
yours
dr.s.raghunathan -
How to use 'oprofc' procedure?
How to use 'oprofc procedure'?
I don't find this program in JDEVELOPER2.0 directory.
is it necessary to launch 'oprofc' to use some oracle-specific
features (form exemple: CLOB)
nullDavid,
Please also see my reply to your other query about SQLJ and
CLOBs. It is my understanding that this script is only necessary
for command line SQLJ operations, and I don't believe it is still
used with 8.1.
Because JDeveloper handles the SQLJ translation for you, we do
not provide the command line utilities. They should be available
with either your server installation or the Oracle Client
distribution if you would like to use them.
-L
David DUPONT (guest) wrote:
: How to use 'oprofc procedure'?
: I don't find this program in JDEVELOPER2.0 directory.
: is it necessary to launch 'oprofc' to use some oracle-specific
: features (form exemple: CLOB)
null -
How to call Oracle Procedure into ODI
Hi,
I'm using ODI 10g.
Before executing the interface in a package i wanted to place my Procedure.
I created following procedure in d/b (target)
CREATE OR REPLACE PROCEDURE TEST_MY_NEW_PROCE
AS
BEGIN
DELETE FROM EMPLOYEE_TABLE
WHERE EMPLOPYEE_ID LIKE 'P%';
COMMIT;
END;
The Procedure is working fine in target database.
Now, before executing my interface i would like to run this procedure in my package. So, can some one please help me how to call this oracle procedure (Created in Target schema) into ODI and run this.
thank you.Hi GRK,
You can create an ODI procedure, add a single step, choose Oracle as Technology and your target schema.
Then just call it through a pl/sql block :
BEGIN
TEST_MY_NEW_PROCE;
END;Then drag this ODI procedure in your package.
Regards,
JeromeFr -
How to use CrossReference and DVM in ODI &how to populate data into Xref
Can any one tell how to use Domain Value Maps and Cross Referencing in ODI?
DVM or Domain Value Map are created and used in ESB console of SOA suite.
My actual requirement is as follows:
The below steps describe loading data from ERP Application 1 to ERP Application 2.
1. The Source Application ERP APP1, populates the interface table using their native technology.
2. A job scheduler invokes the Source side ODI Package.
3. ODI then extracts the data from Source Interface table and populates the Target Interface table.
4. After populating the Target interface table the ODI populates the X-ref table with App 1 ID and generated common ID.
5. The ODI either deletes or updates the rows that were processed from the Source interface table.
6. On the Target Application ERP APP2, the native application extracts data from target interface table and populates target database there by generating ERP Application 2 ID.
7. A job scheduler on the Target application invokes the ODI package to populate the Application 2 ID onto the Xref table matching on the Common ID.
I just want to know :
1. How to populate data into the Xref table from Source datastore
2. And if data is successfully laoded from target datastore to actual base table of target then how to populate the target id into the cross reference table.can anyone suggest me some answer, then it would be of great help?
-
How to use pl/sql code as ODI user defined function
Hi All,
i have a pl/sql code and i want to create ODI user defined function using this code .
please find the pl/sql code below:
============================
declare
v_no_of_duplicate_rec number := 0;
begin
select count(*)
into v_no_of_duplicate_rec
from ( select 1
from temp_pre_selections
group by svb_number, selection_id
having count(*) > 1);
if v_no_of_duplicate_rec = 0 then
return 'N';
else
return 'Y';
end if;
end if;
==========================
please help me how to achieve the same .
Thanks
Vinod2 ways:
a. implement logic in odi function directly: getCount, Oracle implementation:
select case count(1) when 0 then 'N' else 'Y' end
from hr.employees
when you use this function to refresh a variable, the refresh statement should only be getCount, you shoueld not write select getCount from dual, otherwise it will become
select select .... from ... from dual
b. if your logic is complex, I suggest to write function directly in your database, then call this function in your ODI function
eg:
CREATE OR REPLACE FUNCTION hr.test RETURN varchar2 IS
tmpVar NUMBER;
BEGIN
select count(1) into tmpVar from hr.employees;
if tmpVar=0 then
return 'N';
else
return 'Y';
end if;
END test;
then create a ODI function, Oracle implementation is
hr.test
in your variable refresh statement, you can write select getCount from dual
if you use the odi function in other locations expect for refreshing variable, the idea is similar -
How to Use the Procedures in a Sql Query
Hi Friends,
Can anyone help me out whether can we use the procedure in the sql query..
if yes help me out with an example
my requirement is
i have one sql query .. in which i need to use the procedure which returns multiple values... how can i overcome it,can anyone help me out for this..
for your reference i am pasting the sql query
SELECT paf.person_id
FROM per_all_assignments_f paf START WITH paf.person_id = p_person_id
AND paf.primary_flag = 'Y'
AND paf.assignment_type IN('E', 'C')
AND l_effective_date BETWEEN paf.effective_start_date
AND paf.effective_end_date
CONNECT BY PRIOR paf.supervisor_id = paf.person_id
AND paf.primary_flag = 'Y'
AND paf.assignment_type IN('E', 'C')
AND l_effective_date BETWEEN paf.effective_start_date
AND paf.effective_end_date
and paf.person_id not in (>>>I HAVE TO USE THE PROCEDURE HERE<<<<);
Thanks in advanceWe never saw your procedure, but maybe you could wrap it in a function
SQL> create or replace procedure get_members(in_something IN number, out_members OUT sys_refcursor)
is
begin
open out_members for
'select level member_id from dual connect by level <= :num' using in_something;
end get_members;
Procedure created.
SQL> create or replace type numbers as table of number;
Type created.
SQL> create or replace function members(in_something IN number)
return numbers
as
member_cur sys_refcursor;
members numbers;
begin
get_members(in_something, member_cur);
fetch member_cur bulk collect into members;
close member_cur;
return members;
end;
Function created.
SQL> select * from table(members(4));
COLUMN_VALUE
1
2
3
4
4 rows selected.Variant on same using piplined function
SQL> create or replace function members_piped(in_something IN number)
return numbers pipelined
as
member_cur sys_refcursor;
rec number;
begin
get_members(in_something, member_cur);
loop
fetch member_cur into rec;
exit when member_cur%notfound;
pipe row(rec);
end loop;
close member_cur;
return;
end;
Function created.
SQL> select * from table(members_piped(4));
COLUMN_VALUE
1
2
3
4
4 rows selected.
SQL> drop function members_piped;
Function dropped.
SQL> drop function members;
Function dropped.
SQL> drop type numbers;
Type dropped.
SQL> drop procedure get_members;
Procedure droppedEdit:
Sorry Blu, had not seen you already posted similar thing
Edited by: Peter on Jan 27, 2011 5:38 AM -
PL/SQL Colelction how to use in procedure
i am converting SQL Server stored procedure in oracle in which i have made use of TABLE variable but TABLE variable is not there is oracle i searched on Google instead of TABLE variable we can use of COLLECTIONS in PL/SQL
i could not find the syntax for using that i am giving you some lines please give the equivalent code for that
ALTER procedure usp_GetLLWardItemsReceived
p_ItemReceivedMstID int
as
----------declaring this first table variable @t1 --------------
Declare @t1 Table
WardItemDtl_ID int,
ItemID int,
ItemQty int,
WardID int,
WardTransID int
----------declaring this first table variable @t2 --------------
Declare @t2 Table
WardItemDtl_ID int,
ItemID int,
IssueItemQty int
----------inserting data into first table variable @t1--------------------------
insert into @t1(WardItemDtl_ID,WardTransID,ItemID,ItemQty,WardID)
select WardItemDtl_ID,WardTransID,wdDtl.ItemID
,Sum(ItemQty) ItemQty,ReceivedWardID from LL_WardItems_Details wdDtl
where isposted=0
group by wdDtl.ItemID,WardItemDtl_ID,ReceivedWardID,WardTransID
order by WardItemDtl_ID
----------inserting data into first table variable @t2--------------------------
insert into @t2(WardItemDtl_ID,ItemID,IssueItemQty)
select WardItemDtl_ID,ItemID,Sum(IssueItemQty)IssueItemQty from LL_PartyItems_Details
group by WardItemDtl_ID,ItemID order by WardItemDtl_ID
and some code here to do calculation then show to end user
please somebody helpme in this that how can i do this in PL/SQL collections or some alterntiveuser21354 wrote:
thanks for your reply please give me some sort oh hint what or which alternative approach i can use to solve this problemPlease define the problem - it is a tad difficult to suggest an approach to a solution when the actual problem is unknown.
In general terms - there are very seldom need for temporary tables in Oracle. The feature is supported (called GTT or global temporary tables). It does not work like SQL-Server's temp table feature.
Collections in PL/SQL usually serve a single purpose only - reducing the context switching between the PL/SQL and SQL engines. A collection allows for a bigger size pipe to pass data between the two. Oppose to passing a single row at a time via a context switch.
The price for a collection is an increase is very expensive server memory called PGA. So there is a balance between reducing context switching at the expense of increased PGA consumption.
For this reason too, it is a very bad idea to use collections as an alternative to SQL tables and cache SQL data in collections. And this is essentially what your approach will result in - using PL/SQL collections like they are some kind of temporary SQL table.
You can crash the database server like that. I have seen this more than once. Oracle attempts to do as instructed (unless limits are imposed such as resource profiles). So if your PL/SQL attempts to create a 1GB size collection in PGA memory, Oracle will not tell you that it is a stupid thing to do. It will do as your code instructs - and in the process can totally exhaust every single bye of server memory. And this results in such severe swapping of memory pages between disk and RAM, that the entire server becomes unresponsive to such an extent that the sysadmin will not even be able to log into the server to correct the problem. -
How to use 'Execute Procedure' to retrieve table data from an ext. MS SQL ?
Hi,
We have to call a stored procedure from an external MS SQL database . We are able to connect to the database and are able to successfully do a SQL (Select ) on the SQL tables. However to maintain data integrity and other security issues, we have to call a stored procedure on that database from SAP. The stored rocedure will return a table which will contain multiple records .
We have tried using the EXECUTE PROCEDURE command. However it returns SQL errors?
Our SAP instance is on MS SQL.
Please note we have gone through all SAP notes and SDN already. The query is not about connecting to the database. It is solely to find out the correct way for calling the stored procedure. The example in the SAP help documentation is for single IN and OUT parameters. We are able to do that successfully. Our requirement is to get a table back from the stored procedure.
Please help with the correct syntax and code example if you have one.
I would be glad to provide any other information that may be helpful.
Thanks in advance.Hi,
I too have a similar issue, I have a stored procedure written in MS SQL and it executes but I need the result in an internal table; How do I get it into an internal table?
Following code is being used. Now the output of the query that is being executed, I need it in my internal table
EXEC SQL.
EXECUTE PROCEDURE d01.Z_PRICINGREPORT ( IN :i_mandt,
IN :i_kschl,
IN :i_vkorg,
IN :i_vtweg,
IN :i_matkll,
IN :i_matklh,
IN :i_matnrl,
IN :i_matnrh,
IN :i_inco1,
IN :i_inco2,
IN :i_zsalel,
IN :i_zsaleh,
IN :i_kunnrl,
IN :i_kunnrh,
IN :i_chargl,
IN :i_chargh,
IN :i_vkburl,
IN :i_vkburh,
IN :i_vkgrpl,
IN :i_vkgrph,
IN :i_wrkstl,
IN :i_wrksth,
IN :i_mtf,
IN :i_mtt,
IN :i_datbi,
IN :i_werks,
IN :i_stock
ENDEXEC.
CATCH cx_sy_native_sql_error.
MESSAGE `Error in procedure handling` TYPE 'I'.
endtry.
Warm Regards,
Abdullah -
How to use the procedure column in reports
Hi all
How to call the procedure in reports as source.. If possible how to use columns of procedure in the layout column of report????Hi,
Your query is not clear.
1. In subject are you asking total column.
A. Edit pivot view and go to Rows and click Total BY option here you can find option like (none,before,after) the you can select after it will display total all culms.
2. I want use the columnC in columnD ? -- Am not understand.
A. What my understand is you want to see the report only C and D values only.
If it is correct we can apply filter in report level click column filed and apply not equal to A then it will show only C and D only.
If it is wrong pleas post me correct one with example. Will try to help out this.
I am not sure this is what your looking so far.
Award points it is useful.
Thanks,
Satya
Maybe you are looking for
-
Best practice for designing a directory tree
Hello all, I wanted to know what you all think about what is the best way to design a directory tree. Again it seems to me that experience makes the man perfect and I wanted to know what you all think about how to design directory tree model. Here is
-
Can I create folders (albums) for my photos and move them?
Can I create folders (albums), for my photos and then relocate said photos to specific folders?
-
FF4 Mac: Can't show "Downloads" window
I don't seem to be able to view the "Downloads" window in FF4. (FF3.6 works fine however). Methods I've tried: * Command + J * Tools menu -> Downloads * Window menu -> Downloads (yes, it shows in the Window menu) * Expose (the main firefox window is
-
Hi All ! i want to get currnet sytem directory in my code by System.getProperty("user.dir");in my ide enviroment it is working properly but when i build executable .jar file it returns active jre directory how can i get executable .jar file directory
-
Como deshabitar la llave de inicio de sesión
Quiero deshabilitar las llaves de mi equipo y tambien las contraseñas