RFC to JDBC(Insert) async scenario
Hi Experts,
In RFC to JDBC(Insert) async scenario we are getting the the response from JDBC as <insert_count>1</insert_count> after inserting in to DB . Is there any way to stop getting response?
Regards,
Raj
<insert_count>1</insert_count>
Firstly this is not an error but an acknowledgement from the JDBC that the Insert for the corresponding Statement node is successful. The count 1 represents that you have made just one Insert-Statement call to the JDBC......had there been no Insert in the DB then you could have got 0 insetad of 1.
Normally happens when the sender requests for an acknowledgement. Don have knowledge on the ABAP-front so cant comment on the blog given by Prateek, but seems that because of the sync nature of RFC you are getting this ack from JDBC...
Regards,
Abhishek.
Similar Messages
-
RFC to JDBC Sync. Scenario
Hello Guys,
I'm trying to set up a RFC - XI - JDBC Scenario. Where the RFC sends some parameters and the JDBC performs a SELECT Query.
I have a RFC that already was imported with the following definition:
IMPORTING
VALUE(LOGIN) TYPE STRING
VALUE(VIGENCIA) TYPE STRING
EXPORTING
VALUE(LOGIN_RES) TYPE STRING
VALUE(ID_USUARIO) TYPE STRING
VALUE(FECHA_CREACION) TYPE STRING
VALUE(VIGENCIA_RES) TYPE STRING
VALUE(PERFIL) TYPE STRING
I already define the JDBC Request Structure as:
<Statement_Select>
<TableName Action="SELECT">
<Table>USUARIO_WEB2</Table>
<Access>
<ID_USUARIO_WEB/>
<LOGIN/>
<FECHA_CREACION/>
<VIGENCIA/>
<PERFIL/>
</Access>
<Key>
<LOGIN>value1</LOGIN>
<VIGENCIA>value2</VIGENCIA>
</Key>
</TableName>
</Statement_Select>
After testing the RFC I'm getting the following error in the CC monitor:
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. 'null' (structure 'LOGIN'): java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
Can anyone please help me with this? I'm not sure where the error migth be.
Thanks!
FelipeHi Agasthuri,
Yes I'm not passing any value to <LOGIN/> because is a SELECT statement. This is the Request "SELECT" Structure that I'm using. Is there any problem there?
<Statement_Select>
<TableName Action="SELECT">
<Table>USUARIO_WEB2</Table>
<Access>
<ID_USUARIO_WEB/>
<LOGIN/>
<FECHA_CREACION/>
<VIGENCIA/>
<PERFIL/>
</Access>
<Key>
<LOGIN>value1</LOGIN>
<VIGENCIA>value2</VIGENCIA>
</Key>
</TableName>
</Statement_Select>
I'm still with the problem, please help.
Felipe -
Hi All,
Can we do RFC->XI->JDBC->XI->RFC scenario without BPM?
In this SAP-RFC executed with SELECT and Table name
And SAP-RFC expect data from JDBC connection.
If not then what could be the expected steps of BPM?
RegardsHi,
Are you talking about a Sync call. I mean are the Sender and Receiver RFC are the same. If it is a Sync step you can do without a BPM.
Like RFC will initiate the process the XI and the the data is selected from JDBC and the response is given back to RFC.
If the above is not the case you can avoide using BPM by having to separate scenarios.
1. Scenario 1 RFC --> XI --> JDBC
2. Scenario 2 JDBC --> XI --> RFC
If there are some dependencies or due to some constraints if you need to use BPM then you will have the steps like
Receiver Async(RFC)Send Sync(JDBC)Send Async(RFC)
Thanks,
Prakash -
RFC to JDBC Scenario: Multiple Records insertion
Hi All,
I am working with RFC->XI->JDBC to update a single table on an Oracle db.
When I import RFC I get multiple Records.
Here is the sender XML Structure:
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Z_I2_SAP2MDM_VM xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
+ <I_LFA1>
</I_LFA1>
<T_XLFAT />
- <T_XWYT3>
- <item>
<MANDT>800</MANDT>
<LIFNR>0000009962</LIFNR>
<EKORG>1000</EKORG>
<LTSNR />
<WERKS />
<PARVW>LF</PARVW>
<PARZA>000</PARZA>
<ERNAM>ARUCHI</ERNAM>
<ERDAT>2006-05-26</ERDAT>
<LIFN2>0000009962</LIFN2>
<DEFPA />
<PERNR>00000000</PERNR>
<PARNR>0000000000</PARNR>
<KZ>I</KZ>
</item>
- <item>
<MANDT>800</MANDT>
<LIFNR>0000009962</LIFNR>
<EKORG>1000</EKORG>
<LTSNR />
<WERKS />
<PARVW>RS</PARVW>
<PARZA>001</PARZA>
<ERNAM>ARUCHI</ERNAM>
<ERDAT>2006-05-26</ERDAT>
<LIFN2>0000009962</LIFN2>
<DEFPA />
<PERNR>00000000</PERNR>
<PARNR>0000000000</PARNR>
<KZ>I</KZ>
</item>
</T_XWYT3>
</rfc:Z_I2_SAP2MDM_VM>
It takes only the first <item> record. How do i take the second record and insert in the oracel DB.
Seems to me this should be a pretty simple process.
Regards,
RuchiHi ,
You need to handle this with the occurence of the Target Structure of the JDBC Adapter..
Check this help-
http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
DB Datatype structure ?
Hope this helps,
Regards,
Moorthy -
Hi All,
I have one client specific requirement, My scenario is RFC to JDBC async.
Is it possible to know the successfully posting status in async scenario in JDBC side?
Like, from RFC they send details of 10 employee details in one go. And try to insert in DB table . 9th row is not successfully posted in DB.
Is there any way to know the successful posting report ? or can we set ECC and DB table in sync possession. or anyway to read the log (successful or not) from ECC after posting over DB table through PI??Hello,
Are u inserting records directly in a table or using SP?
I would suggest you to use SP and allow DB to handle trasaction, so in case there is any error while inserting records SP will catch the same (using try/catch) and update some status table.
Eventually,either using DB mailer services u can get a report of the records which are sucessfully posted (i would suggest take a log of the failed records) or if u want to use PI then query that status table directly and update the same in ECC.
Thanks
Amit Srivastava -
Reg error in interface mapping in RFC to JDBC scenario
Hi Techies,
Iam trying to map the scenario RFC to JDBC.
In configuration window Iam testing the configuration.
when Iam testing it is giving the error.
" com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_mm_mapping_: Parsing an empty source. Root element expected! "
My mapping is as follows
mt_receiver
statement
ROW
action---insert
ZHRT002----
Table
Item----
access
MANDT
PERNR PERNR
PERID PERID
SHOPN SHOPN
Sender
<?xml version="1.0" encoding="UTF-8"?>
<ns0:ZTEST_PI_ZHRT002 xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<ZHRT002>
<item>
<MANDT/>
<PERNR/>
<PERID/>
</item>
</ZHRT002>
</ns0:ZTEST_PI_ZHRT002>
Reciver
<?xml version="1.0" encoding="UTF-8"?>
<ns1:mt_receiver xmlns:ns1="urn:sap-com:RFC2JDBC"><Statement1><ROW action="INSERT"><TABLE>ZHRT002</TABLE><access><PERNR></PERNR><PERID></PERID></access></ROW></Statement1></ns1:mt_receiver>
Please give suggestion how to go about this.
Thanks in advance,
Regards,
KiranHi,
Please check the payload you are using to test the configuration.
The structure seems to be Incorrect.
Regards,
Deepak -
Hi,
I am trying a syncronous RFC to JBDC scenario wherein i send data to JDBC tables and i response i m gettin the count of number of records that are inserted
The scenario works fine if i try to Insert a new record.
But when i send the same records again its givin followin error message in r/3
"com.sap.aii.af.ra.ms.api.DeliveryException"
In RWB communication channel monitor i get followin
"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. 'QSTAG_OW_OSS' (structure 'Statement1'): java.sql.SQLException: General error"
Can this be capture in Alerts
please tell me how to handle this exception.
Thanks & Regards
Deepak shahHi,
This error comes when ever the data is not inserted into tables by any reason,
like table name is wrong or filed name is wrong.. and
here in ur case the table is not alowed for duplicate records.. so try to send new records and check..i hope it will work for that..
com.sap.aii.af.ra.ms.api.DeliveryException"
this exception is data is not inserted.. so check the query.. or use update_insert with filed as key then u will get responce as number of inserted and number of updated records....
Regards
Vijay -
Error"SYSTEM Failure" while testing the RFC in SE37 : RFC to JDBC Scenario
Hi All,
I am doing RFC to JDBC scenario. When I am testing the RFC in SE37 using the RFC destination created in SM59, I get an error "SYSTEM FAILURE".
Please suggest.
Thanks,
Shyam
Edited by: Shyam Sreepada on Dec 18, 2007 5:46 PMHi,
You must run RFC with RFC destination in background mode, I suggest to read following post in order to understand it better.
Syntax would be:
CALL FUNCTION func IN BACKGROUND TASK
[DESTINATION <your RFC destination>]
parameter list
http://help.sap.com/saphelp_nw04/helpdata/en/8f/53b67ad30be445b0ccc968d69bc6ff/frameset.htm
If you read it you will find that you can't test it directly from SE37, for this either you need to create dummy ABAP program or another RFC where you will call this RFC with background syntax.
Regards,
Gourav
Reward points if it helps you
Edited by: Gourav Khare on Dec 18, 2007 6:07 PM -
Doubt about RFC Destination in FILE to IDOC Async scenario
hi
In FILE-XI-IDOC Async Scenario we are creating RFC Destination in R/3 and XI.
For Asyn we don't want response But We are Creating RFC Destination in R/3 also.
Any specific reason.
Thanks in advance.First you need to have a clear understading of how the idoc adapters works.
In xi we create rfc destination and specify that in the port maintenance on the idoc adapter so that we can establish a connection to the sender / receiver system which contains the IDOC METADATA (IDX2) that is required by the idoc adapter to convert the native idoc into idoc xml format.
In R/3 as sender we create rfc destination so that when the idoc has to be transported to the xi system first it will be sent to trfc port that rfc desination that u define the trfc port contains that the target system address(IP) and logon parameters req.So idoc can be sent to the desired destination.
In R/3 as a receiver to facilitate communication we define rfc dest, partner profile and specify the inbound parameters so that idoc can be posted.
Hope this answers your ques.
cheers
*Raj*
*POINTS IF SATISFIED WITH ANSWER. -
RFC - XI - JDBC - cannot insert in Table !
Hi Experts...
I have a scene RFC - XI - JDBC !
When executing the application in the SXMB_MONI my status is processed successfully!
But cannot insert the data in SQLServer Tables !
Im Message Monitoring i have the erros:
Error No "action" attribute found in XML document ("action" attribute missing or wrong XML structure)
Error Exception caught by adapter framework: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure).
I need to insert in 4 tables --> CRHE, CRFT, CRFV and TLINES
Where CRHE is the father table.
This is my RFC Structure:
CONTROL_RECIPE_DOWNLOAD
CLIENT
CRFT
item
CRID
FTNO
FTTYP
COSTR
VORNR
FTRNR
CRFV
item
CRID
FTNO
FVNO
ATNAM
ATWRT
ATFOR
FVLNR
CRHE
item
CRID
WERK
BID
ADRES
TSTKZ
CRSTAT
KTXT
MATNR
MATXT
INSPLOT
BATCH
DEST
SCHED_START_DATE
SCHED_START_TIME
TLINES
item
CRID
FTNO
FVNO
TDFORMAT
TDLINE
This is my XML Receiver Structure:
msgType_ibatch_po
TABLE1
Statement
CRHE
action
access
CRID
WERK
BID
ADRES
TSTKZ
CRSTAT
KTXT
MATNR
MATXT
INSPLOT
BATCH
DEST
SCHED_START_DATE
SCHED_START_TIME
TABLE2
Statement
CRFT
action
access
CRID
FTNO
FTTYP
COSTR
VORNR
FTRNR
TABLE3
Statement
CRFV
action
access
CRID
FTNO
FVNO
ATNAM
ATWRT
ATFOR
FVLNR
TABLE4
Statement
TLINES
action
access
CRID
FTNO
FVNO
TDFORMAT
TDLINE
How to resolve this problem ??? ...i believe the problem is in the action of Message Mappings ?? ...but have some problems to resolve it !
Some one can Help me !!!
Thanks Very Much for the atention !!
Regards..
Boni.Hi Bravesh...
I don't have error in JDBC adapter !! This is OK !!
When i send the message from XI to R/3 ...in SXMB_MONI it does not contain errors !
When executing the application in the SXMB_MONI my status is processed successfully!
But cannot insert the data in SQLServer Tables !
Im Message Monitoring i have the erros:
Error No "action" attribute found in XML document ("action" attribute missing or wrong XML structure)
Error Exception caught by adapter framework: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure).
thanks.
Boni. -
Can we able to create a scenario in XI like, RFC to JDBC
Hello,
I want to know whether there is any way to create a scenarion like RFC to JDBC.
RFC sends a rfc call with some parameters on sender side.
JDBC stores the data in the receiver side.
Thanks ,
PrakashHi Prakash,
Step-by-step RFC to JDBC scenario:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/step%2bby%2bstep%2brfc%2bto%2bjdbc%2bscenario
XI: How-to on JDBC receiver response:
/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
-Pinkle -
Czech letters in RFC- XI-JDBC scenario
Hello experts,
we want to transfer data to a database in a RFC->XI->JDBC scenario. Everything works fine, but when we transfer czech characters, we only see "?" in the database where a "Č" is expected. In the XI system the letters are displayed correctly (before and after mapping).
How can we solve this problem? Is there any setting for this in the receiver CC?
Best regards,
Davidhi David,
try using ![CDATA[]] in your mapping, i mean send value in to the target field as ![CDATA[ Č ]].
Regards,
Karna... -
RFC-XI-JDBC Scenario: Help with RFC code
HI,
I am doing RFC-XI-JDBC Scenario, where I have to poll the contents of my Ztable in SAP to Oracle.
The appraoach i am using here is :
1. Created a FM with import parameters as the fields of my Ztable and without any export parameter or source code.
2. Created a report to call that FM in background. The code of my report is as follows :
************************REPORT***********************************************************
Data: it_zrfc_read_table type table of zrfc_read_table,
wa_zrfc_read_table like line of it_zrfc_read_table.
PARAMETERS: tab_name like DD02L-TABNAME.
Data: l_tabname type DD02L-TABNAME.
At selection-screen.
select single tabname from DD02L into l_tabname where tabname = tab_name.
if sy-subrc <> 0.
message 'incorrect table name' type 'E'.
endif.
start-of-selection.
select * from (tab_name) into corresponding fields of table it_zrfc_read_table.
loop at it_zrfc_read_table into wa_zrfc_read_table.
CALL FUNCTION 'ZRFC_READ_TABLE2XI'
IN BACKGROUND TASK DESTINATION 'ORACLEGIS_RFC_SENDER'
EXPORTING
valve_id = wa_zrfc_read_table-valve_id
equnr = wa_zrfc_read_table-equnr
ernam = wa_zrfc_read_table-ernam
invnr = wa_zrfc_read_table-invnr
groes = wa_zrfc_read_table-groes
elief = wa_zrfc_read_table-elief
gwlen = wa_zrfc_read_table-gwlen
gwldt = wa_zrfc_read_table-gwldt
serge = wa_zrfc_read_table-serge
typbz = wa_zrfc_read_table-typbz.
endloop.
commit work.
NOw my problem is that although I am able to send a table with a single record, but when my records > 1, it is not able to poll.
Please guide me what can be altered in the code or any other suggestion.
Thanks,
PuneetHi,
Instead of calling RFC many times I would:
1) create RFM with only one import parameter
TYPE your_table type
2) call only once RFM in the report:
CALL FUNCTION 'ZRFCNAME'
IN BACKGROUND TASK
DESTINATION 'RFCDEST'
EXPORTING
pt_table = i_table.
COMMIT WORK AND WAIT.
This will also improve the performance.
Regards,
Jakub -
** RFC to JDBC scenario - Need not source code - Correct ?
Hi Friends,
I am doing RFC to JDBC scenario. It is a synchronous scenario. I think it is need not required to write any code in the source code tab of RFC. Is it correct ...? (Only Import and Export parameters are enough.)
Kindly reply, friends.
Kind Regards,
Jeg P.Hi,
RFC needs only configuration and we will call remote method in R/3. Actual logic present in R/3.
Thanks,
RamuV -
RFC to JDBC Scenario, Date Transformation error
HI All,
I am trying a RFC to JDBC scenario where I am taking date from SAP in SAP Format i.e. 'yyyy-MM-dd' & sending this to oracle DB Where the format is 'MM/dd/yyyy'.
In Runtime Workbench I am getting Following error: 'java.sql.SQLException: ORA-01843: not a valid month'.
Can anybody help me on this.
Thanks & Regards,
Ruchi AgrawalHi Bhavesh,
The Date Problem is Solved. It is Working fine with your UDF code. There were some small changes in your UDF.
Here is the modified code:
String b="";
try
java.text.SimpleDateFormat sdf= new java.text.SimpleDateFormat("yyyy-MM-dd");
java.util.Date date = sdf.parse(a, new java.text.ParsePosition(0));
java.text.SimpleDateFormat sdf1= new java.text.SimpleDateFormat("dd-MMM-yy");
StringBuffer sb = new StringBuffer();
sdf1.format(date, sb, new java.text.FieldPosition(0));
b=sb.toString();
catch(Exception e)
e.printStackTrace();
return b;
Thanks,
Ruchi
Maybe you are looking for
-
Having an issue with CF9 installation
Hello, I'm trying to install CF9 on my computer but I'm having a problem once the installation has completed and it gets to the Administrator and Migration part (the part where it opens a browser). I enter in the admin password and click ok and then
-
Is there a way to disable my premium sond (eq and adio enhancement?
is there a way to disable my premium sond (eq and adio enhancement? Mine is affecting the sound at all so i'm thinking something has been disabled or something as I know I have used it before and it worked
-
IN SALES ORDER committed quantity is getting de-committed
In transaction code V_V2 when we are trying to reschedule sales order qty, the committed quantity is automatically getting de-committed . Kindly let us know as to why is this issue happening. Gurpreet Singh Saini
-
Typing correction defaults 'me' to 'M&E'
I don't know how the iPhone learns typing shortcuts, but I have a really frustrating one. Whenever I type 'me' in an email or text, it auto corrects to 'M&E'. I vaguely recall sending a message with that once a long time ago, but nothing recent. Is t
-
JSP 2.x - Tag files with body-content="JSP"
I've been looking at the JSP 2.1 draft and see that, as with the previous JSP release, it is not allowed for tag-files to have body-content="JSP". I've tried to find a good answer for that on the web, but there's no one who can enlighten me. I've tri