Response in JDBC - update_count
hey all,
I trying to update table in the SQL server.
the update is success but in the response message i get a different
response, i get 0/1/2/30 in the update_count field, although that just 1 record was update.
ex:
req:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:QMFlags_MT xmlns:ns1="http://tara.co.il:pppi:QMFlags">
- <QMFlags>
- <dbTableName action="UPDATE">
<table>OrderPhases</table>
- <access>
<QMFlagLab>1</QMFlagLab>
</access>
- <key>
<Plant>0300</Plant>
<SAPOrder>000001028326</SAPOrder>
<ParentMaterialNo>000000000001398000</ParentMaterialNo>
<PhaseNumber>0130</PhaseNumber>
</key>
</dbTableName>
</QMFlags>
</ns1:QMFlags_MT>
res:
<?xml version="1.0" encoding="utf-8" ?>
- <ns1:QMFlags_MT_response xmlns:ns1="http://tara.co.il:pppi:QMFlags">
- <QMFlags_response>
<update_count>1</update_count>
</QMFlags_response>
</ns1:QMFlags_MT_response>
ex1:
req:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:QMFlags_MT xmlns:ns1="http://tara.co.il:pppi:QMFlags">
- <QMFlags>
- <dbTableName action="UPDATE">
<table>OrderPhases</table>
- <access>
<QMFlagOpr>1</QMFlagOpr>
</access>
- <key>
<Plant>0300</Plant>
<SAPOrder>000001028326</SAPOrder>
<ParentMaterialNo>000000000001398000</ParentMaterialNo>
<PhaseNumber>0130</PhaseNumber>
</key>
</dbTableName>
</QMFlags>
</ns1:QMFlags_MT>
res:
<?xml version="1.0" encoding="utf-8" ?>
- <ns1:QMFlags_MT_response xmlns:ns1="http://tara.co.il:pppi:QMFlags">
- <QMFlags_response>
<update_count>0</update_count>
</QMFlags_response>
</ns1:QMFlags_MT_response>
some one can help?
tanks,
shelly
Hi,
Have never encountered this issue.
Are you able to resimulate this error. What I feel would have happened is that the you would have had another scenario already updating the Table and then when your current scenario is trying to execute the same, it finds no rows to Update!
Would suggest that you recheck the same and then maybe turn on the Trace of your DB to see when the updating to the database is happening and check against your XI scenario's runtime,
Regards
Bhavesh
Similar Messages
-
Hi All,
JDBC(Sender)-XI-RFC (Request)
RFC (Response)-XI-JDBC(Receiver).
Need some solution for sending email for successfully completion of scenario after updating SQL DB Table.
Let me explain the scenario:
We are pooling the SQL DB table to pull the records and map the records to RFC request parameters, after successful Posting the entries in R3 HR, RFC response contain the same with E (Error) S (Success) records status, we are updating the same in SQL DB table, I implemented the complete scenario without BPM with the help of module processor in Sending JDBC Adapter, scenario is working fine but now we have to send the successful mail to our support team with status contain Number of success, Error and total records as email.
I need the solution how to implement the same requirement in current scenario.
Is their way to do something with the RFC receiver adapter module addition to send the successful mail or generating Alert with all the description?
I am at PI 7.0 SP12 with HP unix box.
Thanks in Advance for creative idea
With Regards
SunilHi Bhavesh,
Thanks for your help and your blog is really helpful. I implemented the UDF for generating Email Alert but this alert is generating before Updating the SQL Database, is their any way to generate alert after updating the SQL.
Actually in my scenario we are sending the data from SQL to R3 by RFC and again updating the SQL status whatever the RFC return, after successfully updating SQL we need to send success email to support people but if we are sending the email before updating the DB then their will be problem.
JDBC receiver after updating the SQL DB returns the response with No. of row updated but how to capture this response, if we can capture this response then we can send email through email adapter even their is one more problem, In my scenario I am counting the number of rows with status S and E and sending the same in alert email but if are sending email after updating the SQL DB where can hold the row count value and use it while sending the email.
Implemented the scenario without using BPM..i am using sender JDBC module processor for Syn-Asyn bridge.
Even I do not find the link to reward point. Please let me know how to do it.
With Regards
Sunil -
Facing problem for inserting the RFC return response in JDBC
Hi
Can any one share views for resulting my problem,
This is my scenrio(JDBC>RFC>JDBC) logic follows like this:
Design:
1. MT--X(request from JDBC(A))
2. MT--Y(Response to JDBC(A))
3. Defined Outbound Sync MI(Z) and given request as 'X' and response as 'Y'
4. Imported BAPI--B
5. Done MM between X and B-->request mapping(Zmap1)
6. Done MM between B.Response and Y--->response mapping(Zmap2)
7. Defined the IM between Z and B
a. Zmap1 given as request
3. Zmap2 given as response
And according to that i have confgured CCs,SA,RA,RD,ID.
It seems to be working fine..request map posting data properly in BAPI and also getting response as payload only, but it is not updating in JDBC column, which i mapped as response!it seems to be everry thing is ok..but i dint understand why it is not updating the return response in JDBC side?
Note: Here i'm not using BPM, without BPM i made synchronous.
In SxMB_MONI ..i'm getting response as E or S based on rfc return structure.
Regards
RambarkiHi,
I think there is a mistake in your messaage type to insert into JDBC. The format should be,
<MT>
<statement>
<test action="insert">
<table> </table>
</test>
<access>
<row1> </row1>
<row2> </row2>
</access>
</statement>
</MT>
Your action is an attribute of <test>.
Likewise in your case, you Message should be something like,
<root>
<statement>
<Invoice action="insert">
<table> nameoftable <table>
<access>
<f1> </f1>
<f2> </f2>
</access>
</statement>
</root>
Check out these links on the various options avaiable for the JDBC adapetr and how the action attribute can be used,
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Also, check this simple file to jdbc blog for your reference on JDBS adapter,
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
Hope this clarifies and solves a part of your problem,
Regards,
Bhavesh -
JDBC to RFC.request and RFC.response to JDBC
Hi all,
I have the need of create this scenario: JDBC will pick some records from DB and send them to SAP into a RFC.request, after that, SAP will generate a response that will be sent to XI (via the RFC. response), these data has to be sent back to the DB.
So I am clear in the first part: JDBC sender and sRFC receiver, so that, the response will be sent back to XI, BUT, is there a way to map these response data into a DT_Receiver_JDBC without using BPM???? If so, how?
And, what about the initial loads of data??? Customer wants this kind of scenario to be used then. What do you think about that?
I know XI is not the best approach for this purpose but... And i think i would have to take into account the response time of SAP in synchronous RFC...
Hope you guys may help me on this.
Thanks in advance and best regards,
Davidis there a way to map these response data into a DT_Receiver_JDBC without using BPM?
No. U will have to use BPM.
I have not used it personally with JDBC adapter but u may try this to avoid BPM. Hope it works
http://help.sap.com/saphelp_nw04/helpdata/en/45/20c210c20a0732e10000000a155369/frameset.htm
I know XI is not the best approach for this purpose but... And i think i would have to take into account the response time of SAP in synchronous RFC...
For sync scenario, the response time should always be considered. However, using XI won't be that much of pain. It will surely relieve you when it comes to monitoring.
Regards,
Prateek -
Problem mapping response of JDBC receiver adapter
hi everybody,
I have the following problem. I want to retrieve data from Oracle DB. I execute the following sentence:
"Select count(*) from X". I'm doing that by means of action=SQL_QUERY. The response is something like that:
<?xml version="1.0" encoding="utf-8"?>
<ns0:MT_WM02_request_bbdd_count_response xmlns:ns0="urn:xxx-com:xi:xxx_WM">
<STMT_response>
<row>
<COUNT()>32</COUNT()>
</row>
</STMT_response>
</ns0:MT_WM02_request_bbdd_count_response>
The problem is that I can't map the response because the Integration Builder doesn't allow to develop this kind of element on the Data Type. I mean <COUNT()>. The symbols '(' and '' are not permitted.
How can I solve the problem?
Thanks in advance,
Regards
CarlosChange your query so that, it has virtual name for the count(). Some thing like.. slect count() as xyz ...
VJ -
Don't want JDBC Response.
Hi,
I have a RFC -> XI -> JDBC Scenario.
I don't need the number of inserted rows, but the response of JDBC brings to me. How do I do to ignore it? Because a error appears in <b>Request Message Mapping</b> Step of <b>Response Msg</b>.
The <b>ProcessingMode</b> is synchronous even if I configurated the Message Interface as asynchronous.
Thanks in advance.Hi Luis,
you need to send the RFC request asynchrounous:
CALL FUNCTION 'Z_MY_FUNC'
IN BACKGROUND TASK
DESTINATION 'MY_DEST'
COMMIT WORK.
Regards,
Udo -
Response communication for synchronous JDBC channel
Hi,
We have a Proxy->XI-> JDBC synchronous interface. Is there a necessity for a response receiver communication channel? We just set one up and it always fails with a select statement "Select * from payroll where enddate = "20081012". I never set up this SELECT statement. Just confused if I really need this response communication channel. Any ideas?
TeresaHey
No,you don't need a separate receiver communication channel for response.
JDBC on receiver side can support synchronous interface.
>>fails with a select statement
My guess is that either your mapping is wrong or the receiver/response message structure you have created in Data type is in wrong format.
JDBC Receiver Adapter -- Synchronous Select Step by Step
Thanx
Aamir
Edited by: Aamir Suhail on Jul 13, 2008 10:05 PM -
hi
we are triggering a JDBC stored procedure using MsSQL where we select a name based on the location that we get in the source file.
the structure of the response MT is like below:
<MT_response>
<row> 1..n
<Name> 0..1
what we require is ..that even if the DB doesn't return any rows from a particular location, the response should have the row field nonetheless with the Name field missing.
for example the source file has 2 cities - london and delhi
the Stored proc resultset has 4 names for london and none for delhi.
so we want that 4 rows with Name field should come in the MT_response corresponding to london
and 1 row with no Name field should come in the response for delhi.
please help.Hey itisha,
You will have to convert your MI to Outbound sync for file and inbound sync for jdbc.
Now if you see the interface mapping between this two interfaces .. it will have both request and response mapping..
request mapping is the normal that we use...but after you get the response from jdbc...you do not want the ROW node to go away....then you add a response mapping also where you can do all this kind of transformations
and then send the result file to a folder..
Settings given in the below Wiki will also need to be done...only difference is you scenario is Fileasync to Jdbc sync
but the one given here is File async to RFC sync ...concept however of response mapping and sending response to async file system will remain same
https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/file-rfc-file%2528without+bpm%2529 -
Sender ABAP Synchronous proxy -- PI -- JDBC sync scenario pls!!
Hi Guys,
Can any one help to find one sample scenario like ABAP Proxy --> PI --> JDBC Sync call ? Sync ABAP proxy sample code any 2 or more filelds going from ABAP proxy and maps on JDBC sync request, up date target side SQL server database tables, in case if any error happens error/success message must go back to SAP one Z table with response.
Any help would be really great!!
Many thanks in advance
Sanup date target side SQL server database tables, in case if any error happens error/success message must go back to SAP
one Z table with response.
When you do an update you can get back the number of rows updated in the JDBC response....you can find this in the help page showing JDBC structure. If you are looking for any other response then probably the message needs to be genarated by PI itself after checking the response from JDBC.
Regards,
Abhishek. -
Hi all,
I am trying to execute a synchronous Http to Jdbc Scenario using MS Access table as my back end.
In design part ,I have followed the steps like
1. Created a http req ,jdbc req, jdbc response ,and then http response in Data types and the in Message types.
2.Created Outbound MI with http req and http response as input and output messages respectively,then Inbound message interface with jdbc req and jdbc response as input and output messages respectively.
3.In Message mapping with Http req and jdbc req as request mappings and jdbc response and http response as Response mappings following the Action and access Steps.
Thats Fine with design part
IN Configuration Part, Since it is a Http Sender ,i didnt create any sender agreement and sender communicatin channel.
Then Configured Jdbc adapter properly and i am able to access my table with that.
While Executing ,I can find that my message is sent in Runtime workbench and can find that Jdbc adapter is Running by showing green flag.
I was trying to send an empid of a table as key and expecting to retrieve the complete row of the corresponding key.
But I could not find the response even though everything is fine with XI.
Where Could be the problem ,where can I see the response from jdbc adapter .
Please help me out in solving this .
Thanks and Regards,
KalpanaHi Kalpana,
Can you check this weblog
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
This should help you...
Check the Response Mapping,also you have one IM with Reqest and Response mapping...
Also if you have SP16 then you can have sender CC for HTTP also ...
Regards,
sridhar -
RFC XI JDBC to external database.... Get data in multiple rows
Hi,
We have been really struggling with this scenario. We have created a RFC that has 1 Import parameter (Order_ID) and table parameter (3 Columns: Order_ID, Partner_type, Partner_no).
When we call this RFC in SAP, it should make a connection to external database via JDBC and get multiple row data for every Order_ID. We are not using Oracle Stored Procedure, instead we are using simple Select statement. Did all the mapping and configured correctly. However, we are getting short-dump when we execute RFC. When we checked in XI, it says " Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at "
Has anyone tried getting multiple row information from external database(Oracle) using Select statement in XI ? IF so, can you pl let us know if we need to something different in Mapping ?
NiranjanNiranjan,
Check this blog of mine to see how the datatype for Synchronous Select should be constructed,
https://weblogs.sdn.sap.com/pub/wlg/3928. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
If this looks good, a few checks
1. Check the request inbound payload , i.e the RFC request in MONI. Is this as expected?
2. Check the output of the request mapping and check if this is as expected.
3. Check the response from JDBC, is this as per the datatype defined.
4. Check the mapping from JDBC response to RFC response.
To me this looks like an issue with the JDBC response structure.
Meanwhile to understand how to test mapping, check blog of michal,
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
Regards
Bhavesh -
BPM scenario using JDBC and acknowledgement
hello
i have the foll. requirement-
mine is a File->JDBC-> File scenario using ack.(BPM is used)
a file is placed. the content of the file is used to select certain data from the JDBC.
The response from JDBC consists of multiple rows, each of has only one field-Name(occurrence 0..1).
This response needs to be mapped to a file.(let us say mapping1)
My problem is, I need to get the number of times the name field is absent from the response(rows) and use the value in another mapping(let us say mapping2)) which is used in sending the acknowledgement.This implies that the acknowledgement data consists of the number of time the name was absent from teh response.
i thought of using a global variable in mapping1.However we cant refer to this global variable in mapping2.
Also in case i use a container element in switch in IP, there is no function to check if a certain field is absent or not.
please help.Hi,
In the BPM say you receive message M1 on which you need to perform the counting
Then in the mapping2 you include this message on the source side alongwith the main source message
In this mapping itself check for the occurence / non-occurence of the node in message M1 and count it.
Then assign it to the required element in the target....you will have two source and one target messages in the mapping2.....
Make sure that your message M1 is not chaanged till it reaches mapping2......i.e. M1 --> transformation --> M1 (with some other data format in the same structure)....it will work.
Also in case i use a container element in switch in IP, there is no function to check if a certain field is absent or not.
you can check the existence of a field in the Switch block:
For XI:
Include a Switch Block --> Click on the condition section of the switch --> select the Xpath of the element from the desired message --> Click Ok --> Then select the Right Operand in the Condition Editor as EX --> Click OK
For eg: p1:EmpData/FirstNam EX........it will execute the IF branch if FirstName field exists
For PI7.1:
Refer this thread:
Re: Using element of message in condition editor in BPM
Regards,
Abhishek. -
JDBC Sync - RFC Sync Scenario without BPM
Hi Experts,
I am using JDBC - RFC - JDBC Scnario. The concept is
JDBC is reading data from tables and send data to RFC, after updating RFC is giving response to JDBC to update its tables.
JDBC - RFC - JDBC.
Is it possible to do this scnario without using BPM?
Experts pls advise me.
Regards
BalaHello Bala,
These links are useful to you..
JDBC Sender/Receiver adapter
/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/jdbcTOJDBC&
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Thanks,
Satya -
Hi All,
I am doing the File to JDBC(Sync) to RFC through BPM
Start->Receive(Ansc)>Send(sync)>send(Anyc)>
I have created like this:
DT and corresponding MT
1. File
2.JDBC_Req
3.JDBC_Req_response
i have created Message interfaces bellow
File outbound
File outbound Abstract
JDBC sync inound
JDBC Sync Abstract
JDBC response Asyc Abstract
I have created Mappings like this
File to File outbound Abstract
File Abstact JDBC_req
JDBC_Req Abstact to JDBC_Req
JDBC_res Abstact to JDBC_res
JDBC_res Abstact to RFC
I have created Interface Mappings like this
File to File Abstract
JDBC_req to JDBC_res
JDBC_res to RFC
while i am doing in BPM i am getting error like this:
Message File Abstact to be received and synchrounous interface MI_JDBC_req_Abstact are not of the same type
Pls suggest me how i can map the File Abstact and JDBC Abstact.
Thanks,
VenkatHi,
According to my understanding your scenario is:
1) Pick a file from some file server
2) Send it to a BPM
3) Send this file as a request to JDBC and get back the response....i.e synchronous..
4) Once you get the response from JDBC map it to a RFC structure and send it to the specified destination.
If the above flow is correctly understood by me then the following design won't work....
Start--Receive--Receive--Tranformation--Send(Sync)--Send--End
Your design should be:
Start --> Receive (async) --> Transformation --> Send (Sync) --> Send (Async) --> End
1)
a) Define an Outbound-Async MI for File Sender
b) Define an Abstract-Asynch MI for BPM ....(include in first receive step of BPM)
MT for (a) and (b) shoulde be same...
2) Define an Abstract-Async MI....this should have the request structure for the JDB
3) Create a mapping between MI from step 1a and 2...(include in the Transformation step of BPM)
4) Create an Abstract-Sync MI for BPM_to_JDBC....include the same message-type as that in step2....in the input message (request) part of the sync MI.....(include in the Sync-Send Step of BPM)
5) Create Inbound-Sync MI for the JDBC receiver...again both the message type should be same as that in the Abstract-Sync MI of step4
6) Create Abstract-Async MI for the RFC receiver....(include in the last Send step of the BPM)
I hope that you are defining the MIs with proper message-types and with proper direction...same applicable for container variable definition...please note that all the MIs involved in the BPM should be abstract
The error that you are getting is bcoz of the mismatch in the message-type in the MI....please check it.
Regards,
Abhishek. -
JDBC to RFC synchronous scenario (Urgent).
Dear forum,
My requirement is data is populated in oracle data base.we are fecthing the data from database through XI and sending it to R/3. RFC is sending the response (suceess/failure) to XI. And XI is updating the status message into database.
For this,I have done the JDBC - RFC - JDBC syncronous scenario using BPM. .I got the successfull message under message monitering.Problem is I cannot able to find the data for RFC and JDBC reciever.
Please find the following Configuration steps for the above scenario
3 data types
JDBC request, JDBC response one dummy structure to capture RFC response messages.
3 message types for the above data types
5 message interfaces.
OB request,
OB ABS request,
IB Asyn for dummy,
Syn ABS (JDBC req and dummy structure),
IB JDBC response.
4 message mappings.
Mapping between JDBC request to JDBC request dummy.
Mapping between JDBC request dummy to RFC request.
Mapping between RFC response to JDBC response dummy.
Mapping between JDBC response dummy to JDBC response.
3 Interface Mappings.
JDBC request to JDBC request dummy.
JDBC request dummy to RFC request and RFC response to JDBC dummy response(Synchronous request and responce) .
JDBC dummy response to JDBC response.
Integration Process.
Used following steps.
Recieve step asynchronous -> Send synchronous -> Send asynchronous
I can able to see the payload for sender under communication channel.But the data is not reached to RFC.can any one help me to come out of this problem.
Points will be awarded for helpfull answers.
Thanks & Regards,
Naresh.KHi Seshagiri,
We are trying the same scenario with out using BPM.
Following steps has been done in design(IR).
2 data types for JDBC request & JDBC response.
2 message types for the above data types.
1 outbound synchronous message Interface.
2 message mappings (JDBC request -> RFC request) and (RFC response -> JDBC response)
1 Interface Mapping.
Could you please let me know how to maintain the collaborative profiles & and agreement details in Configuration(ID).
Your valuable assistence is required to complete the interface.
Thanks in advance.
Kind Regards,
Naresh.K
Maybe you are looking for
-
Bom dia pessoal, poderiam me ajudar na seguinte situação. aqui na empresa temos um RE para impressão de NF de fornecedores. Esta NF é lançada na MIRO em MM. Considerando este cénário, gostaria de saber se alguem já aplicou alguma nota SAP para impedi
-
Does namcap differentiate between depends and makedepends ?
In my mesa-r600-git AUR package i have the following dependency lines : depends=('libxt' 'libxxf86vm' 'libxdamage' 'xorg-server' 'libxv' 'libffi') makedepends=('pkgconfig' 'python2' 'talloc' 'libxml2' 'imake' 'git' 'glproto' 'dri2proto>=2.6' 'llvm>=3
-
CAN'T GET DISCOVERER ADMIN FROM DOWNLOADS
I completed downloading all the files for Discoverer Admin. I'm able to run file10 without any errors. But when I try to run the 90201iDS_Win32.exe file, I get an error saying that it is not a valid Win32 application. Please advise.
-
Hi I am not getting the output properly.can anybody sove it. import javax.swing.*; import javax.swing.text.JTextComponent; import java.awt.*; import java.awt.event.*; import java.text.DecimalFormat; import java.text.NumberFormat; class XYZ extends JP
-
So when will we see a fix from apple for the Photo gallery+FF3 problem? It's not a Firefox issue, and it's been known for well over a month, so when will we finally get an official fix?