cancel
Showing results for 
Search instead for 
Did you mean: 

Error with Asynchronous RFC call to JDBC

Former Member
0 Kudos

Hi all,

We are working on a scenarion where in we have to make an asynchronous RFC call to JDBC.

We have configured RFC sender adapter following this weblog

/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step

We have created data types only for the database as RFC does not require any data types.

And also we have created message types,message interfaces accordingly.

In Message Mappping,we mapped the export parameters of RFC to the access fields of database message type.

Also we have created sender agreement,interface determinations etc.... accordingly

And for sending RFC request asynchronously we followed this weblog

/people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous

Once done with all the above steps we could able to trigger the RFC call and caught with the following errors in SXMB_MONI and no errors are seen in communication monitoring

SOAP Error:

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

+- <!-- Request Message Mapping+

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_curr_exg_mm2_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" /> <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_curr_exg_mm2_: RuntimeException in Message-Mapping transformatio~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Also trace shows the following error thogh the interface determinations are properly configured

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />

- <!-- ************************************

-->

<Trace level="1" type="T">--start sender interface action determination</Trace>

<Trace level="1" type="T">select interface BAPI_EXCHRATE_GETCURRENTRATES*</Trace>

<Trace level="1" type="T">select interface namespace urn:sap-com:document:sap:rfc:functions</Trace>

<Trace level="1" type="T">no interface found</Trace>

<Trace level="1" type="T">--start receiver interface action determination</Trace>

<Trace level="1" type="T">Loop 0000000001</Trace>

<Trace level="1" type="T">select interface *</Trace>

<Trace level="1" type="T">select interface namespace</Trace>

<Trace level="1" type="T">no interface found</Trace>

<Trace level="1" type="T">--no sender or receiver interface definition found</Trace>

<Trace level="1" type="T">Hence set action to DEL</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />

<Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>

<Trace level="1" type="B" name="SXMS_ASYNC_EXEC" />

- <!-- ************************************

-->

<Trace level="1" type="T">----


</Trace>

<Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>

the above errors are shown as part of request mapping..

Can any one please let me know what other configurations do we need to do?

I did not map the RFC import parameters,do we need to do that

Any help in this regard is really appreciated

Rgds,

Santhosh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Santhosh,

copy and paste the payload into the test-tab of message-mapping. Then test it!

Regards Mario

Former Member
0 Kudos

Hi Santosh,

The problem is message mapping you need to test it with payload to reach upto root of cause.

As Mario have suggested, go to SXMB_MONI and get the payload i.e coming from RFC,

On selecting payload, you will get it in right hand window. Right click on window and select the source code. Copy that source code and use for testing the message mapping.

or you could get the payload from RWB --> Component Monitoring -->communication channel.

Here see the log for the RFC communication channel and click the link of message ID and look for payload in it.

In IR, message mapping-->test tab --> copy the payload source data in "src" tab and test it.

Thanks

Swarup

Former Member
0 Kudos

Hi all,

thanks a lot for the inputs...

I mapped the response of RFC to JDBC message type.

I checked the pay load,it is as follows and copied this payload to excute payload in Message Mapping and got the same error

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

<DATE>2008-01-26</DATE>

<DATE_TYPE>V</DATE_TYPE>

<RATE_TYPE>M</RATE_TYPE>

<SHOW_PROTOCOL />

<EXCH_RATE_LIST />

<FROM_CURR_RANGE />

<RETURN />

<TO_CURRNCY_RANGE />

</rfc:BAPI_EXCHRATE_GETCURRENTRATES>

What I could see is the data in payload is the import parameters of BAPI,but our requirement is the export parameter of BAPI should pass to to JDBC.

We mapped the export paramters of BAPI to jdbc

And in test of message mapping if we give data in Export paramter of BAPI,the test shows success

Please suggest,as what extra steps do we need to do to solve this error

Thanks for the help

Regards,

Santhosh

Former Member
0 Kudos

Hi,

I am really happy to hear that the problem with mapping is resolved.

Now as per your requirment It needs to be aynschornous RFC--> XI ---> JDBC call. In XI you should map the RFC Export parameters to the traget structure of JDBC.

then the question is to how to trigger the RFC Function Module in R/3 to XI.

Plesae follow below steps to trigger it from SAP R/3

1. Create a RFC in the R/3 system

2. Configure the SM59 and Sender Communication channle as given in the Michal's blog. Also test if it is succesful.

/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step

3. Import the RFC in XI

4. Do the mapping to the target strucutre

5. Configure the JDBC receiver adapter

/people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn

6. You can trigger the RFC from R/3 sytem by using

Async Call - in ABAP program use below syntax to call RFC. Here the export parameters will be passed on to XI which further have mapped to JDBC.

CALL Function "RFC Name" IN BACKGROUND TASK destination <sm59 destination>

COMMIT WORK.

Sync Call

CALL Function "RFC Name" destination <sm59 destination>

Thanks

Swarup

Edited by: Swarup Sawant on Jan 27, 2008 9:14 AM

Former Member
0 Kudos

No Swarup,

The mapping problem has not been resolved yet.

When I execute with payload I am getting the error even in the test.

I already did the steps you gave for asynchronous call.

see my post on the top you can see the steps I followed

Actually the I could see the asynchronous call is happening.

but the thing is the import parameter of BAPI is passed in XML,but we want our export parameter(Output of BAPI) to be passed in the XML

Hope I am clear with my question

Regards,

Santhosh

Former Member
0 Kudos

Hi Santosh,

I apologise for miss-interpreting you question.

1. I am assuming that you are using the dummy RFC as its is mentioned in blog

/people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous as per your above details.

2. If you want to use RFC as Async Sender then it will allways consider the import parameters. Thus you need manipulate it with dummy RFC where you are using the Export parameters as Import parameters in dummy RFC.

3. As per your detailed explanantion about successful execution of mapping test with export parameters, I am doubtful if you are considering the dummy RFC function module.

Plesae can you verify about it.

This will probably serve your purpose. Let me know about it.

Thanks

Swarup

Edited by: Swarup Sawant on Jan 27, 2008 11:14 AM

Former Member
0 Kudos

Hi Swarup,

Thanks for the qucik reply.

I am not using the dummy function module,infact wrote a report and in that I am calling the BAPI as follows:

CALL FUNCTION 'BAPI_EXCHRATE_GETCURRENTRATES' IN BACKGROUND TASK DESTINATION 'RFC2DB'

EXPORTING

DATE = sy-datum

DATE_TYPE = 'V'

RATE_TYPE = 'M'

  • SHOW_PROTOCOL =

TABLES

FROM_CURR_RANGE = FROM_CURR_RANGE1

TO_CURRNCY_RANGE = TO_CURRNCY_RANGE1

EXCH_RATE_LIST = EXCH_RATE_LIST1

RETURN = RETURN1

Somhow we are able to resolve the mapping error.And we could see success flags in SXMB_MONI.

But the data is not passed to JDBC.

I could see import paramters of RFC in the inbound payload message but I need the export paramters(i.e, the output of the BAPI to be passed)

Hope I am clear...

And according to ur reply,do u mean that we should create a dummy RFC which uses the export parameters of BAPI_EXCHRATE_GETCURRENTRATES as import paramters.And do we need use that dummy RFC in XI

Is it so?Plz clarify

And thanks again for the help

Rgds,

Santhosh

justin_santhanam
Active Contributor
0 Kudos

Santhosh,

Leave the mapping issue apart for sometime. First you need to clear the inbound payload issue. In the report which you wrote in R/3 , can u check whether the exporting paramters are correct?

Plz refer

/people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1

/people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2

raj.

Former Member
0 Kudos

Hi Santosh,

You have to use dummy RFC function module. Its necessary to pass the Export parameters of 'BAPI_EXCHRATE_GETCURRENTRATES' to dummy RFC Function module as import parameters.

then n then it will be possible to see some data to be passed to XI.

Please do the appropriate changes and it will definatly work.

Let me know about it.

Thanks

Swarup

Former Member
0 Kudos

Hi Swarup,

That's really wonderful..

Full points to you....

Thanks a lot for the help...You saved a lot of time for us

Regards,

Santhosh

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Santhosh,

It says there is error in Message Mapping. Did you tested your message mapping in test tab?

raj.

agasthuri_doss
Active Contributor
0 Kudos

Hi Santhosh,

As Expert Raj mentioned check the Message Mapping Tab and also check the source data to the system, Whether all the mandatory fields has value.....

Regards

Agasthuri Doss