Skip to content

Populating SAP S/4HANA ACDOCA Table

While developing or testing applications based on SAP S/4HANA systems, it is necessary to have a good volume of data for stress testing or performance testing. In SAP S/4HANA systems, you cannot just create new random records in the database tables. You must use SAP APIs or another SAP tool to create the test data.

In the finance module, ACDOCA is the table that stores the data for all financial transactions. It's expected to have billions of records in production, while a typical demo system has only 250k records. This guide offers a way to create more records using the SAP Fiori app called Upload General Journal Entry/S28OP) for stress testing and performance testing.

Understanding the Journal Entry app

The Upload General Journal Entry app allows you to upload multiple general journal entries from a spreadsheet file. The idea here is to take a batch of general ledger line items, validate them for consistency, and create financial documents by posting the entries in various accounts which can be used for subsequent processing.

A template of the spreadsheet can be downloaded from the Fiori app and filled in with the journal entry information. After the upload finishes successfully, the journal entries can be directly posted to the ledgers or submitted for verification. We can also search for journal entries that have been uploaded within a specific time range. This app is useful for posting mass journal entries in SAP S/4HANA.

Benefits of this approach

Following are some of the key benefits of using the Upload General Journal Entry app to create test data:

  • The Journal Entry (JE) excel header and item fields are mapped to the backend JE upload program. They are configured to dynamically handle the underlying structure, which validates and posts (or parks) the JE records from the file.
  • A sample Excel file exists for those records that generate errors when the Park/Post button is triggered by the user. This Excel file contains two tabs: one tab contains the actual JE records with errors; the other tab shows the error messages that were raised and their corresponding JE header records, as each error message can be identified by the “Header row no” column. Typically, the standard journal entry functionality is limited because it only permits the creation of a single financial document. For many organizations, it is necessary to upload multiple (or large numbers of) JE documents into SAP Finance.
  • The Fiori app supports .csv, .xls, and .xlsx formats. You can easily validate the file before posting (or parking) the JE records into the SAP system.
  • The app generates an email to the approver who is responsible for the records in the file.
  • Another great feature of this Fiori JE app is when (for any reason) the position of the fields in the file are changed. This would not matter to the accuracy of the file upload. Also, to add any new fields to the file, this simply entails adding the field to the config mapping table, and the underlying code which is written dynamically. This is handled without changing a single line of code.

Understanding upload limits for finance documents in SAP

A finance document in SAP is a record of a business transaction that affects the financial statements of an organization. It consists of a header and one or more line items. The header contains information such as document number, company code, fiscal year, document date, posting date, period, reference key, document type, currency, exchange rate, etc. These line items contain information such as G/L account, cost objects, document and local currency, debit and credit amounts, tax code, etc.

The finance document has a limit of 999 line items. The upload app supports up to 999 finance documents for each execution, which is approximately one million line items. This is also the number of the records created at table ACDOCA.

Using data generation rules

The SAP template spreadsheet provided in this guide is just the blank template provided by SAP and is populated with random data.

The data itself does not matter for the performance testing. The line items values were randomly generated. It used valid account numbers to create some variety of accounts and appear "nicely" in the balance report.

The spreadsheet contains the following sheets:

Sheet name Description
Original The original template sheet downloaded from the Fiori app
2-docs Random data for two FI documents with 999 lines each

The 2-docs sheet contains the values to be uploaded to the Fiori app, and must be the first sheet on the left.

Upload the spreadsheet to the Fiori app

You can find more information on how to execute the Fiori app in the official SAP documentation.

The spreadsheet provided in this guide creates two documents with 999 lines each. The official documentation recommends keeping the line items under 16,000 lines for good system response. From experience, it's known that it's possible to upload up to 999 documents with 999 lines each. It will create one million records in the table ACDOCA per execution, however, expect a very long processing time (approximately one hour).

For more information