Skip to Content
Jul 29 at 09:41 AM

S4 HANA - accessing data identified by T-Code via API vs JDBC

175 Views Last edit Aug 04 at 10:04 AM 3 rev

I have a requirement to access specific objects (specified by a T-Code, e.g. 'BKPF') from S4. I created a trial HANA instance but the S4 schema isn't created there. I also created a S4 trial but I cannot find any properties of the underlying database (in order to connect to the database programatically or with a DB client).

When I'm exploring the API I'm never sure how those objects map to particular endpoints, let's take BKPF (Accounting Document Header) and BSEG (Accounting Document Segment) as an example. I can try to guess that they both should be available under this endpoint:

But an explicit mapping should be available somewhere.

The codes that I'm interested in are BKPF, BSEG, LFA1, LFB1, PAYR, REGUH, SKAT, CSKS, T001, T052U, T003T.

My questions would be:

1. Can I access those tables directly (with a JDBC connection)?

a. from S4 HANA Cloud

b. from S4 HANA On-Prem

2. If not, is there a mapping of those tables to particular API enpoints


I didn't explain my use case properly - I will not have any administrative access to the SAP instance/tenant - I can only access programatically what is already exposed by someone. My application should have a uniform way of accessing multiple instances/tenants. If it isn't something that works out of the box I should be able to provide a package that could be easily installed by the SAP administrator.

From my research I can see though, that those tables that I listed in my original question are regular tables present in SAP. They hold data that seems to be pretty standard (e.g. Accounting Document Header, Accounting Document Segment, Vendor Master (Company Code)). Isn't there a way to map those tables to particular ODATA/SOAP based APIs?