JDBC Synchronous Scenario - Receiver Adapter
Hello All,
My scenario is I am calling a stored procedure in receiver adapter to inser/update a particular row in SQL Server DB. I am getting the following error :
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Finalise' (structure 'STATEMENT'): java.sql.SQLException: Unsupported parameter type 'dateTime' for parameter 'StartDate' found
Element> StartDate(type>xsd:dateTime)
Attribute-> IsInput(type-->xsd:Boolean)(value=true)
Attribute>type(type>xsd:String)(value=dateTime)
XML formed in target request side to SQL server in Call Adapter is
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_XXX xmlns:ns0="http://XXX">
- <STATEMENT>
- <StoredProcedureName ACTION="EXECUTE">
<TABLE>Finalize</TABLE>
<StartDate IsInput="true" type="datetime">2007-02-02 00:00:00.000</StartDate>
</StoredProcedureName>
</STATEMENT>
</ns0:MT_XXX>
Hi Ravijeet,
This error is beacuse of the mismatch in the format.Check in the database what is the type that is defined for StartDate.It might not be dateTime.
Please do also check if SQL accepts the type as dateTime.
These are the reason why it throwing the exception "Unsupported parameter type 'dateTime' for parameter 'StartDate' found".
Trying to change the type to xsd:date in XI and execute it.Please do also take care the format inw hich u send the date.
Please do let me know if u need furthur information.
Thanks,
Bhargav.
Note:Award points if found useful.
Edited by: bhargav gundabolu on Mar 7, 2008 3:12 PM
Similar Messages
-
JDBC-JDBC Synchronous scenario
Dear All,
We have a scenario below and required your valuable inputs:
From Sender DB system, we have to read 1000 records and update the flag from 0 to 1. PI does the required transformation and using SQL statements, it has to insert in the Target DB system.
Ex: If 100 records failed in Target DB due to some erros in execution of SQL stmt, we need to send these 100 records back to sender and update the flag 1 to 2.
FYI.. There are no Stored Procedures at Target DB system.
We created both Sender/Receiver interfaces as Synchronous interfaces and in the response structure we defined 2 fields to read the primary key of the records, but the response mapping is getting failed.
because JDBC Receiver adapter is allowing to have only insert_count field as response structure.
Is there any way that I can read the failed records.
Please suggest.
Regards,
SrinivasHi Srinivas,
Kindly do like this: Create a JDBC Lookup based on the response with BPM with the Primary Key Fields, Also refer Martens provided blog will helps u a lot.
For creating JDBC Lookups Please refere the following Blogs:
/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
Also refer the following threads:
Re: JDBC Lookup and populate fields for output
Re: JDBC Lookup
Re: JDBC Lookup UDF- To fetch multiple values
Regards
Venkata Rao .G -
No response message in Proxy to JDBC synchronous scenario
Dear Team,
I am working on synchronous scenario Sender ABAP proxy <===> SAP PI 7.31 <===> Oracle Database.All the necessary proxy configuration has been successfully tested.
Business Scenario:
ABAP proxy will send a single Vendor Id to Oracle DB as request and in return , it has to retrieve all the columns related to Vendor as response.Oracle Database stores all the Vendor information.There are 11 columns including the vendor Id in the view for the Vendor records.
Design :
For Request structure:
a-->Created MT for Sender ABAP Proxy with only 1 field for Vendor Id.
b-->Created MT for Receiver JDBC with Action as SELECT , Table with "View Name" , Access with Constant Blank for all 11 column and Key as Vendor Id.
I have been following the link and Bhavesh Kantilal document.
http://help.sap.com/saphelp_nw73/helpdata/en/44/7b7171fde93673e10000000a114a6b/content.htm?frameset=/en/44/7b7855fde93673e10000000a114a6b/f
rameset.htm¤t_toc=/en/ca/b977f1c7814201954f20bb87ad7aab/plain.htm&node_id=71
For Response structure:
Created MT for Receiver JDBC with All the column names.
Created MT for target ABAP ECC with the same 11 column name of JDBC response.
Note :
1.Database team shared a excel file as a sample payload which has all the column names of a vendor and I created my DT with the same naming conventions as they are maintaining in their database i.e. Column names are in CAPs, in the same order and even the special characters in the column name.
2. The PING test connection for Cc works fine to database.
Please read out my queries as the I am not receiving any response from Oracle DB and gives error as timeout exception:
1.Since I am trying to retrieve all the column of the view , am I doing the correct procedure of putting all the column name in the JDBC request structure and making a Select statement. Can I add < * > to fetch all the column name and if so where can I add it.
2. Whats the difference between SELECT and SQL_QUERY and on what circumstances I can add it?
3. How can I test ICO in ID?
4. Can I use any SOAP tool to test the messages? Is there any functionality in NWA to test the messages directly to JDBC .
Hope all your inputs can improve my design part.
Regards
RebeccaHi Rebecca,
Did you go through all of these links below?
PROXY to JDBC- SYNC
Proxy to JDBC Sync, with Idoc Receiver
JDBC to PROXY Sync Scenario | SCN
JBDC Receiver Insert Statement Response
Re: Synchronous JDBC select
receiver JDBC structure
Regards,
Jannus Botha -
SOAP to JDBC Synchronous scenario
Hi experts
As per my requirement iam going to do SOAP to JDBC.
Please guide me how to do SOAP to JDBC (synchronous)
through XI .any step by step docs or blogs related to this
please forward to
[email protected]
if helpful points will be rewarded.
Regards,
Nareshhi..
To send SOAP request u have to download the Altova XML spy tool..
follow this link for SOAP adapter.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
for JDBC receiver adapter follow
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
regards
MAnas
reward if helpful.. -
IDOC to JDBC synchronous scenario
Hi All,
We have the following requirement:
Idoc will be sent from ECC to SAP PI and from PI we update MS SQL server using JDBC receiver adapter synchronously and get the insert/update count as response and send this response back to ECC as ALEAUD or SYSTSTATUS idoc along with the initial IDOC number. So that status of the original idoc gets updated at ECC side.
We have SAP PI 7.31 single stack system.
Following are my queries:
- Can this be achieved using BPM?
- with BPM, how can we send the original IDOC number in the status IDOC which we send back to ECC, is it through correlation feature ?
- Can this be achieved without BPM?
-- How can we send the original IDOC number in the status idoc which we send back to ECC, without using BPM?
Kindly help with suggestions.
Thanks,
JaneHi,
Using BPM you can capture the source IDoc no and also response from d/b(insert/update count) using 2:1 mapping in BPM (source IDoc,Resp-->Target IDoc).
Try the below alternative if you don't want to go for BPM.
Use request response bean and use
"GetPayloadValuebean" ,RemovePayloadValueBeanto store the IDoc no in request flow and remove the same from payload while passing to target system .
PutPayloadValueBean to retrieve the saved IDoc no and put it in response structure .Now in response flow you can pass as per your wish
Sync-Async without ccBPM - Process Integration - SCN Wiki
Insert value from Request message to Response message using GetPayloadValueBean and PutPayloadValueBean
Regards
Venkat -
JDBC Synchronous Scenario Issue
Hi,
I am working on JDBC to RFC which is a synchronous scenario. My sender jdbc channel is configured QoS as Best Effort. Data is getting passed to JDBC to RFC, as this is synchronous the RFC(i.e. response) to JDBC is getting triggered. Now when the RFC to JDBC is triggered i am trying to delete some data in a jdbc table. This delete process is not happening. But in moni both the messages are successfull and in RWB also i couldn't find any error.
Please help me out.
Thanks in Advance.
Regards,
SudheerHi Aamir,
As per your suggestion i have implemented BPM for this scenario and now it is triggering the receiver JDBC channel but in my apapter monitoring i found that my receiver channel is having an error and couldn't process my request.
I have raised a forum thread for this error, please look at the below link for the same and kindly help -
JDBC Receiver CC Error
Looking forward for your help in this regard!!
Thanks in advance!! -
Client Proxy to JDBC synchronous Scenario
I'm using Proxy--PI---JDBC synchronous shcenario, when i execute the proxy from R/3 it is giving me error "RCVR_DETERMINATION.NO_RECEIVER_CASE_BE" in configuration i have used one inbound receiver determination for request, my question is do i need to have one more reciever determination for response.
Thanks for help.No, you do not have to add additional receiver determination
Usually in sync scenario, make sure you have one receiver determination, no arbitration.
If you have condition for receiver detemination, make sure the condition only return one true.
Liang -
JDBC- RFC- JDBC Synchronous scenario (Can't see the response message)
Hello Experts,
I tried this step in creating a synchronous scenario by using steps found in this site -> [http://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File%28Without%20BPM%29|http://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File%28Without%20BPM%29] I just changes File to JDBC. But problem is I see the sent XML message in SXMB_MONI but to response message. I also can't see the Sender interface name for the response message when I tried to use F4 in the Interface Name portion.
Do someone encountered this before? Please help
Regards,
AlfredHello,
I hope someone could guide me on how to set this up cause I only see the sent message but there's no response message in SXMB_MONI. Note that interface was successful, I just want to see what was sent by the response.
Regards,
Alfred -
Synchronous HTTP Receiver adapter
Hi,
I am configuring Synch HTTP receiver adapter. I have created synch message and did message mapping, etc. I am getting some message back from the receiving system but it doesn't have header info like namespace, service, interface name. Hence it fails in response mapping. How do I solve this? Does the receiving application have to send me this info?
thanks,
KPHi,
I presume that the Response message type and the Receiving message types have the header structure defined in it. If this is not the case, you need to add the header info to the Response message type.
If it already has, then:
A) You can either create the relevant mapping between the Response message type and the Receiving message types. Here, you can fill in the constant values, as you know the most of the relevant header info.
B) If this is not the case, the receiving application has to fill in this header info in the Receiving message type.
Hope this helps,
Bhanu -
Stored Procedure issue in receiver JDBC synchronous scenario
Dear Experts,
Below is the description of the Stored Procedure for my requirement which has 1 input and 7 output.
CREATE OR REPLACE PROCEDURE emp_det_proc
p_emp_id IN NUMBER,
cur_det OUT sys_refCURSOR
aS
BEGIN
OPEN cur_det FOR
SELECT * FROM EMP_PERSON_VIEW
WHERE id = p_emp_id;
END emp_det_proc;
Inside the procedure , we can see that Select query is done on a VIEW which has some 7 column and these are the output. The data type description of the ID is VARCHAR2 in Oracle Database 11g VIEW, that's why I maintained VARCHAR in Constant mapping at SAP-PI side.
I am maintaining all the column name present in the view for my JDBC request structure with isOutput and type.
Below is my JDBC request.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_ECCJDBC_EmpStrdProc_JDBCReq xmlns:ns0="urn:empdet:sap:jdbc:storedprocedure">
- <Statement>
- <emp_det_proc action="EXECUTE">
<table>emp_det_proc</table>
<ID isInput="true" type="VARCHAR">200178</ID>
</emp_det_proc>
</Statement>
</ns0:MT_ECCJDBC_EMPStrdProc_JDBCReq>
I tested with other XSD type like INT/CHAR/ but with the same error.
Unable to execute statement for table or stored procedure. 'emp_det_proc' (Structure 'Statement') due to java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'EMP_DET_PROC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
1. I observed that the Key field ID is maintained as NUMBER in Stored Procedure but in the VIEW it is maintained as VARCHAR2.
Could anyone help me to solve the issue with any suggestions?
Regards
RebeccaDear Ramesh,
There are change in the datatype of the Stored Procedure Input parameter. Below is the correct procedure description now.
Select query of the View
My JDBC structure
Observation and querry:
1. In the SP declaration, there is 1 IN parameter which I have created in JDBC structure as p_moi_id and gave the type as INTEGER.
Error : JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'moi_det_proc' (structure 'Statement'): java.lang.NumberFormatException: For input string: "2*********&49"
I assume since the range of the number is limited . Integers are values up to 2147483647 and the number I am using is greater than this values.
2. I assume I have not included the parameter cur_det as OUT. Instead I have maintained the COLUMN names of Select query of the view. Should I remove all the Out parameters which represents inside the View.
3. What could be the Data type equivalent to Oracle sys_refCURSOR in SAP PI?
Please share you suggestion.
Regards
Rebecca -
RFC to JDBC Synchronous Scenario
Hi,
I have to configure a scenario in which by an RFC call we have to select records on a DB table and return them to the RFC as resultset. I'm not using any BPM.
So I've developed all the design objects like:
- MT : MT_Request; MT_Response
- MI : MI_Synch_Inbound with MT_Request, MT_Response end FM ; MI_Asynch_Outbound with MT_Response
- MM : MM_RFC_to_Request (from RFC to MT_Request ); MM_Response_To_RFC (from DB table response to RFC)
- IM : IM_RFC_to_JDBC (from RFC to MI_Synch_Inbound with the 2 MM in request/response tabs)
Also I have a JDBC CC Receiver Synch to perform the Select stm.
My doubt now is: which configuration objects I have to configure ?
The RFC Adapter needs 2 communication channels (Sender Asynch and Receiver Asynch) or only one Synch?
Thanks to all,
GBDear all,
I've created all the required configuration objects in ID:
RFC CC sender, JDBC CC receiver, sender agreement , reciever determination, interface determination, reciever agreement.
But when I run RFC called in background task by a report, I obtain only one message into SXMB_MONI, the one that contains the RFC output. In addition it's not visible into moni the Message Mapping execution.
Instead if I remove the background task mode I obtain no message in moni.
Any ideas?
Thanks,
Gianluca -
Message Interface for HTTP to JDBC synchronous scenario
Hi Experts,
Could you please explain the Message Interface from the below blog. Actually, I am confused with the Outbound Interface. Is it correct?
/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
1. LoginData_Sync_OUT_MI
Input Message : Role_MT
Output Message : LoginData_MT
2. LoginData_DB_Sync_IN_MI
Input Message : LoginData_DB_DT
Output Message : Dummy_DT
Regards
SaraHi All,
Here is my Interface mapping's problem details.
Scenario : I have to pass EmpId as a request from webservice to JDBC, If we have the EmpId address in the JDBC then we have to return the address of the employee as a response to Webservice.
Please find the below datatype, message type and etc., which I have used it for the scenario.
1. Data Types:
a) DT_REQUEST ( Webservice to XI request)
1. EmpId
b) DT_JDBC_REQUEST ( XI to JDBC request)
1. EmpId ,2. EmpName, 3. Company,4. AddressLine1
5. AddressLine2,6. City,7. State
c) DT_JDBC_RESPONSE (JDBC to XI response)
1. EmpId ,2. EmpName, 3. Company,4. AddressLine1
5. AddressLine2,6. City,7. State
d) DT_RESPONSE (XI to Webservice response)
1. EmpId ,2. EmpName, 3. Company,4. AddressLine1
5. AddressLine2,6. City,7. State
2. Message Type created according to the Data Type.
3. Message Interface:
a) MI_Outbound
<b>Output Message :</b> MT_REQUEST
<b>Input Message :</b> MT_JDBC_RESPONSE
b) MI_Inbound
Input Message : MT_JDBC_REQUEST
Output Message : MT_RESPONSE
4. Message Mapping:
a) MM_REQUEST[EmpId mapping]
Source Message : MT_ REQUEST
Target Message : MT_JDBC_REQUEST
b) MM_RESPONSE [Mapping for all the fields]
<b>Source Message : MT_JDBC_RESPONSE
Target Message : MT_RESPONSE</b>
5. Interface Mapping
IM_WEB_DB
Source Interface : MI_Outbound
Target Interface : MI_Inbound
Request :
Source Message : MT_REQUEST
Target Message : MT_JDBC_REQUEST
Response :
<b>Source Message : MT_RESPONSE
Target Message : MT_JDBC_RESPONSE</b>
Here the source Message should be MT_JDBC_RESPONSE and the Target Message should be MT_RESPONSE. But when I tried to create the Interface Mapping I am getting the above bolded Response Messages automatically populated by XI.
Actually, I have followed Siva's blog to do this scenario. Finally confused with the Interface Mapping's response messages. So, please help me out with this scenario steps.
Regards
Sara -
IDOC to JDBC Synchronous interface
Hi Experts,
I am using PI 7.1.
Having requirement of IDOC to JDBC synchronous scenario. When data is coming from SAP to DB it is updating data in to u201CXu201D table, when data response from DB is u201CYu201D table.
How can I configure this interface, Please suggest me.
Best Regards,
Pasi...Hello,
For special problematic of IDOC -> JDBC and sending back acknowledgement have a look to One Logical System Name for serveral BPM Acknowledgements
One Logical System Name for serveral BPM Acknowledgements
Step by Step JDBC Synchornous
JDBC Receiver Adapter -- Synchronous Select Step by Step
Integration with database made easy
Integration with Databases made easy Part 1.
SOAP <=> JDBC Synchronous
SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH
Serialize IDOC XML
How to serialize IDoc XML messages fed into XI
Regards,
Phani -
How to hard code the values in XI for the synchronous scenario?
Hi All,
Actual Scenario : Webservice - XI - Any of the Receiver Adapter(RFC/JDBC) .
The receiver adapter setup will take some more days to complete. So, time being I would like to hard code the response values in XI according to the webservice request and send the response back to webservice. Is it possible?
If it is possible, could you please tell me how to go about for this?
Regards
SaraHey
>>So, time being I would like to hard code the response values in XI according to the webservice request
if ur response is based upon the request,then how can u hard code any value?when u hard code any element.it will always display the hard coded value irrespective of the request.
in case u want to hard code something which does not depends on response or which will always stay the same in ur scenario,then just use the constant function of message mapping to do that
thanx
ahmad
Message was edited by:
Ahmad -
Is synchronous scenario possible with JDBC & JMS adapter?
Suppose,JDBC adapter is updating a table or deleting some entry from a table.Can we have an acknowledgement back that the work has been done successfully??
same qstn for JMS adapter also..
Suppose JMS adptr is communicating with any messaging system,can we have acknowledgement back?Jms Adapter supports Asynchronous scenarios only but If u want to use Synchronous then possible with Standard module beans :
For ex: JMS to Rfc synchronous scenario:
In id:
Sender jms adapter supports Asynchronous scenarios so we have to use standard module beans in Module tab.
Like :
AF_Modules/RequestResponseBean -> 0
CallSapAdapter
AF_Modules/ResponseOnewayBean -> 1
And Provide values in configuration:
0 -> passThrough -> true
1 -> receiverChannel ->provide RECEIVER JMS adapter name ( have to create one more JMS receiver communication channel for responce )
1 -> receiverService ->provide receiver adapter service name (that is provide sender business component because need response for sender )
jdbc adapter :
http://www.****************/Tutorials/XI/SOAP2JDBC/Page1.htm
Maybe you are looking for
-
Outlook calendar no longer syncs after IOS 7 / iTunes update
Running Outlook 2003 on Win XP. Yes that's what IT allows.... Updated IOS7 (now at 7.0.3), tried to sync on the next day at work. Itunes forced me to update (11.1.2.31). Updated iTunes. Notes sync. Calendar does not. iTunes says: Sync Calendars You
-
ITunes no longer opens - please help.
I have no idea what I may have done but here's what it shows when I click on the iTunes icon after a couple of months of giving up on it...Windows Installer - Preparing to Install. Then an erro box pops up showing Problem with Shortcut: The Windows I
-
Hi am having problems with iTunes,I have all my music on my 4s but I bought the iPhone 5 today.is there any way that I can transfer music over to my new phone without using the library?as it doesn't seem to be on my PC anymore.i reset my pc and save
-
Hi experts, How do you obtain the number of fields of a particular table ? I want the count of the fields of a table. Thanks in advance, Chithra.
-
Confused...is FTTC available in this area or not?
Hi, I am just looking for some guidance. I will be moving to a new property in a couple of months, and it appears to be served by exchange DONCASTER NORTH, Cabinet 16 for broadband. Looking at the BT Broadband Availability Checker, it advises that: W