XI JDBC adapter - Can it be called & return values to XI ?
Want to make an SQL request to database table and ruturn data back to XI.
Flow: SAP BW--rfc-> XI -jdbc request for data-> SAP BUS ONE
SAP BW<----rfc--- XI - jdbc return results--
SAP BUS ONE
1. XI-- request -- from> SQL Table Select * from Sap_B1 where date > payload_date.
2. Based on results pass those records back to XI to be mapped to inbound RFC for BW.
Does XI JDBC provide this capability or is there other options?
hey
yes,receiver JDBC is capable of handling both request and response in a single interface so you can use it in your scenario without any problem.
if you want to go with stored procedure way then the stored proc. needs to be on the database and the JDBC receiver communication channel from XI will pass data to it and get back response from it.get in touch with database guys to write stored proc.
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
if you dont want stored proc,then you can give the conditions in the receiver message type itself,this will query the database and will send back the response.
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
both approaches are feasible,you just need to decide upon which one is more suited for u
Thanx
Aamir
Message was edited by:
Aamir Suhail
Similar Messages
-
Can JDBC adapter be scheduled to call stored procedures
Can JDBC adapter be scheduled to call stored procedure in other database passing previous date as input parameter
Hi Gurus,
actually our scenario is jdbc->XI( <-RFC->)->File
Here our payload is around 5000 records
can it be advisable to use rfc synchronous communication.
The scenario will be exected only in night times.so can we schedule the adapter as we are using sp9.
If not what must be the good design approach.
And also after scheduling to a perticular period ,if there is any down time of XI server,will the process start immediately after the sever up or it will again watch for that perticular time. -
LiveCycle DS , can't get the return value of fill( arg) from Assembler class
Hi all!
I'm a have small problem , can any one help me? Please
I make a project which very similar to Product project(in
example).
1) Have Assembler class: I work correctly
package flex.samples.stock;
import java.util.List;
import java.util.Collection;
import java.util.Map;
import flex.data.DataSyncException;
import flex.data.assemblers.AbstractAssembler;
public class StockAssembler extends AbstractAssembler {
public Collection fill(List fillArgs) {
StockService service = new StockService();
System.out.print(fillArgs.size());
return service.getStocks();
public Object getItem(Map identity) {
StockService service = new StockService();
return service.getStock(((Integer)
identity.get("StockId")).intValue());
public void createItem(Object item) {
StockService service = new StockService();
service.create((Stock) item);
public void updateItem(Object newVersion, Object
prevVersion, List changes) {
StockService service = new StockService();
boolean success = service.update((Stock) newVersion);
if (!success) {
int stockId = ((Stock) newVersion).getStockId();
throw new DataSyncException(service.getStock(stockId),
changes);
public void deleteItem(Object item) {
StockService service = new StockService();
boolean success = service.delete((Stock) item);
if (!success) {
int stockId = ((Stock) item).getStockId();
throw new DataSyncException(service.getStock(stockId),
null);
some require class is ok.
2) I configure in data-management-config.xml
<destination id="stockinventory">
<adapter ref="java-dao" />
<properties>
<source>flex.samples.stock.StockAssembler</source>
<scope>application</scope>
<metadata>
<identity property="StockId"/>
</metadata>
<network>
<session-timeout>20</session-timeout>
<paging enabled="false" pageSize="10" />
<throttle-inbound policy="ERROR" max-frequency="500"/>
<throttle-outbound policy="REPLACE"
max-frequency="500"/>
</network>
</properties>
</destination>
3) My client app:
I use :
<mx:ArrayCollection id="stocks"/>
<mx:DataService id="ds" destination="stockinventory"/>
ds.fill(stocks); --> Problem here
When I run this app, The StockAssembler on the server work
correctly (i use printout to debug) . But variable stocks can't get
the return value,it is a empty list.
Please help me!Hi,
The executeQueryAsync method is “asynchronous, which means that the code will continue to be executed without waiting for the server to
respond”.
From the error message “The collection has not been initialized”, which suggests that the object in use hadn’t been initialized after the execution of the executeQueryAsync method.
I suggest you debug the code in browser to see which line of code will throw this error, then you can reorganize the logic of the code to avoid using the uninitialized object.
A documentation from MSDN about Using the F12 Developer Tools to Debug JavaScript Errors
for your reference:
http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
Best regards
Patrick Liang
TechNet Community Support -
How can i pass function return values in to varray
Hi
create procedure name(parameters list)
here ---i am calling a function
varname := function name
returns 4 values
My doudt is how can i pass these return values in to varray..
Type varray vname[5] date type
Begin
statements
end prodedure name;
pls clarify me its urgentThis may give u a start
sql>
create or replace package test_array_pack as
type ar1 is varray(10) of number;
end;
Package created.
sql>
create or replace function test_array return test_array_pack.ar1 is
v_ar1 test_array_pack.ar1;
begin
v_ar1 := test_array_pack.ar1(1,2,3,4);
return v_ar1;
end;
Function created.
sql>
declare
v_ar2 test_array_pack.ar1;
begin
v_ar2 := test_array;
end;
PL/SQL procedure successfully completed
Message was edited by:
jeneesh -
JDBC adapter can't find the jdbc driver class
Hello, my jdbc driver give an very strange error
11:46:13 (4207): JDBC adapter terminated
Mon Aug 02 11:46:13 CEST 2004 *****
11:46:13 (4210): ERROR: Attempt to load JDBC driver failed ("java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver")
Attempt to intialize JDBC adapter failed
11:46:13 (4203): Unable to start JDBC adapter (not initialized)
I know that the jdbc driver is in the classpath, and to confirm that I have created a java program in the IB (repository) which import the class oracle.jdbc.driver.OracleDriver. I can compile and run that program without problems.
Here you can see my jdbc adapter configuration file:
jdbc adapter java class
classname=com.sap.aii.messaging.adapter.ModuleDB2XMB
mode=DB2XMB
Integration Engine address and document settings (example, see docu)
XMB.TargetURL=http://<host>:<port>/sap/xi/engine?type=entry
XMB.SenderBusinessSystem=ExtAdapterSender
XMB.SenderInterfaceNamespace=http://sap.com/xi/xidemo
XMB.SenderInterfaceName=ExtAdapterSenderIF
XMB.QualityOfService=EO
##DB Adapter specific parameters (example for SQL-Server, see docu)
db.jdbcDriver=oracle.jdbc.driver.OracleDriver
db.connectionURL=jdbc:oracle:<user>:<password>/hello@<url>:<port>:<instance>
db.processDBSQLStatement=Select * emp
db.pollInterval=600
xml.recordsetsPerMessage=1Hi Ernesto,
Can you try to the following:
1. Remove your JDBC driver entries from the CLASSPATH.
2. Put those jars into your jre/lib/ext directory.
3. Restart the whole adapter engine, and
4. Config the driver java class for the adapter. the class name to be used can be found in your JDBC driver document.
Let me know whether it works.
Hart -
Sender JDBC adapter can be Synchronous?
Hi,
can we use sender JDBC adapter as synchronous in JDBC-XI-RFC Scenario without BPM?
thank you
babuthank you for your reply.
Agasthuri,
that link doesn't explain about sender JDBC,it explains about reciever JDBC adapter and more over using BPM,I have asked without BPM.
Chandra
do you know how can we achieve this?please stick to my question sender JDBC-xi-RFC without BPM.
thank you again.
babu -
JDBC Adapter can be used for sender / receiver for MS Access ?
Hi Experts
I want to communicate with MS Access by using JDBC sender and receiver
adapter ? How to set up ?
Links/screen shots/etc..........
Adv thanx
regards
rakeshHi Rakesh ,
>>>> Why the driver is : jdbc:odbc:Driver={Microsoft Access Driver
(*.mdb)};DBQ=//xiserver/xitemp/db/TestDB.mdb ?
if your test data base file is TestDB.mdb you need to give the absolute path of the file to get access to JDBC adapter set so you can replace the file path with the corresponding path on your test system .
Please place the data base file in a directory where the XI system has share access.
Regards,
Nanda -
How many records does JDBC adapter can obtain in one polling?
Hello everybody,
I need to do an interface between legacy system and SAP ECC, the legacy systems have a DB so i use the jdbc adapter (sender) and receive the information to SAP ECC with proxy, so i need to activate the polling option from my jdbc adapter working as a sender, i read a table with lot of records, and i need to know how many records does jdbc adapter support when the polling is executed, because is necessary read all records from the table and change the status of the processed field.
Is possible to get all the records from that table in one polling interval (50,000 records aprox)?, or i need to do the polling by blocks of records until finish all records from the table?, the second option, i dont have idea how can i do it.
Regards,
VicmanHi again!,
i still working on that, but i have a question, is possible to handle Store Procedure in jdbc adapter?? is supported?, like PL SQL, because i was working in the next query but i don't know if it works and where do i need to locate the query in the Query SQL Statement or in Update SQL Statement field or both? but how?.
DECLARE c_cursor CURSOR FOR
SELECT * FROM tablename
WHERE processed=0
OPEN c_cursor
FETCH NEXT FROM c_cursor
WHILE @@FETCH_STATUS = 0
BEGIN
update tablename set processed=1
FETCH NEXT FROM c_cursor
END
CLOSE c_cursor
DEALLOCATE c_cursor
Regards, -
JDBC - how to handle insert that returns value (bind?)
Hi,
I'm trying to do an insert into a table in an Oracle database with an auto-incrementing primary key (using a trigger and sequence) and I need to retrieve the value after the insert. From SQL*Plus, I'd enter:
var id number;
INSERT INTO mytable (name) VALUES ('foo') RETURNING id into :id;
whereupon if I do "print id", I get the value of the id field from the newly-inserted record.
The big question is how to achieve the same thing using JDBC. I've been flailing around all morning trying to figure it out and suspect it has something to do with using a CallableStatement instead of a PreparedStatement, but all of the examples I've seen so far only deal with calling stored procedures instead of raw SQL, and they all omit the part where some variable is bound to the resultset.
Assuming I want to have the Java variable (int? Integer()?) "newId" set to the value being returned by the SQL statement as "id" (or ":id"?), what do I need to do between getting the connection and looking at "newId" to see what the value returned by the statement is?
ie,
Connection conn = db.connect();
int newId;
// show me what I need to do here
System.out.println("The id of the newly-inserted record is:");
System.out.println(newId);Thanks!This is untested:
use the executeUpdate() method from the Statement. The return value will be your result from the RETURNING id portion of your SQL statement, if not then you'll probably have to do a seperate select or/and explicit return to get the value back from SQL. -
How to return 2 value to a method and how can i get the return value?
hi guys, this is my problem.
private void one(){
two();
private Vector, Vector two(){
return(row, column);
the problem is that I don't know how to call the two() method and return from two() to one().
please help me, i'm very new to programming........
limlthe problem is that I don't know how to call the two()
method and return from two() to one()You can doprivate Vector[] two () {
return new Vector[] {
row,
column
} // as suggested
private void one () {
Vector[] rowAndColumn = two ();
Vector row = rowAndColumn[0];
Vector column = rowAndColumn[1];
}You should consider replacing your Vector with an ArrayList, btw.
Kind regards,
Levi -
Priocntl system call returning values not in man page
If you look at the man page for priocntl(2) it says that pc_clname in pcinfo_t will only contain the following values:
RT for realtime
TS for time-share
FX for fixed-priority
but I've also seen the following returned
FSS presumably for Fair share
IA presumable for Interactive
Is this just a doc bug or is priocntl not supposed to be passing these back. The way priocntl(1) and (2) read I was inferring that the difference was somewhat on purpose in that Interactive mode is just a special Time Share mode and thus would show up as TS when queried using priocntl(2).
You may ask who cares but we use a third party class library (RW) and the version of the code we have, which I will admit is old, only handles TS and RT coming back from priocntl, exceptions when IA comes back.
On a related note, does anyone know if a "workstation" machine will somehow default to Interactive mode for some processes, namely the ones not started at boot time? On a server box, e450, if you run 'priocntl -d -i all. All the processes show up under Time Share but if I run the same
command on a workstation box, sparc 5, I get that some are in Time Share and others are in Interactive.
Thanks.Or you can use one of these in the JSP page:
<jsp:usebean id="var_name" class="class_name" scope="request">Only thing to remember is that if it can't find the variable name then it will call the default constructor to create a new instance, and if that doesn't exist then you will get a runtime error in your JSP page which looks pretty ugly. -
Can a single LOV return values to two different fields?
Hi,
I have a scenario where I already have a LOV in the form which is assigned to a Field A. This LOV returns the value to field A. I have another field B which needs the same list of values. I can assign the same LOV to the field B as well, but can the value selected be returned to B?
I can create another LOV with the same record group, but just wanted to know if its possible to use the same LOV again.
ThanksHi Karuna,
You can achieve this by providing a third column in LOV (whose column width can be set to 0 to prevent it from being visible in lov) which can be comma-separated of two fields. This third field can then be assigned to the form field. And a substr() function call can get you both values.
Hope this helps,
Anantha
[http://askanantha.blogspot.com] -
Error in calling stored procedure in sender JDBC adapter
Hi Experts,
I am working on MySQl to SAP scenario. I have to use stored procedure in sender JDBC adapter.
I am calling SP as fallows: execute proc_dtdc_booking_interface_sd
But it returned following error,
Database-level error reported by JDBC driver while executing statement 'execute proc_dtdc_booking_interface_sd'. The JDBC driver returned the following error message: 'java.sql.SQLException: Unknown prepared statement handler (proc_dtdc_booking_interface_sd) given to EXECUTE'. For details, contact your database server vendor.
the way i called SP is correct ??
please suggest me how to resolve the issue ??
Regards,
Bhuvan.Hi
Below is the code , when we are using this code directly in the mySQl command promp, it fetches 10 record but when the same code is called through XI adapter its fetching only one record
DELIMITER $$
DROP PROCEDURE IF EXISTS `proc_dtdc_booking_interface_sd` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_dtdc_booking_interface_sd`()
BEGIN
declare done int(1);
declare v_dsr_booked_by char(1) ;
declare v_dsr_branch_code char(3) ;
declare v_dsr_cust_code varchar(7) ;
declare v_dsr_booking_date date ;
declare v_dsr_cnno char(9) ;
declare v_dsr_cn_type char(3) ;
declare v_dsr_cn_weight decimal(8,3) ;
declare v_dsr_dest char(3) ;
declare v_dsr_mode char(2) ;
declare v_dsr_amt decimal(10,2) ;
declare v_dsr_dox char(1) ;
declare v_office_code char(3) ;
declare v_dsr_status char(1) ;
declare v_dsr_remarks varchar(25) ;
declare v_dsr_refno varchar(20) ;
declare v_dsr_transmf_no varchar(10) ;
declare v_dsr_trans_status_xi char(1) ;
declare v_ndsr_cnno char(9) ;
declare v_ndsr_product char(3) ;
declare v_ndsr_sercharge decimal(8,3) ;
declare v_ndsr_ins_amt decimal(8,3) ;
declare v_ndsr_others decimal(8,3) ;
declare v_dr_amt_type decimal(2,0) ;
declare v_dr_extra_amt decimal(10,2) ;
declare v_sales_document varchar(2) ;
declare bookcur CURSOR for
SELECT *
FROM dtdcdb_rw.dtdc_booking_interface_sd
LIMIT 10;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET DONE=1;
set done=0;
OPEN bookcur;
bookloop: loop
FETCH bookcur
INTO
v_dsr_booked_by ,
v_dsr_branch_code,
v_dsr_cust_code,
v_dsr_booking_date,
v_dsr_cnno,
v_dsr_cn_type,
v_dsr_cn_weight,
v_dsr_dest,
v_dsr_mode,
v_dsr_amt,
v_dsr_dox,
v_office_code,
v_dsr_status,
v_dsr_remarks,
v_dsr_refno,
v_dsr_transmf_no,
v_dsr_trans_status_xi,
v_ndsr_cnno,
v_ndsr_product,
v_ndsr_sercharge,
v_ndsr_ins_amt,
v_ndsr_others,
v_dr_amt_type,
v_dr_extra_amt,
v_sales_document ;
IF DONE=1 THEN
LEAVE bookloop;
END IF;
select
v_dsr_booked_by As dsr_booked_by,
v_dsr_branch_code As dsr_branch_code,
v_dsr_cust_code As dsr_cust_code,
v_dsr_booking_date As dsr_booking_date,
v_dsr_cnno As dsr_cnno,
v_dsr_cn_type As dsr_cn_type,
v_dsr_cn_weight As dsr_cn_weight,
v_dsr_dest As dsr_dest,
v_dsr_mode As dsr_mode,
v_dsr_amt As dsr_amt,
v_dsr_dox As dsr_dox,
v_office_code As office_code,
v_dsr_status As dsr_status,
v_dsr_remarks As dsr_remarks,
v_dsr_refno As dsr_refno,
v_dsr_transmf_no As dsr_transmf_no,
v_dsr_trans_status_xi As dsr_trans_status_xi,
v_ndsr_cnno As ndsr_cnno,
v_ndsr_product As ndsr_product,
v_ndsr_sercharge As ndsr_sercharge,
v_ndsr_ins_amt As ndsr_ins_amt,
v_ndsr_others As ndsr_others,
v_dr_amt_type As dr_amt_type,
v_dr_extra_amt As dr_extra_amt,
v_sales_document As sales_document;
update dtdcdb_rw.dsr_table
set dsr_trans_status_xi='T'
where dsr_cnno=v_dsr_cnno;
end loop;
SELECT *
FROM dtdcdb_rw.dtdc_booking_interface_sd
LIMIT 10;
END $$
DELIMITER ;
Please help
Regards
Bhuvan -
Sender JDBC Adapter - Stored procedure
Hello all, I just read a lot of topics in this forum about this subject.
I found two indications in contracdictions in the documentation :<a href="http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm">Configuring the Sender JDBC Adapter</a>
1. Concerning Query SQL Statement
You have the following options:
● Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
● Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
2. Concerning Update SQL Statement :
This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.
It is ambigous, isn't it ?
My question is simple :
Does somebody already use Sender JDBC Adapter with Stored procedure as Select statement including many steps :
- update actions on database
- select query to return data to XI adapter
(Update statement stay empty or with value <TEST>.
To provide more information, I have a reference table to read. But this reference table must be updated by a stored procedure before being able to be read accordingly.
So As I can't do both process with Sender Adapter (call a procedure and execute a select statement) => I want to include both actions (updates and select) in an alone stored procedure.
Could I get wanted data as a resultset ?Hi,
>><i>Update statement stay empty or with value <TEST>.</i>
It should be <TEST> if you do not want an Update to happen.
Regarding Sender JDBC adapter with stored procedures, which DB are you trying to access. Sender JDBC adapter does not support Oracle Stored Procedures as they return Cursors and Sender JDBC adapter can deal with only Resultset.
As for executing both Update and Select in the SP, though I havent tried, this should surely be possible.
Regards,
Bhavesh -
JDBC Adapter - Multiple Resultsets
Hello,
Does anyone know if the JDBC adapter can return multiple resultsets?
So something like the following JDBC Code:
CallableStatement cstmt;
ResultSet rs;
int i;
String s;
cstmt.execute(); //Call the stored procedure
rs = cstmt.getResultSet(); //Get the first resultset
while (rs.next()) {
i = rs.getInt(1); System.out.println("Value from first set = " + i);
cstmt.getMoreResults();//Point to the second resultset rs = cstmt.getResultSet();// Get the second resultset
while (rs.next()) {
s = rs.getString(1);
System.out.println("Value from second resultset = " + s);
Greetings,
BartHi Bart,
sure you can select more than one table either with Stored Procedue or with Query Statement for example (also if you concate more than one SQL statement) like:
update table1 set STATUS = 4 where STATUS = 3 select *
from table1 bk inner join table2 on (KEY = BZ_KEY) where KEY = 449070
- or you create an View onb DB side that makes all of your Data selection:
select * from view where status = 4
- but you also can use stored procedure - in my opinion the most powerfuel tool...
If their is something left -keep asking
Regards Matt
Maybe you are looking for
-
We have an SP2010 farm which is now using some of the service applications from an SP2013 farm, including the search, managed metadata and user profile. This is part of an upgrade programme of work which will involve upgrading infrastructure and the
-
How do I create a local account from a network login from the command line?
I am connecting to my organization's domain using 3rd party software which doesn't allow for using the GUI for creating local accounts. How can I do this through the command line or is there a better way to script it? Thanks in advance!
-
Trying to change the text of the command button.
Hi., Am using jdeveloper 11.1.1.6., I have dragged and dropped a command button in my jsff page. When there is no record in my VO which dragged and dropped as a af:form the button will act as a create insert so that the text of the button should also
-
ITUNES 9.2 NOT SUPPORTING DRAG AND DROP TO TOAST CORRECTLY
APPLE is turning into MICROSOFT!!! The new iTunes update to 9.2 may be necessary for iPhone 4 to work but they missed a whole bunch of things. For example when I drag a track from my iTunes window to the desktop I used to see the file on the desktop
-
LabVIEW Video Waveform Source from Video Test Image for Multisim simulation
Hi, I want to simulate a video amplifier circuit in Multisim. I need a Composite Video Signal Source for feeding the input to the amplifier. In one of the application note I saw that LabVIEW can be used to create Video Waveform Source from Video Test