cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on use of Jco

Former Member
0 Kudos

Dear Experts,

I need a thought on use of Jco. We're posting the data to ECC using Jco sessions. If the ECC is down Jco holds the transactional data.  I wanted to understand, if Jco posts the data to ECC and ECC is down. So nect time it's up will my transation flow in the BLS/transaction in MII will resume from Jco ?

thank you, in advance.

Regards

Ankit

Accepted Solutions (1)

Accepted Solutions (1)

swaroop_anasane
Active Contributor
0 Kudos

Hi Ankit,

Just to add to Tufale's point, it's difficult to re-start your trasaction from the point it failed but you can create a track table in the local database. This will keep a track of the major action blocks executed in the transaction that involve data flow between the systems and you can add a conditional check on this if the action has been executed and data have been buffered, then do not reload the data but start executing subsequent steps.

Just that this will include an overhead on your logic.

Hope the architecture helps.

Regards,

Swaroop

Former Member
0 Kudos

Hi Swaroop ! Thank you for your post it helps me to better my current architecture.

Happy Friendship Day !!!!!!! cheers !!

Former Member
0 Kudos

Just a point more.. This will involve extensive modularisation of your transactions. Note down important processes and design a transaction for each process. So that when you do track the transaction, you would know which transaction to call and probably pass the inputs too.

All this because, you cannot start the transaction from the middle.

agentry_src
Active Contributor
0 Kudos

Hi Ankit,

I think Swaroop's approach is good for troubleshooting, but a simple transaction to run either scheduled or invoked from a UI which just executes the updates saved locally in either an xml file or in some type of table works pretty well.  I prefer a table, but either way, if they do not successfully execute to ERP (which is unavailable), they remain in the queue until the next time the transaction executes.  The transaction continues to execute (or attempt to do so) until ERP becomes available again at which point the updates go through.

Regards, Mike

Thinking back on the last time I did something like this, I also added a status to each record showing that it failed due to ERP being unavailable.  This was so I could put logic in to ignore retry attempts which was also added to each queue record.

Message was edited by: Michael Appleby

Former Member
0 Kudos

Hello Mike,Tufale and Experts !

Great Bike - your reflections on things you've done, considerably improves our development time.

Something I noticed with JCo use - I wish to get clarity from you is, even in Asynchronous mode on Error. I'm getting the messages ECC is sending in response.

Aren't they suppose to come only in Synchronous mode.

My query is -> I want to use data buffer. And retry sending data to ECC if posting fails. So I would use Asynchronous mode to allow buffering,

PS Can I also receive meesgaes ECC sends in retuen in ASYNC mode of JCO.

Sincerely

Ankit

Former Member
0 Kudos

SAP JCo Function - SAP Documentation. According to the documentation, "Asynchronous On Error" will wait for the initial response. It is in the normal Async mode that transaction doesn't wait for the response. Also, databuffering (In JCo Action) is only done for asynchronous calls.

Former Member
0 Kudos

Yes Tufale. I realised.

So If I can't do data buffering for 'Aynchronous on Error'

Can I somehow retieve in 'Asynchronous call' - whether my posting/update of RFC was successful or not. My requirement is - I need to post data. Get a response (Like only 1 or 0 ) Based on success of posting/update to RFC - I need to update column in MES.

Please advice ?

Sincerely

Ankit

Former Member
0 Kudos

I am not sure Ankit, I don't think its possible. Asynchronous modes are like fire and forget mechanisms..

Anyways, Technical Basis (SAP Library - Components of SAP Communication Technology) . An interesting read about sync/async communication for a RFC. The document too mentions that for any scenario that require immediate response, async is not the way to go.

--

Having said that, if you could write a call back function in ERP that would send an acknowledgment to MII, then the message listeners can trigger a transaction that would in turn update the database. Never done this before, but it should be possible.

Regards

Tufale Ashai

Message was edited by: Tufale Ashai

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Ankit,

   As Rohit said earlier, MII's Data Buffer Mechnaism only works for communication exceptions. The data buffer as such would only store the JCo Action and only that would be executed.

For info on Data buffering you mai consider reading these articles,

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2016cebf-5a17-2e10-63b9-c37ac2...

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/402514e3-a9d4-2e10-d6b0-af46ac...

Incase you want to re-run the transaction, then I would suggest you to use your own data buffering mechanism. Basically, checking if action went through. If No, add an entry to a local database table say MDO, with the transaction path and time stamp. Schedule a transaction to read this table and execute each transaction until all the transactions have been executed. Delete the transaction entry from custom table once it has been successfully executed.

However, you cannot run the transaction from where it left off. The transaction will execute from the start.

Note: If you are using your custom implementation, then it is better you switch off the MII's internal data buffer mechanism. One advantage of using a custom one is you can not only take care of communication exception but also any exception/error/failure message in the response. This will make sure that your message to ECC is received.

Regards

Tufale Ashai.

Message was edited by: Tufale Ashai

former_member211944
Active Participant
0 Kudos

Hi Ankit,

MII Provides Data Buffer functionality for the JCo Action block.

Thus in the JCo action block , you can tell MII to send the request again if some exception comes in the JCo call. Further you can tell the retry interval as well as retry counts.

Have a look at the MII help document:

SAP Library - SAP Manufacturing Integration and Intelligence

Regards,

Rohit Negi.

Former Member
0 Kudos

What I specifically want to achieve is, once ECC is up, the transaction shall resume from that point onwards.

former_member211944
Active Participant
0 Kudos

Hi Ankit,

I don't think this is possible.

MII would buffer only the JCo call thus your transaction would not run again.

Regards,

Rohit Negi.