cancel
Showing results for 
Search instead for 
Did you mean: 

qestion about idoc -> jdbc adapter

Former Member
0 Kudos

After IDoc is successefully writed to the database with jdbc adapter, I need to change the status of the original outbound IDoc in the sender SAP system. If some errors happen (for example, violation of Primary Key), then I need to change the IDoc status to another value.

One of the solutions I know is that: I can use a BPM in which I send a synchronize call to the receiver jdbc adapter and check the insert_count in the response jdbc message. If insert_count is bigger than zero, then the idoc should have been successfully writed to the database. Otherwise, the sql operation should have met some errors. The status of the original IDoc then is changed by sending a Systat01 idoc to the sender SAP system.

My question is that: Is there any non-BPM solutions to this problem? For example, through adapter modules. The jdbc message is actually sent to the adapt only in the module CallSapAdapter and only after the call of this module could we know whether the sql message is successfully executed in the database. But CallSapAdapter is always the last module in the Module Processor for receiver jdbc adapter. So I find on way to check the results of the execution of the CallSapAdapter module.

Any idea is welcome and will be appreciated!

Regards,

Hui

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

You need to use BPM ,as to get back the Response to SAP system thru IDoc. I don;t think so, without BPM it is possible in one interface..

Just my thoughts.

regards,

Moorthy

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

maybe this could be possible in some way without a BPM:

if you can send the IDOC number to a stored procedure (jdbc)

then you can check inside this procedure if the call was ok or not

if it was ok or not call XI (by writing a file with IDOC number from the stored procedure)

then you can just take this file via file adapter and call r3 via systat

but this way you'd only get the DB errors from the stored procedure

if you want to try this out you need to think what should

happen when other errors occur (from JDBC adapter from example)

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi Michal,

I see the non-BPM possibility with your way, but it's a little complex: additonial call to stored procedure with receiver jdbc adapter, and also a file-to-idoc scenario...

I still prefer to using adapter module.

I have found a way to call the CallSapAdapter module in my own module, if no exception is caught then the SQL statement should have been executed successfully, otherwise something wrong happened with the SQL statement.

Now let's assume that we could get the results of the module CallSapAdapter and my next question is: is it possible to send a new message, , for example an IDoc xml message, from within a adapter module?

Regards,

Hui

bhavesh_kantilal
Active Contributor
0 Kudos

Hui,

Idoc's are always Asynch and so , you would need to have a BPM to send a response back to the SAP system!

You would need to go for a BPM ( even though you have been successful with the module concept) make the synch call from the BPM to the JDBC adapter and then on the basis of the response, send back the ALEAUDIT Idoc back to the SAP system / or the response in the appropriate format.

Regards

Bhavesh