cancel
Showing results for 
Search instead for 
Did you mean: 

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?

former_member231709
Active Contributor
0 Kudos

What is the target system for data extraction(BW/BW4) and version?

0 Kudos

Hi Eugeniy,

Target system is dynamic i mean it can be any Warehouse(e.g. Redshift, Snowflake etc). That logic is in place just need to find way to extract this data.

Accepted Solutions (0)

Answers (2)

Answers (2)

werner_daehn
Active Contributor

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.

0 Kudos

Thank you so much Werner for excellent answer.

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Enda, Thanks for the links but i couldn't find what i am looking for. Can you please suggest more relevant information?