[Help]JDBC adapter- sender/receiver
Hello Gurus,
I have a scenario but can not find a solution.
We have a ECC and a database.
The scenario is to run a report from ECC, sending the selection criteria to the database, and get the result from the SQL statement.
How can i configure in PI?
Thanks a lot in advance!
Best regards,
Charlie
Hi,
This can be done using sync client proxy call.
On the ECC side we need to make a sync call to PI using client proxy, the input parameters to this proxy will be the
selection criteria, on the receiver side in PI use JDBC adapter.
For receiver side use the data type for "Select" statement :
(http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm)
and in mapping use the values received from ECC and map them as <key> elements.
The returned value will be part of the output parameters of the client proxy.
Pravesh.
Similar Messages
-
How to configure JDBC Adapter(Sender & Receiver)
How to configure JDBC Adapter(Sender & Receiver)
Rgds
RuchithaHi ruchitha thakur ,
These r the following web-sites which give u detailed information about configuring of JDBC Adapter(Sender & Receiver)
JDBC is a technical Adapter provided by SAP.
Configuring the Sender JDBC Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/content.htm
Configuring the Receiver JDBC Adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d36d51d-0b01-0010-b3aa-9cb313b63cf4
SAP XI Utilize SAP Adapters to connect to heterogenous systems
https://wwwn.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3fc4bd90-0201-0010-68bd-ab931b06f9c2
cheers!
gyanaraj
***Pls reward points if u find this useful -
Update in JDBC-Adapter (Send)
Hallo,
I´m trying to execute a Update in the JDBC-Adapter (Sender). When a Select-Statement results in exactly one entry back from the data-base I wont to Update this entry.
How refrencing to the enty (for example by an primary key)? I found only documentation for Receive-JDBC-Adapter...
Thanks in advance,
FrankHi Frank,
At last I get your scenario..
One solution to your problem can be the following though i am not sure if this is a perfect soultion or a viable solution but, it is a workaround solution which you can surely try.
1. To update the status of your database on the basis on the events that have taken place, you can configure a JDBC Adapter as a receiver.This JDBC adapter will contain the event and the flag value as well as Update condition.
Just check this blog and SAP help to understand how JDBC receiver adapter works,
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
2. In your JDBC sender adapter that is polling over your DB table, you can give the value for UPDATE as <test>. This means that you are not changing anything even after the adapter has picked up intfo from the table. Ofcourse, you would have to increase the polling interval time as the JDBC receiver has to update the DB.
I know this solution is a long shot and an added headache but if nothing works out, you can always do it this way.
Hope this helps,
Regards,
Bhavesh. -
JDBC Adapter - Sender - Stored Procedure - SQLException Error
Hi,
I have created one stored procedure in our Oracle database. I give below that stored procedure.
CREATE OR REPLACE PROCEDURE sp_stud
IS
l_row student%ROWTYPE;
TYPE t_ref_cursor IS REF CURSOR RETURN l_row%TYPE;
c_cursor t_ref_cursor;
BEGIN
OPEN c_cursor FOR
SELECT *
FROM student where readflag= ' ';
LOOP
FETCH c_cursor into l_row;
EXIT WHEN c_cursor%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(l_row.id || ' : ' || l_row.name);
END LOOP;
close c_cursor;
END;
This is a procedure to retreive rows from the table student which is having the field read_flag = ' '; (Student table contains the fields ID, NAME, BIRTHYEAR, BIRTHMONTH, READFLAG).
In JDBC Sender Adapter, I set the values for the following fields under Parameters tab.
Query SQL Statement: EXECUTE sp_stud
Update SQL Statement: UPDATE student SET readflag = 'Y' where readflag = ' '
The scenario is every 5 minutes JDBC adapter checks the table whether any new row is inserted, if it is inserted and commit, it will send that record to File. This is the Scenario.
In Runtime Workbench, Communication Channel Monitoring, it shows the following error, when JDBC Polls the table.
Database-level error reported by JDBC driver while executing statement 'EXECUTE sp_stud'. The JDBC driver returned the following error message: 'java.sql.SQLException: ORA-00900: invalid SQL statement '. For details, contact your database server vendor.
Note : If we execute the Stored Procedure ad SQL command level, it works fine.
Kindly help friends to solve this, where the error is happened.
Thanking you,
Kind regards,
Jegatheeswaran P.Hi,
Not a Database expert. But , in case you have not seen the note pointed by Deepu,
<i> The JDK 1.1.x, 1.2 and 1.3 versions (classes111. zip, classes12.zip, classes12.jar) of the driver are not compatible with the SAP XI JDBC Adapter. Use the JDK 1.4 driver (ojdbc14.jar) instead. For details, refer to Oracle MetaLink note # 203849.1.
<b>Invoking Oracle stored procedures from within a JDBC sender channel is only possible for Oracle DBMS versions >= 10.2.x using so-called table functions:</b>
Example:
pkg1 -
CREATE PACKAGE pkg1 AS
TYPE numset_t IS TABLE OF NUMBER;
FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED;
END pkg1;
CREATE PACKAGE BODY pkg1 AS
-- FUNCTION f1 returns a collection of elements (1,2,3,... x)
FUNCTION f1(x NUMBER) RETURN numset_t PIPELINED IS
BEGIN
FOR i IN 1..x LOOP
PIPE ROW(i);
END LOOP;
RETURN;
END;
END pkg1;
pkg1 -
<b> This function has to be invoked from the sender channel configuration (SELECT statement) as follows:
SELECT * FROM TABLE(pkg1.f1(5));</i></b>
Check this, confirm your Oracle DB version and then use the Table Functions as described in this note.
A Database Expert wil be able to crack this for sure.
Regards
Bhavesh -
JDBC ADAPTER SENDER ORACLE7.2.3
HI ALL,
We have to read data from an Oracle 7.2.3, but we are having problems In the inbound payload I can see that we have the data but is not building the xml properly, because the tags are empty. Someone haa experiencied this issue before?
Many thanks in advance!
Regards
NoeliaHi Mario,
the SQL is correct. I have checked it in Toad. I thinks this is something relative to the driver for oracle, because the jdbc adapter recover the data of the query but the info that I can see in the payload is the following:
<ns:MT_XXXXXX xmlns:ns="http://XXXX.es/xi/XXX">
<row>
<b><></b>123<b></></b>
<b><></b>PEPITO<b></></b>
<b><></b>01/01/2006<b></></b>
</row>
</ns:MT_XXXXXX>
And thats drive me to think that this is an issue with the driver, but Im not sure.
Any idea?
Many thanks
Regards
Noelia
Message was edited by: Noelia Fernandez -
File Adapter - Sender/Receiver
We may have scenario where XI will be using File adapter to deliver messages to Application X in the landscape.
As part of Load balancing of Application X, there are multiple servers running. Say, If Iam delivering the file to one location, If that server is down I should send files to different location. How can I achive that ?Hi ST,
I guess your 10 receivers are physically different. So they will have different IPs.
I do not know if you can adress a receiver dynamic. As far as I know it is not possible.
Maybe one solution is to write your own adapter.
On the other hand, thinking about a webService that pings the receiver systems and gives a message back to XI, which servers are online.
Than first call the WebService. In BPM you receive a list/ a message which servers are online. In a fork you could decide with a condition, which branch to use.
Sorry, that I cant give you a better solution.
Regards Mario -
How to update row by row in Jdbc Adapter sender ?
Hi friends ,
No i am reading data from a table using select query and resulting data i am keeping in the FTP folder as XML File.
I want to
1. to know how many rows i read ?
2. Update the read completed time in each row of the sender side table .
( I am using <b>select * from a table where tag='n' </b> . I am giving this in <b>Query SQL Statement</b> of JDBC Sender adapter processing parameter .
I am writing update query as update table set tag='y' where tag='n' .
Will it perform row by row ?
3. Insert in to another R3 System table the rows which i read as a log .
Can you please give procedure to do that .
Expecting your reply asap .
Thank you
Best Regards.,
V.RangarajanHi raj ,
Thanks for ur reply . I am new to xi . Just i am doing a scenario . I can able to read the ms-sql server table data using jdbc Sender adapter .
Can i use RFC Adapter to insert the values to R3 table ?
If i have mapped to rfc fields will it store into the table once we read the data from ms_sql server table using select query of JDBC Sender Adapter ?
Best Regards
V.Rangarajan -
SOAP Adapter sender/receiver commnunication channel?
Hello everybody,
I wonder how to configure the commnunication channel for the SOAP-Adapter. If XI triggers a webService (acts like a WebService client) then XI expects a response from the WebService. The first step seems to me as a receive-step. Then I wonder how XI gets the response?
Thanks a lot
Mariohi,
>>>The first step seems to me as a receive-step.
why? it's a send step
if you want to do it in a sync way then
XI does not loose connection and it waits
for the response
if you want to understand little bit more
sync calls have a look at this weblog:
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
the rfc call is done in a sync way
the same can be done with SOAP
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a> -
JDBC Adapter Sender How to delete 3 tables?
Hi all, I need to delete records of 3 tables after the Communication Channel send the information.
The problem is I want to put the 3 sentences in the Update SQL Statement separated with ";" but it does not work.
This is my statement
DELETE from table1 WHERE field1='3';DELETE from table2 WHERE field1='3';DELETE from table3 WHERE field1='3';
This is the error in the Runtime Workbench.
Database-level error reported by JDBC driver while executing statement 'DELETE from pruebas.SAPRCTGH WHERE DGHSTS='3'.'. The JDBC driver returned the following error message: 'java.sql.SQLException: Token . was not valid. Valid tokens: <END-OF-STATEMENT>.'. For details, contact your database server vendor.
When I tested from Razor SQL it works fine, I do not know what more to change.
Regards,
Sebastián AlvarezHi all.
Thank you very much for your answers.
I'll try one thing, I'll create another Service Interface and in the Configuration Scenario create another Receiver Agreement, so the message will be sent to ECC and will "return" like inbound to delete the tables with 3 delete statements.
Thank you very much to all of you.
I'll try this and I'll tell you
Regards -
XI File Adapter sending/receiving zip files
Can the XI File Adapter create a zip file to send outbound from XI and/or can it also translate a zip file inbound into XI?
Hi Kirk.
What you can do is use the OS command option on the adapter in order to unzip the file after the File\FTP adapter completes its file transfer to the specified path.One of my colleagues used a freeware zip app. that excepts an os command actions.
I know it works for file receiver but not sure about the sender. check SAP Note 801926 for more sender adapter parameters.
Regards
Nimrod Gisis -
Using Stored procedure in sender or receiver jdbc adapter
Hi All,
Please let me know simple blogs for Stored procedure used in sender or receiver jdbc adapter to get data from 2-3 tables
ThanksHi
To work with Store proceudres (SP) you have to create the SP's in database like Oracle, Mssql or Msaccess.
Ususally the SP creations are done by database experts. For more info about "SP" try Googling!
The below blog is about SP but not the one you expect!
/people/itisha.alok/blog/2009/03/23/jdbc-stored-procedure-returning-multiple-resultsets
Executing an Oracle Stored Procedure from Sender JDBC adapter
Sender Adapter - -
SP will contain the select Query alone or with it will contain insert, delete statement too.
Receiver:
SP will have insert or delete satement.
Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
The below details are required to configure the adapters
Driver details
database name
Procedure name
user name
password,
Regards
Ramg -
Sender JDBC Adapter and Synchronous Interfaces
Hello
I have a Oracle/JDBC -> XI -> ECC/RFC scenario. The communication mode is Synchronous.
In the Oracle database I have a table with a "STATUS" field. When JDBC Adapter Sends the rows from this table to the Integration Engine, it updates the "STATUS" from "G" (GENERATED) to "R" (READ).
The response from the RFC contains for each row sent to RFC a "STATUS_from_RFC" field, that I would like to use to update Oracle STATUS field to "S" (SUCCESS) or "E" (ERROR).
Can the Sender JDBC Adapter use the response from the Synchronous RFC to update Oracle "STATUS" field itself ?
Or do I need a Receiver JDBC Adapter? In this case, I have to use asynchronous communication and BPM, ok ?
thanks
JulioBhavesh,
<i>>>>But, the online help states it supports QOS of BE and so it does support Synchronous Processing.</i>
Even File adapter has QOS of BE
To my understanding response back is possible only if it is PUSH + Sync
Adapters PUSH + Sync
HTTP
SOAP
RFC
XI
etc...
For the above response is possible
Adapter PULL + Sync
File
JDBC
etc..
In general there can be a response if there is a request. In the case of File and JDBC there is no request message coming to the adapter, its the adapter which is actually requesting.
This is just an idea and my understanding.. might not be true If possible do try it and let everyone know I will also give it a try when time permits
Thanks,
Prakash -
Sender JDBC adapter...problem
Hi,
the real problem is Sender JDBC adapter sends data in following format.
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<row>
<Associate_ID>16444</Associate_ID>
<Associate_Name>Sudhir</Associate_Name>
<Status>false</Status>
</row>
</resultset>
But in Design time mapping...structure of source message will be like
<?xml version="1.0" encoding="UTF-8"?>
<ns5:DB2File_DB_MT xmlns:ns5="urn:db2file">
<Resultset>
<Row>
<Associate_ID>16444</Associate_ID>
<Associate_Name>Sudhir</Associate_Name>
<Status>false</Status>
</Row>
</Resultset>
</ns5:DB2File_DB_MT>
How does this tag ... <ns5:DB2File_DB_MT xmlns:ns5="urn:db2file"> get generated in runtime
and apart from 1 to 1 mappings b/w the three fields above in the row tag...wt other mappings to be performed
Pls help...
SunitaHi Sunita,
what i understood from your query is namespace tag is coming while message mapping. This namespace can be avoided in the message type if you keep the XML namespace field empty while creating message type. But i afraid you have to do the message mapping again.
Regards,
Satish -
Error when using receiver JDBC adapter
i am using JDBC adapter as receiver(for oracle 10g) now, however i got ORA-00984 error. So i enable logSQLStatement.
then got the following SQL statement from communication channel monitoring:
INSERT INTO BASEINFO(APPNO, BUSSINAME, APPPERSON) VALUES (3, Steven, Lee)
I realize the statement is incorrect, which should be:
INSERT INTO BASEINFO(APPNO, BUSSINAME, APPPERSON) VALUES ('3', 'Steven', 'Lee')
So how can i correct the SQL statement? is there any setting i miss out in configuration?
ThanksYou may try this. For each field in datatype, add an attribute hasQuot. Map it to "no" in mapping. Then add single quotes to all the values by simply concatinating it on both sides of value.
Regards,
Prateek -
Xi JDBC Adapter - Query SQL Statement & Update SQL Statement
Hi!
I configure the JDBC adapter sender (XI) to take data from Oracle database.
I set the Query and Update SQL Statement in the Processing parameters of the communication channel in this way:
Query SQL Statement :
SELECT * FROM XI_TABLE WHERE STATUS = 'WAIT' ORDER BY ROW_NUM
Update SQL Statement :
UPDATE XI_TABLE SET STATUS = 'DONE', DATE = SYSDATE WHERE STATUS = 'WAIT'
My question is :
If a new record with the field STATUS = 'WAIT' is added to the table (xi_table) during the time between the execution of the query statement and the start of the update statement, what will happen to that record during the update?
There is a way to avoid the update of that record? or to pass to the update statement only the record selected in the query statement?
Please, may you give me some example?
Thanks,
Francescohi,
did you check "Isolation Level for Transaction"
for the sender jdbc adapter?
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Regards,
michal
Maybe you are looking for
-
Hi All, I can see workflow for object when i click play like button just beside actions button on transaction in GUI. Where i can see the same thing on crm webui. Is there any specific assignment block . I want to see workflow overview on that parti
-
I upgraded to Firefox 8.01, but now Amazon and Yahoo! both say I have to upgrade
Both sites say I have to upgrade to the latest browser and won't load some content. For Amazon, the issue is with the Gold Box Deals where they display the message: /Sorry, this browser is not supported by our Lightning Deals widget./ The previous ve
-
Disadvantage with 'Execute Immediate'
What is the disadvantage with 'EXECUTE IMMEDIATE'.
-
Validation rules - long time of promotion
Hi guys, We have verry big problem that we need to resolve as soon as possible. On almost every form (we have about 100 of them) we have validation rules (on some even three or four rules). Every rule checks some values on form, and do not let users
-
TextEdit: Saving and opening menu items don't work
I create a new document, type a couple of sentences. Then when I hit "Save", a dialog box should open where I enter the document name - but nothing happens. The same with the "Save As ..." and the "Open file ..." menu options - no reaction. It used t