cancel
Showing results for 
Search instead for 
Did you mean: 

DI API - asynchronous integration Java and SAP Business One

asantosa2r
Explorer
0 Kudos

Hello,

I need to make the integration of asynchronous data, need to implement a function in my application that collects changes that have occurred in my DB and update the SAP Business One DB .

Suggestions on how to do this with DI API JCo ?


In this document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/82b5cac2-0401-0010-f2a2-95f55425d... Transaction Notification speak of , but I found samples and details.


Sorry for bad English .


Thank you all for attention!!

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi,

An SBO transaction notification is a stored procedure that gets notified when 'almost' any of SBO object is updated.

Note that this is only when there are changes in SBO DB.

For your requirement, is your source DB your own DB ? or is it from another accounting system ?

Can you create a trigger on this DB ?

If yes, this is what I propose,

1. Create triggers on tables that you want to listen to changes. (SQL Server/Database trigger)

2. In this trigger, log down the key field in a log table. Probably, The ObjType, IdKey, DateTime of changes.

3. Your JCO should periodically check on this table for any new entries, and based on this log, try to update the SBO.

Regards

Edy

asantosa2r
Explorer
0 Kudos

Hello Edy ,

Thanks for the suggestion . It is my source DB . I'm starting in Java EE, has JCO samples?

edy_simon
Active Contributor
0 Kudos

Hi Anderson,

You can check this :

C:\Program Files\SAP\SAP Business One SDK\Help\JCO.chm

Regards
Edy

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anderson

If your DB engine is SQL Server you may also want to check Service Broker and CLR.

Here is a blog entry showing how to use CLR with DI API connection to SAP B1's database:

Also there is a tool called SAP B1 Integration Framework designed exactly for this kind of operations that you need.

Kind regards,

Radek

pierrecanali
Active Participant
0 Kudos

Hi,

Edy's solution is fine, but I won't use triggers because they are not supported.

Try to use TransactionNotification or PostTransaction stored procedures instead.

Regards

Pierre

asantosa2r
Explorer
0 Kudos

Hi,

Edy said "Note that this is only when there are changes in SBO DB.". My goal is to capture the changes of my DB and then insert into the DB SBO through DI API. How is it possible using TransactionNotification ?


Raggards


Anderson

edy_simon
Active Contributor
0 Kudos

Hi Pierre,

Trigger is not supported in SBO database.

As for this OP, the changes/triggers are in his own database not SBO, which is fine.

Regards

Edy

pierrecanali
Active Participant
0 Kudos

Hi All,

Right I've missed this.

Regards