SAP BOX

'26/11/30 UPDATE

BASIS / FIELD NOTES

If you rerun a canceled job from SM37, does it continue from the step that failed?

A canceled job does not roll back earlier steps' commits, and the SM37 menu in the documentation offers no way to resume at a chosen step. Using a fictional job of 2,000 items, this note counts what message types A and E leave behind, then covers four ways to run it again and the traps in Active and periodic jobs, based on the ABAP Platform 2025 documentation.

A night job was canceled partway through. Whoever fixed the cause asks: "If I rerun it from SM37, it picks up where it stopped, right?" Rerun it on that belief and data already in the system can go in a second time. After reading this note you can decide what to count before a rerun and which way to run it.

The basis is the background processing documentation in the SAP Help Portal for ABAP Platform 2025 FPS02 (October 2026) and the ABAP Keyword Documentation, release 7.58. The job, programs, messages, counts and dates are all invented, and nothing here was run on an SAP system.

What the documentation covers: no menu entry for resuming

A job is a unit made of one or more steps. On the normal path the steps run one at a time in the order entered, and the job becomes Finished when all are done. The only exception is an external program started asynchronously. If one step fails, later steps do not run and the whole job becomes Canceled. Yet the work that an earlier finished step committed is not rolled back. The job is one unit, but the data is not.

Example SM37 job list. ZFI_NIGHT_01 has two rows: Canceled on 2026-11-02 at 01:00 and Released on 2026-11-03 at 01:00. In the step table below, step 1 ZFI_EXTRACT finished and its committed work stays, step 2 ZFI_POST stopped at item 1,230 and step 3 ZFI_NOTIFY never started. Marker 1 is on the Canceled row, marker 2 on step 2 and marker 3 on the Released row.
List and three steps of the fictional job ZFI_NIGHT_01. Markers 1 and 2 link to the paragraph on a failed step stopping the rest, and marker 3 to the section on periodic jobs. Item 1,230 comes from the 2,000-item example in the next section. The layout is a simplified example based on the SAP Help Portal description for ABAP Platform 2025 FPS02, not a real screen. The Annotation column was added by this note.

The SM37 documentation's menu list has copy (Job → Copy), change (Job → Change) and repeat a single job (Job → Repeat Scheduling). It lists no option to pick a step and start from there. Repeat Scheduling gets just one line of description, so the documentation does not settle which step it starts from. This note's reading: prepare as if every step runs again.

What to count before a rerun: an example of 2,000 items

Say step 2 of the fictional job ZFI_NIGHT_01, ZFI_POST, processes 2,000 items and does a COMMIT WORK every 500. It sent a message at item 1,230 and ended. The place to look for the cause is the job log. The documentation says program messages and termination information go there. For an unhandled E or A message, an entry with message number 564 of message class 00 goes in as well. Even so, you can estimate how many items were committed only if the program writes that as a message itself.

Example job log. 01:04:10, step 002 ZFI_POST started. 01:09:21, message ZF 010 type S, committed 1,000 of 2,000 items. 01:10:02, message ZF 017 type A, item 1,230 has no tax code, highlighted. 01:10:02, 00 564 job termination entry. Markers 1, 2 and 3 are on the last three lines in order.
Four fictional job log lines. The 1,000 items at marker 1 and item 1,230 at marker 2 are the same numbers as the example in the text. 00 564 at marker 3 is the entry named in the text, the message number given in the ABAP Keyword Documentation, and its displayed wording here is illustrative. The messages starting with ZF and their text are invented.

What is certain from these numbers is 1,000 items, up to the commit points at items 500 and 1,000. What is uncertain is the 230 items from 1,001 to 1,230 after the last commit, and the message type decides those. The ABAP Keyword Documentation says that when an unhandled E or A message ends background processing, type A executes a database rollback and type E does not. The sentences in releases 7.50 and 7.58 say the same. An X message or a runtime error ends with a rollback.

So with type A or a runtime error, 1,000 items stay in the database and 1,000 are still to process (2,000 − 1,000). With type E, that page says only that there is no rollback and does not state what finally happens to the 230 items. This note puts the items staying in the database at 1,000 to 1,230 and those still to process at 770 to 1,000, and advises counting directly in the table. The upper end of 1,230 assumes the item that raised the message was written too. If an administrator stopped it with Job → Cancel Active Job, the documentation says only that it terminates immediately, so count the same way.

SAP NOTES

How many of 2,000 items stay in the database

A fictional step commits every 500 items and ends at item 1,230

  • Already committed: 1,000 items

    • Commit points at items 500 and 1,000
    • They stay whatever the message type
  • In flight: 230 items

    • Items 1,001 to 1,230
    • After the last commit, so the message type decides
  • Type A: 1,000 items stay

    • The 230 items are rolled back
    • Still to process: 1,000 (2,000 − 1,000)
  • Type E: 1,000 to 1,230 items stay

    • No rollback per the documentation; the 230 items' fate is not stated
    • Still to process: 770 to 1,000. Count in the table

All item counts are fictional. Message rules are from Messages - Background Processing in the ABAP Keyword Documentation 7.58 and the same topic in 7.50. Not run on an SAP system.

The numbers in the text, drawn. Counts are items: 1,000 + 230 = 1,230 and 2,000 − 1,230 = 770. The range for type E is this note's two end points, because the documentation does not state what happens to the 230 items.

If the program writes with IN UPDATE TASK, updates run separately after COMMIT WORK, so check SM13 as well. That part is outside this fictional example.

What happens if all steps run again? Step 1 runs once more, and step 2 is given the 1,000 items already committed. A program that skips items it already processed has no problem, and otherwise that many items may be duplicated. Which one applies depends on the program. The job menu does not decide it.

Four ways to run it again

The first is Job → Repeat Scheduling, repeating it as it is, for when the program is safe to run again. The second is copying with Job → Copy and editing steps and attributes with Job → Change. The statuses the documentation says can still be modified are Planned, Released and Ready, so edit the copy before it starts. This combination is not written as a procedure in the documentation and is this note's reading. The third is defining a new job in SM36 with only the remaining steps.

The fourth applies when the job is an application job in the Application Jobs app. Restart Job Chains in the documentation offers, for the statuses Failed, Canceled and User Error, From Error Step (skip earlier steps and start at the failed one) and After Error Step (skip up to and including the failed step and go on from the next). After Error Step does not exist for a single-step job, the new job runs immediately with the original job user, and starting and application parameters cannot be changed. This page opened in releases 2021, 2022, 2023 and 2025 but not at the same address in 1909 and 2020. That alone does not show earlier releases lack the function, so check on your system. This option does not settle the count inside the failed step either. From Error Step runs that step again, so items already committed may go in again, and After Error Step skips it, so the 770 to 1,000 items still to process in the example stay unprocessed.

SAP NOTES

Which steps run in each of the four ways

Choose after the job has really ended and you have counted

  • Job → Repeat Scheduling

    • Steps 1 → 2 → 3 (this note's reading, not in the documentation)
    • The 1,000 committed items can go in again
  • Job → Copy, then Job → Change

    • Only the steps you keep, e.g. 2 → 3 (this note's reading)
    • Keep step 2 and the same 1,000 items come with it
  • A new job in SM36

    • Only the steps you define, e.g. 2 → 3
    • Set programs and variants yourself
  • Application Jobs app

    • From Error Step: 2 → 3. After Error Step: 3 only
    • Application jobs only. Parameters cannot change

SAP Help Portal, ABAP Platform 2025 FPS02. Whether items already done are skipped depends on the program, and no path does that for you.

The numbers are ZFI_EXTRACT (1), ZFI_POST (2) and ZFI_NOTIFY (3) from the earlier figure. Check whether step 2 runs in each card to see where the risk to the 1,000 items remains. Only the red card is documented as choosing its start by the failed step.

Still Active means it is not time to rerun

There is also an abnormal path. When a job keeps showing Active, the documentation's first question is whether it is really running. Job → Check Status checks whether the status in the list matches the real status, since a problem such as a lost database connection can stop the status being written and leave the two apart. For an ABAP step, Job → Capture: Active Job, while logged on to the server running the job, opens a debugger at the code being executed. The documentation says this pauses the job, which carries on from that point when you leave with Debugging → Continue. An external program has to be checked at the operating system level.

The second question is whether the job server came back up during the run. Compare the start time and execution host in Job Details with the server start time in the system log. If the server started later, the documentation treats it as a job status that could not be updated, and says you can set the status to aborted manually. This note's advice is not to rerun until the status is certain. If the job really is running, two copies could work on the same data.

Periodic jobs do not wait

The documentation warns that the series of a periodic job carries on when one of its jobs ends abnormally, though a job that never executes at all produces no follow-on. So if the example job is a periodic job running daily at 01:00, the next day's 01:00 job is still there after the cancellation. The Released row in the first figure is that job. If the next period runs before the repair, it may run on half-processed data, so undo the release with Job → Release → Scheduled if needed. That judgment is also this note's reading. A job with its release undone will not run until it is released again, and a job that never executes produces no follow-on, so release it again after the repair.

Next time you see a canceled job, write down three things before choosing Repeat Scheduling. Has the job really ended? How many items were left in the failed step, and with which message type? Does the program skip what it already processed? Answer those and it usually becomes clear which of the four ways fits.

THE END
RSS feedBack to the library
COMMENTS BOX

Add your perspective.

Share a question, another approach, or something you have tried.

Newest first

Checking sign-in…

Loading comments…