Search code examples
springhibernatesaphibernate-mappingspring-orm

Hibernate SAP integration


Can we integrate Hibernate and SAP? I do have integrated a few databases with Hibernate. Since am not aware of SAP, I want to know if there is any support provided by Hibernate to integrate it with the SAP.


Solution

  • As far as I know I don't think that exists. SAP has its own data mapping strategy known as Open SQL and also provides special functions to insert, update and delete data that also ensure data consistency, those functions are called BAPI and unless you have an SAP connector to call these BAPIs then there's not much you can do. For more reference check this .Net connector example.

    Sure you can make a connection directly (if the system administrator and/or DBA let you) to the database however is not advisable and is very dangerous because you could create inconsistencies in the system. Please do not try this approach.

    However you can make use of software like the connectors I mentioned before or you could use the SAP interface system. You can find more information on this issue checking out the terms ALE and IDocs.

    Another strategy is using an intermediate table on a database where you and SAP take and write data and with some controls communicate each other but on this issue you would use a BAPI in case of using a standard table or making a custom table (Z table) where you have more freedom to make your own changes.

    Hope it helps