Skip to Content

Fetch SAP S/4 HANA data using JDBC

My use case is to get all SAP S/4 HANA data. I am exploring JDBC for this as i know that ODATA APIs provide only standard objects, while i need all objects. Once i have fetched whole data first time then next time onwards i need to fetch data incrementally means only data which is changed/updated since last retrieval. There is no common field like last_modified which can be used to get updated data for all objects. What is the correct way to achieve this use case?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jun 17, 2019 at 03:18 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 30, 2019 at 01:13 PM

    The information "what changed in S/4 Hana (or in Hana)" does not exist. Hence it cannot be extracted by any common means.

    As you can imagine, this is a problem for many customers and even other SAP products, hence each provide their own mechanisms.

    Examples:

    • BW is using Extractors and they are supposed to provide delta. In reality, the majority provide full-delta only, meaning the entire table content is read every time.
    • SLT, SDI (HanaAdapter) are augmenting the S/4Hana underlying database with triggers that write the change information to shadow tables and use that as the common mechanism.

    So at the moment you have the options to use any of the SAP tools that support delta or to build triggers on the SAP tables yourself.

    PS: If you implement something yourself consider deleted records and the case when a record got changed but not committed for a while. A typical "hey, I add a column change_date to all tables" has both issues. You cannot see deleted records as the record had been deleted. And if you read all changes from 1am to 2am, you will not see the change that happened at 1:58am if it was not committed yet and next time you read from 2am to 3am the now committed record would be visible but has the wrong change_date.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.