# SAP BAPI Mass Load Runtime and Commit Calculator for ECC

> Source: https://netray.co/tools/sap-ecc-bapi-mass-load-runtime-commit-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Enter records, measured milliseconds per BAPI call and per commit, records per commit and parallel tasks to estimate load runtime, compare with BDC and size error rework.

## Category

developer

## Erp

SAP ECC 6.0

## Audience

- ABAP developer
- SAP data migration lead
- SAP integration developer

## Tool

**Kind:** calculator

**Inputs:**

#### Records to load

**Key:** records

**Type:** number

**Default:** 20000

**Min:** 0

**Step:** 500

**Unit:** records

#### Method

**Key:** method

**Type:** select

**Default:** 2

**Options:**

##### BAPI in one program (serial)

**Value:** 1

##### BAPI via parallel aRFC tasks

**Value:** 2

##### BDC CALL TRANSACTION (x3 per record)

**Value:** 3

#### Time per BAPI call, excluding commit

**Key:** ms_call

**Type:** number

**Default:** 250

**Min:** 1

**Step:** 10

**Unit:** ms

**Help:** Measure on a test run with SE30/SAT or by timing 100 calls.

#### Time per COMMIT WORK AND WAIT

**Key:** ms_commit

**Type:** number

**Default:** 150

**Min:** 0

**Step:** 10

**Unit:** ms

#### Records per commit

**Key:** per_commit

**Type:** number

**Default:** 1

**Min:** 1

**Step:** 1

**Unit:** records

**Help:** 1 for document BAPIs committed one document at a time.

#### Parallel tasks (server group)

**Key:** tasks

**Type:** slider

**Default:** 1

**Min:** 1

**Max:** 20

**Step:** 1

**Unit:** tasks

#### Parallel efficiency

**Key:** eff

**Type:** slider

**Default:** 75

**Min:** 10

**Max:** 100

**Step:** 5

**Unit:** %

#### Error rate

**Key:** err

**Type:** number

**Default:** 2

**Min:** 0

**Max:** 100

**Step:** 0.5

**Unit:** %

#### Minutes to fix and repost one error

**Key:** fix

**Type:** number

**Default:** 3

**Min:** 0

**Step:** 1

**Unit:** min

**Outputs:**

#### Commits

**Key:** commits

**Expr:** ceil(records / per_commit)

**Format:** integer

#### Serial runtime

**Key:** serial_s

**Expr:** records * ms_call * if(eq(method, 3), 3, 1) / 1000 + if(eq(method, 3), 0, commits * ms_commit / 1000)

**Format:** number

**Description:** Seconds. For BDC the transaction commits itself, so its time is in the x3 factor.

#### Effective parallel factor

**Key:** eff_par

**Expr:** if(eq(method, 2), 1 + (tasks - 1) * eff / 100, 1)

**Format:** decimal

#### Estimated load runtime

**Key:** runtime

**Expr:** serial_s / eff_par / 60

**Format:** minutes

**Primary:** true

#### Records in error

**Key:** errors

**Expr:** round(records * err / 100)

**Format:** integer

#### Rework effort

**Key:** rework_h

**Expr:** errors * fix / 60

**Format:** hours

**Primary:** true

**Chart:**

#### Load runtime vs parallel tasks

**Type:** line

**X:** tasks

**From:** 1

**To:** 20

**Steps:** 20

**Series:**

- runtime

**Disclaimer:** Per-call and per-commit timings are your own measured inputs; the BDC factor of 3 and the efficiency are planning assumptions.

## Content

**Intro:** This calculator estimates how long a mass load through BAPIs takes in SAP ECC 6.0, serial or split across parallel asynchronous RFC tasks, and compares it with a BDC CALL TRANSACTION load. It also sizes the rework from failed records so the cutover plan includes it.

**Sections:**

#### How commits work with BAPIs

**Body:** Most write BAPIs do not commit. They register their database changes in the update task, and the caller ends the logical unit of work with BAPI_TRANSACTION_COMMIT, ideally with WAIT = 'X' so the program waits until the update has finished and the next call can read the result. If a BAPI returns an error in RETURN, call BAPI_TRANSACTION_ROLLBACK instead. Document BAPIs such as BAPI_PO_CREATE1 or BAPI_GOODSMVT_CREATE are usually committed per document, so a failed record does not roll back good ones and locks are released quickly. BAPI_MATERIAL_SAVEDATA processes one material per call; for mass material loads SAP offers BAPI_MATERIAL_SAVEREPLICA. Read each BAPI's documentation in SE37 for its commit rules.

**Bullets:**

- BAPI_TRANSACTION_COMMIT with WAIT = 'X' after each document
- BAPI_TRANSACTION_ROLLBACK when RETURN has type E or A
- Check RETURN for every record and log it

#### The formula

**Body:** Commits = records / records per commit, rounded up. Serial seconds = records x milliseconds per call / 1000, plus commits x milliseconds per commit / 1000. For BDC, each record costs three times the BAPI call time as a planning assumption for screen processing, and the commit is inside CALL TRANSACTION, so it is not added. Parallel aRFC divides the work across tasks, but not perfectly, so effective parallelism = 1 + (tasks - 1) x efficiency. Runtime = serial seconds / effective parallelism / 60. Errors = records x error rate, rework hours = errors x minutes per fix / 60. Measure call and commit times on 100 records in the target system; they vary by object, customising and number range buffering.

#### Worked example

**Body:** 20,000 goods movements, 250 ms per BAPI_GOODSMVT_CREATE call, 150 ms per commit, one record per commit: 8,000 seconds serial, about 133 minutes. With 8 parallel tasks at 75% efficiency the factor is 6.25 and the runtime about 21 minutes. The same load by BDC is 15,000 seconds or 250 minutes serial. At a 2% error rate, 400 records fail; at 3 minutes each that is 20 hours of rework, often more than the load itself. The chart shows runtime falling with tasks until locks, number ranges or free work processes limit it, which is the point to stop adding tasks.

#### Parallel aRFC setup and limits

**Body:** Define an RFC server group in RZ12 with the application servers and quotas you may use. In the load program call an RFC-enabled wrapper with CALL FUNCTION 'Z_LOAD_PACKAGE' STARTING NEW TASK lv_task DESTINATION IN GROUP 'ZLOAD' PERFORMING on_done ON END OF TASK, and collect results in the callback with RECEIVE RESULTS FROM FUNCTION. Each task runs in a dialog work process, so it is subject to rdisp/max_wprun_time and to the quotas in RZ12; handle the RESOURCE_FAILURE exception by waiting and retrying. Group records so two tasks never update the same material or document, or lock conflicts will turn into errors.

**Cta:** If you want load errors explained and grouped in plain English from the BAPI return logs on your own servers, we can add a private AI layer to your ECC data migration toolkit.

**Faq:**

#### Do I need BAPI_TRANSACTION_COMMIT after every BAPI?

**Answer:** For write BAPIs that follow the standard LUW rules, yes: without a commit, the changes are not saved. Use WAIT = 'X' when the next step reads the result, and call BAPI_TRANSACTION_ROLLBACK if RETURN contains an error. Some older BAPIs commit internally, so check the function documentation in SE37.

#### Which BAPI is used for material creation in SAP ECC?

**Answer:** BAPI_MATERIAL_SAVEDATA creates or changes one material per call, with structures for client, plant, storage location, sales and valuation data and their X flag structures. For many materials at once SAP provides BAPI_MATERIAL_SAVEREPLICA. Both need a commit unless the documentation for your release says otherwise.

#### Which BAPI is used for goods receipt in SAP?

**Answer:** BAPI_GOODSMVT_CREATE posts goods movements, including goods receipt for a purchase order with movement type 101 and GOODSMVT_CODE '01'. Pass header, code and item tables, check RETURN, and commit with BAPI_TRANSACTION_COMMIT. The material document number comes back in MATERIALDOCUMENT.

#### BAPI vs BDC in SAP ABAP: which should I use?

**Answer:** Use a BAPI when one exists for the object: it runs without screens, is release stable and returns structured messages. BDC records screen sequences, so it breaks when screens or customising change and is slower. BDC is still used where no BAPI covers a field or transaction, often through LSMW in ECC.

## Search terms

sap bapi commit, bapi_transaction_commit wait, sap bapi for material creation, sap bapi for goods receipt, sap bapi integration, bapi vs bdc in sap abap, parallel processing arfc server group

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
