Error Using Procedure In Sender JDBC
Hi,
I executed a Procedure in Informix DB to started a process. This Procedure has the following return parameters:
RETURNING INTEGER,
DATETIME YEAR TO MONTH,
CHAR(4),
CHAR(10),
DECIMAL(5,2),
SMALLINT,
DECIMAL(5,2),
CHAR(1),
CHAR(1);
My problem is in Inbound Message Payload that received the following error message, because it can´t use "(" as tag definition:
A name was started with an invalid character. Error processing resource 'file:///C:/Documents and Settings/e046515/Configur...
<(expression)>13813020</(expression)>
The DBA guy said that to name the return parameter, he needs apply some Java Patch... but he can´t do this now and we don´t have time to wait for.
Does anyone knows another way to solve this problem?
Regards
Leonardo
Hi Matias,
Whare are the data type for outbound (JDBC) and inbound (??)
All design objects and configuration steps are done. My data type is
Where does the <(expression)> comes from?
That is my problem, it comes from procedure that named the fields with (expression), and I can´t use "(" as caracter.
Thanks
Leonardo
Similar Messages
-
Error while executing the stored procedure through sender JDBC adapter
Hi All,
I am getting below error while executing the stored procedure through sender JDBC adapter.
Database-level error reported by JDBC driver while executing statement 'exec SapgetNextEntity 'SalesOrder''. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor.
what is the problem? any idea to anyone...
regards
Rameshhi Dharamveer,
I am not getting below statement for your reply
Try to use Refrence Cursor it will return u reference of resultset.
I mention SP like this
exec SapgetNextEntity 'SalesOrder'
SapgetNextEntity -
> SP Name
SalesOrder----
> Parameter I am passing...
regards
Ramesh -
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 -
Parameters to stored procedure from sender JDBC
Hi,
I am using the JDBC sender adapter to call the Oracle stored procedure. Oracle version is 10.2. hence I m using function call using select.
My concern is, how to pass the input parameter to Oracle function from JDBC sender.
Regards,
KavitaHi Kavita,
<i>I am using the JDBC sender adapter to call the Oracle stored procedure</i>
<i>Unfortunately, the sender JDBC adapter does not support Oracle's stored procedure/function. Unlike stored procedures from other database vendors, Oracle returns a cursor, not a resultset. The sender JDBC adapter must send a resultset to XI.</i>
Executing an Oracle Stored Procedure from Sender JDBC adapter
[Not sure about latest versions of Oracle]
<i>can I pass the input parameter to this function? </i>
In my opinion, No
<i>If not, I need to change the approach, and need to use receiver JDBC[as need to pass input parameter]. </i>
This could be possible but havent tried it
<i>Can JDBC Receiver adapter support stored procedure for Oracle[10.2]</i>
Yes
Regards,
Prateek -
Executing an Oracle Stored Procedure from Sender JDBC adapter
I could really use some help from someone who had done this before.
I've read the help about using the JDBC sender adapter, but it's not helping enough.
I found this line: "Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs."
That's definately what we want to do, but we can't figure out the syntax.
The procedure in oracle looks like this:
CREATE OR REPLACE PROCEDURE test_ref_cursor
( cur_generic IN OUT result_sets.cur_generic)
as
BEGIN
Open cur_generic for
select
proposal_number,
to_char(sequence_number),
column_name,
column_value,
update_timestamp,
update_user
from
coeus.sap_test;
END test_ref_cursor;
And we have tried every kind of statement we can think of, but the file adapter always gives us an "invalid sql statement" error.
Does anyone know what syntax we need to put in the "Query SQL Statement" in the JDBC sender adapter in order to call this procedure? Or is there something wrong with the procedure that is causing the error?
<i>I will absolutely return and give points, but PLEASE read my whole post before answering and do not just link me to or quote the help for configuring a sender JDBC adapter or blogs that are about the JDBC adapter in general but do not deal with the issues I am having. Thank you.</i>Hi Vanda,
Unfortunately, the sender JDBC adapter does not support Oracle's store procedure/function. Unlike stored procedures from other database vendors, Oracle returns a cursor, not a resultset. The sender JDBC adapter must send a resultset to XI.
There are 2 possible ways you can accomplish this:
1. Use BPM and call the Oracle stored procedure using a receiver adapter via a asynch-synch bridge.
2. Develop a user-module for the adapter, which can be used with a sender adapter.
Thanks
Prasad -
Stored procedure in Sender JDBC Adapter
Hi All,
My Scenrio goes like this ...
Stored Procedure(SQL Server) --- PI -
File
I need to write the results of stored procedure to File.Here I don't need any mapping.So how many DT , MT and MI need to be created?
The interface need to run by 6AM from Monday to Thrusday, how can i achieve this ?
Stored Procedure has only select statement and no Update statement , but it takes Date as Input parameter , so what i need to provide in sender JDBC adapter.
Thanks,
MonishHi Monish,
As per your requirement it is JDBC to File. Please be careful with the structure to be created for sender JDBC. I am unable to understand why you donot require a mapping for this. How XI will send the data to a file then.As per my knowledge if it's file to file and just pick and drop then we can neglect IR and go for ID.But here you are working with JDBC and File so you will be in need of it.
IR:
DT: 2
JDBC_Sender_DT
File_Output_DT(Optional)
You can use the JDBC sender data type structure for File output also.
MT as per your DT
MI:2
Outbound MI: JDBC structure
Inbound MI : File structure
MM: 1
IM: 1
ID as similar to other scenarios.All 1 objects for RD,ID,Sender Agreement and Receiver Agreement.
Sender JDBC channel:
Query: Select * from table where date
But I have a query how are you providing date in input paramerter.It will be dynamically entered into the query right.
You can mention the Avalibility planning for your interface to work in RWB.
Go to RWB>Component Monitoring>Adapter Engine->Communication Channel Monitoring>Avaliablity Planning
Please explain.
Regards,
Nutan -
Error in communication channel sender JDBC AS400
The communication channel worked ok, but suddenly they began to give the following error:
Error during database connection to the database URL 'jdbc:as400://10.1.0.254/afildat' using the JDBC driver 'com.ibm.as400.access.AS400JDBCDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:as400://10.1.0.254/afildat': java.awt.HeadlessException.
The driver was installed again, but error persist.
ThanskHi,
This issue is due the Sender JDBC Server got restarted or down, check the server connectivity.
If you found still the issue then Stop & Start the communication channgel once, surely your issue will be resolved immediately.
Regards
Venkat -
Stored Procedure in sender JDBC
Hey all,
I am trying to call a stored procudure in my sender JDBC adapter to send to an Idoc adapter. In the query statement, do I need to give just EXECUTE <stored proc name> or do I need to set up any special setting in the sender adapter?
-TeresaTeresa,
Which DB are you trying to access?
If it is an oracle DB, then unfortunately, Sender JDBC adapter does not support stored procedures for an Oracle DB.
Reason is that JDBC adapter expects a RESULTSET while Oracle Stored Procedure returns a Cursor.
For any other DB, EXECUTE <STOREDPROCNAME> will suffice.
Regards,
Bhavesh -
How to use Stored Procedures in Sender JDBC Adapter.
Hi Experts,
we are having a lot of legacy application which are on .Net. basicaly using MS SQL & stuff. As a Integration scenario we have to triggered some events from JDBC to XI. How can i do this. Secondly there are multiple tables from which i will be selecting a record & sending it to XI for further processing the Receiver Side we are having SAP system.
How can i use a Stored procedure in XI Sender Adapter ?
Can anybody tell me step by step how to get the XSD of Stored procudere & used in XI. ?
I am new to XI. I have not yet configured any sceneario.
Can anybody guide me step by step how to do this.
I am only intersted in Sender Side configuration.
Regards,
UmeshHey,
check this in the JDBC Sender Adapter Configuration
Query SQL Statement -> Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
JDBC adapter
/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
<b>Cheers,
*RAJ*
*REWARD POINTS IF FOUND USEFULL*</b> -
Calling Stored Procedure from Oracle DataBase using Sender JDBC (JDBC-JMS)
Hi All,
We have requirement to move the data from Database to Queue (Interface Flow: JDBC -> JMS).
Database is Oracle.
*Based on Event, data will be triggered into two tables: XX & YY. This event occurs twice daily.
Take one field: 'aa' in XX and compare it with the field: 'pp' in YY.
If both are equal, then
if the field: 'qq' in YY table equals to "Add" then take the data from the view table: 'Add_View'.
else if the field: 'qq' in YY table equals to "Modify" then take the data from the view table: 'Modify_View'.
Finally, We need to archive the selected data from the respective view table.*
From each table, data will come differently, means with different field names.
I thought of call Stored Procedure from Sender JDBC Adapter for the above requirement.
But I heard that, we cannot call stored procedure in Oracle through Sender JDBC as it returns Cursor instead of ResultSet.
Is there any way other than Stored Procedure?
How to handle Data Types as data is coming from two different tables?
Can we create one data type for two tables?
Is BPM required for this to collect data from two different tables?
Can somebody guide me on how to handle this?
Waiting eagerly for help which will be rewarded.
Thanks and Regards,
Jyothirmayi.Hi Gopal,
Thank you for your reply.
>Is there any way other than Stored Procedure?
Can you try configuring sender adapter to poll the data in intervals. You can configure Automatic TIme planning (ATP) in the sender jdbc channel.
I need to select the data from different tables based on some conditions. Let me simplify that.
Suppose Table1 contains 'n' no of rows. For each row, I need to test two conditions where only one condition will be satisfied. If 1st condition is satisfied, then data needs to be taken from Table2 else data needs to be taken from Table3.
How can we meet this by configuring sender adapter with ATP?
================================================================================================
>How to handle Data Types as data is coming from two different tables?
If you use join query in the select statement field of the channel then whatever you need select fields will be returned. This might be fields of two tables. your datatype fields are combination of two diff table.
we need to take data only from one table at a time. It is not join of two tables.
================================================================================================
Thanks,
Jyothirmayi. -
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 -
How to use a atore procedure in the sender Jdbc adapter
Hi Experts!
I am having a requirement to read multiple data from multiple tables from Oracle database at a time.
In sender side i am using JDBC Adapter. Here i want to know how can we use a store procedure to do this and can any one pls give a blog which guide me in design.
Thanks in advance,
Preethi.Pleasae see this thread
Stored procedure in Sender JDBC Adapter
In space of select statement put
EXEC nameofstoredprocedure
and update statement
Put <TEST> -
Sender JDBC Adapter Supports Stored Procedures????
Dear All,
I was trying to use the Sender JDBC adapter to call the Stored procedure in the Sender JDBC adapter is possible to do this???
I don't think Sender JDBC Adapter is supported to execute the Oracle Started Procedures. With my understanding only the Receiver JDBC Adapter will supported for the Stored Procedures using the message mapping Action = EXECUTE and Table = DBO.EmployeeMasterTable.
Please let me know how to achieve the below scenario.
My Scenario JDBC to RFC
Query SQL Statement:
select * from dbo.emp where flag = 'Insert' or flag = 'Update' or flag = 'Delete'
Update SQL Statement:
UPDATE dbo.emp SET flag = null WHERE flag IN ('Insert', 'Update');
DELETE dbo.emp WHERE flag = 'Delete';
In the my update statement I need to update few data flag with Insert , Update and need to delete the of the old records as mentioned above the query.
In the response mapping I am using the Action = INSERT and Table = emp.
Thanks,
Jane F.Hi Jane,
>>My requirment is to select from the DB and update and delete needs to be done. How I need to call this stored procedure in Sender JDBC adapter.
An example of SP call is mentioned in the previous note Note 941317 - XI / PI JDBC Adapter: Known Problems / Incompatibilities
SP Code
---------- 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;
In sender channel mention
>> SELECT * FROM TABLE(pkg1.f1(5));
>>Is this need to be in the one stored procedure right. Can ou let me know how it should be handled in JDBC Adapter.
Yes it shoudl be a single SP. Mention a select statement as given in above example.
What is your Oracle version?
Regards
Suraj -
Hi,
i am using XI7.0, Sender JDBC error is below;
when i test to connect to Oracle DB in using JAVA Code with ojdbc14.jar which was deployed into XI J2EE, i have no problem with insert update delete in using same code which was used in JDBC adapter in Configuration Time.
but JDBC Adapter on XI(JDBC2JDBC) is not running as well.
please look at the following and please guide.
JDBC Driver : oracle.jdbc.driver.OracleDriver
connection : jdbc:oracle:thin:@60.7.111.211:1577:AACC
S_SSS_MMM_JDBC_MDMALL001CU Sender Adapter v1402 for Party '', Service 'SSS_BS01_TESTBS01_D':
Configured at 12:29:23 2006-07-10
Last message processing started 12:29:55 2006-07-10
Error: Sending message '4299fec0-0fb4-11db-c508-000d604dde82' - failed with unexpected exception - proceed anyway: java.lang.ClassCastException: $Proxy222
last retry interval started 12:29:55 2006-07-10
length 10,000 secs
does anyone know how to fix it?
thanks
venjaminHi Venjamin,
Just try the follwing,
1. The Select Query in your Sender JDBC adapter. Try executing the same query on your DB client and check if it works fine and the data returned by it is of valid format?
2. Is any of the datatype being returned a CLOB or BLOB?
Regards,
Bhavesh -
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
Maybe you are looking for
-
How do I insert multiple pages in a specific order?
I create reports in Word and convert them to Adobe before sending them out to customers. I often need to insert additional (Adobe) pages into the report before sending it out; sometimes I need to insert mulitple (20 or 30) pages. Does anyone know how
-
Settlement profile does not exist
Hi Gurus I am getting an error while creating a Sales order "Settlement profile does not exist" . Error description is "The system has found a settlement rule that is assigned to settlement profile ZSOR. However, this settlement profile does not exis
-
Hi Can anyone give me some useful information on the best ways to design and build a database/booking & dispatch system that can be intergrated through ical, address book and available on my macbook, ipad & iphone and all accessed through icloud. I s
-
F110 Payment Proposal multiple payment lines for same vendor
Hello, Question for the FI community regarding single payments for multiple invoices for the same vendor. Is there any other place that would dictate the grouping (or non grouping) of multiple payment proposal lines for same vendor payment? I underst
-
Script that gives specific names to layers - from bottom to the top
Hi, This is probably an easy one for anyone with JavaScript experience. I have 35 layers that I want to give specific names to (now they're named liked "layer 1, 2, 3" - but sometimes this won't be consistent, so some numbering might be skipped, in o