cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC TO RFC SCENARIO

Former Member
0 Kudos

Hi,

I am tryiing JDBC TO RFC SCEANRIO.

XI is picking data from MS SEQUEL SERVER but

the same data is not getting mapped into RFC

I am not getting any error as such.

Following are the details.

made a datatype

resultset

row

EmployeeID

LastName

FirstName

message mappping

RFCFORJDBC

resultset outab

row item

EmployeeID----


Empno

FirstName

concatenate--- Empname

Lastname

But for some odd reason

the OUTTAB FOR RFC

is coming like this in message

<?xml version="1.0" encoding="UTF-8" ?>

- <p3:ZZTESTXIJDBC xmlns:p3="urn:sap-com:document:sap:rfc:functions">

<OUTAB />

</p3:ZZTESTXIJDBC>

while payload is getting picked correctly

<?xml version="1.0" encoding="utf-8" ?>

- <resultset>

- <row>

<EmployeeID>9</EmployeeID>

<FirstName>Anne</FirstName>

<LastName>Dodsworth</LastName>

</row>

</resultset>

Kindl help with the same

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

looks like you are missing namespace in the JDBC data, you should mention the docNamespace in the JDBC sender adapter.

Copy your payload and paste this in your mapping test tab. How ? After copying the payload go to Message mapping, there is Tab for Test right next to the Design. click on that and then click on the SRC button in the source message and paste your XML and do a test. Then you will know whats going wrong.

One other precaution is, you can fill the fields in the test tab then click on SRC button to look at what the source XML should look like.

hope you understand, if not post the question again.

regards

Shravan

Former Member
0 Kudos

Hi,

t' was namespace.

It solved issue.

Besides

the sql statement

select EmployeeID , FirstName ,LastName from Employees where EmployeeID > 7

and the output is

<?xml version="1.0" encoding="UTF-8" ?>

- <p3:ZZTESTXIJDBC xmlns:p3="urn:sap-com:document:sap:rfc:functions">

- <OUTAB>

- <item>

<EMPNO>8</EMPNO>

<EMPNAME>Laura Callahan</EMPNAME>

</item>

- <item>

<EMPNO>9</EMPNO>

<EMPNAME>Anne Dodsworth</EMPNAME>

</item>

</OUTAB>

</p3:ZZTESTXIJDBC>

but I see only one record is getting updated

<EMPNO>9</EMPNO>

<EMPNAME>Anne Dodsworth</EMPNAME>

what could be the reason for that

Former Member
0 Kudos

You have to check your ABAP code for that. May be you are not using the INSERT dbtab FROM TABLE <INTERNAL TABLE>.

what you can do is in the RFC function module, dump the whole internal table into a file by using OPEN DATASET,

TRANSFER, and CLOSE DATASET between the LOOP of ITAB and ENDLOOP. That way you will know what you are getting in the internal table.

It would be nice if you assign some points

regards

Shravan

Former Member
0 Kudos

Once you find out what data you are getting, go to SE37 and click on Test button, fill the internal table with couple of rows and debug whats happening. That way you dont have to look for the error.

regards

Shravan

Former Member
0 Kudos

Hi,

Thanks for quick reply.

The RFC is updating multiple rows when tested in R/3

So problem is not there .

Could

it be the type of interface i am using 1 .... unbounded.

and RFC 0....unbounded.

former_member187339
Active Contributor
0 Kudos

Hi deepak,

<i>

>>it be the type of interface i am using 1 .... unbounded.

and RFC 0....unbounded. </i>

Yes it can be, provided your sender JDBC returns atleast one result. One is mandatory. :).

Regards

Suraj