cancel
Showing results for 
Search instead for 
Did you mean: 

Message interface in synchronous mode but run in asynchronous

pansy_leung
Explorer
0 Kudos

I try to use SAP-XI in synchronous mode with JDBC to JDBC connection.

A 'Outbound' message Interface under synchronous mode is defined for

sender while an 'Inbound' message interface under synchronous mode is for

receiver.

In the sender communication channel, a "select" SQL statement is

placed for getting data via JDBC.

For inbound interface, a stored procedure is triggered and it will

return 2 paramaters.

From transaction SXMB_MONI, I found that the message was in 'asynchronous'

mode and I don't know how to collect the 2 output paramters.

Accepted Solutions (0)

Answers (9)

Answers (9)

pansy_leung
Explorer
0 Kudos

Dear all,

Many thanks for your input and advice. Want to clarify more about

the third JDBC channel suggested b Supriya.

How does this JDBC adapter gets the return values from receiver and

process the table updating based on the return values ?

Pansy

former_member200962
Active Contributor
0 Kudos

have you designed the BPM? You cannot send back the information to JDBC-sender as it does not support SYNC mode.

Former Member
0 Kudos

This is what i have told u in earlier ..Sender JDBC adapter cannot handle response ..

for your response ... Try to go with Supriya ... try to make 1 more jdbc adapter ...

i request supriya ... to elaborate a liittle more on your response handling idea...

Regards

Prabhat Sharma.

Former Member
0 Kudos

Hi Pansy,

For updating the sender back, one more JDBC channel needs to be created.

-Supriya.

pansy_leung
Explorer
0 Kudos

Dear all,

Upon all your suggestions, my testing have a big jump with below results but still have some problem

In the sender communication channel, a "select" SQL statement is placed for getting data via JDBC. It works.

For inbound interface (receiver), below stored procedure was actually triggered and it DOES return 2 paramaters.

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

<ns0:MT_t1 xmlns:ns0="http://xxx.xxx.hk/zxxxx/jdbc">

<update>

<storedProcedurename action="EXECUTE">

<table>LIBRARY.PANSYTEST</table>

<TRNX_TYPE IsInput="TRUE" TYPE="CHAR">001</TRNX_TYPE>

<TRNX_NO IsInput="TRUE" TYPE="CHAR">101048</TRNX_NO>

<OUT_TRNX_TYPE IsOutput="TRUE" TYPE="CHAR">001</OUT_TRNX_TYPE>

<OUT_TRNX_NO IsOutput="TRUE" TYPE="CHAR">101048</OUT_TRNX_NO>

</storedProcedurename>

</update>

</ns0:MT_t1>

Then I got the response message from the inbound interface

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

<ns0:MT_t1_response xmlns:ns0="http://xxx.xxx.hk/zxxxx/jdbc">

<update_response>

<response_1>

<update_count>0</update_count>

</response_1>

<OUT_TRNX_TYPE>001</OUT_TRNX_TYPE>

<OUT_TRNX_NO>101048</OUT_TRNX_NO>

</update_response>

</ns0:MT_t1_response>

This response message was mapped to below message type. I suppose this will be passed

to outbound system (sender) and run a SQL "Update ps_cu_pg1iawd set cu_retrieved_by = "ZCU_CUSIS"

cu_action_cd = 'P' where cu_trx_type = 001 and cu_trx_num = 101048"

BUT the table ps_cu_pg1iawd is NOT updated and NO error was found in SXMB_MONI.

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

<ns0:MT_Response xmlns:ns0="http://xxx.xxx.hk/zxxxxx/jdbc">

<statement>

<PS_CU_PG1IAWD action="UPDATE">

<table>ps_cu_pg1iawd</table>

<access>

<cu_retrieved_by>ZCU_CUSIS</cu_retrieved_by>

<cu_action_cd>P</cu_action_cd>

</access>

<key_1>

<cu_trx_type>001</cu_trx_type>

</key_1>

<key_2>

<cu_trx_num>101048</cu_trx_num>

</key_2>

</PS_CU_PG1IAWD>

</statement>

</ns0:MT_Response>

stefan_grube
Active Contributor
0 Kudos

> I suppose this will be passed

> to outbound system (sender) and run a SQL "Update ps_cu_pg1iawd set cu_retrieved_by = "ZCU_CUSIS"

> cu_action_cd = 'P' where cu_trx_type = 001 and cu_trx_num = 101048"

No, it does not. Sender JDBC adapter ignores response messages.

Former Member
0 Kudos

Hi Pansy,

The scenario is possible, you have to use 2 synchronous message interfaces.

1 is outboud synchronous and the other 1 is inbound synchronous.

In this case, 3 JDBC channels will be involved.

One is sender channel, the other one is receiver channel and the third one to update at source again.

-Supriya.

stefan_grube
Active Contributor
0 Kudos

> I try to use SAP-XI in synchronous mode with JDBC to JDBC connection.

This does not make sense as sender JDBC adapter cannot handle the response.

You need BPM for this.

What do you want to do with the return parameters of the stored procedure?

Former Member
0 Kudos

I have One Doubt ..Whether Sender JDBC adapter can work in Synchronous Scenario ...

Because Once in My case , i tried the same... On Sender JDBC Side i was unable to catch the response .....

So i suggest you to make two scenario ...

and regarding Receiver JDBC ..it will be solved easly ..

Just take care of few things ....

JDBC Receiver Side Message Mapping -


Request Mapping

<StatementName5>

<storedProcedureName action=u201D EXECUTEu201D>

<table>

realStoredProcedureeName

</table>

<param1 [isInput=u201Dtrueu201D]type=SQLDatatype>

val1

</param1>

<param2 [isOutput=true] type=SQLDatatype>

-


blank -


</param2>

</storedProcedureName >

</StatementName5>

Here Param2 is with OUT Type attribute ...

On response Mapping -


Sender Datatype would be like this

<StatementName5_response>

<storedProcedureName_response>

<param2>

val2

</param2>

</storedProcedureName_response >

</StatementName5_response>

hope this will help .,..

Regards

Prabhat Sharma

Former Member
0 Kudos

Hi Pansy,

Make sure that the response message is properly mapped.

Alos, in SXMB_MONI, you should see 2 messages, 1 for request and 1 for response.

-Supriya.

former_member204873
Contributor
0 Kudos

Make sure that you have selected Qiuaity of service as 'Best Effort' in Communication channel.

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm