cancel
Showing results for 
Search instead for 
Did you mean: 

Performance Optimization in Invoice Import to SAP Business One

LucasCruz
Newcomer
0 Kudos

Hello everyone,

We have developed an integration solution for importing invoices from an ERP system into SAP Business One. Our client needs to import approximately 300,000 invoices on specific days within a 24-hour timeframe. The on-premises architecture employs Service Layer servers that are separate from the application and the HANA database.

Despite utilizing batch processing and upgrading both the Service Layer and database hardware, we have not seen an increase in write speed, which remains constant at about one invoice per second, even when sending multiple batches simultaneously. Remarkably, this speed stays constant on configurations with enhanced hardware, whether on a machine with 128GB of RAM in both the HANA database and the Service Layer, or on a setup with 1TB of RAM in the Service Layer and 256GB in the database.

We have activated parallel processing and increased the number of nodes in the Service Layer. However, when sending invoices one by one, the Service Layer becomes unstable, and the system becomes unavailable. It's important to note that these tests are conducted on a test database without real users.

Additionally, we observed that the main performance bottleneck seems to be in the validations, where each POST/Invoices operation, along with other SELECT queries, triggers a SELECT on the OITM table, which takes longer than expected.

Used Tables:

  • OINV
  • INV1
  • INV2
  • INV12
  • INV13
  • OCRD
  • CRD1
  • CRD7
  • OITM

After reaching out to SAP support, we received several SAP Notes. We implemented all the suggested configurations, and some were already in place. Yet, the challenges persist.

Observations: In our testing, we dispatched pre-processed batches of various sizes — 20, 100, 200, 300, 400, 500, 1000 — from Postman directly to the Service Layer, including tests from a Postman instance within the same machine as the SL. This effectively rules out communication issues between the application and the SAP Service Layer as the cause of the underwhelming performance.

The questions we're left with are:

  • Why don't we see an increase in write speed using machines with greater processing capacity?
  • Is there a way to enhance processing capacity or make adjustments in the HANA database that could leverage the available hardware more efficiently to improve write and read speeds? Notably, almost all the database hardware (~90%) and Service Layer (~85%) resources remain available.
  • Is there any way to allow more simultaneous write operations in SAP?
  • Given the locks, is there any configuration that can be adjusted to enhance the throughput of write and read operations in the database?
  • Has anyone else encountered a similar challenge and can offer insights or solutions?

This comprehensive approach seeks to better understand the limitations we're facing and explore potential solutions within the community. Any shared experiences or advice would be greatly appreciated.

Accepted Solutions (0)

Answers (0)