Skip to Content

Issue in ABAP Memory in case of Background Jobs

Feb 08 at 12:07 PM


avatar image

I have developed a program "A" which calls another program "A1" through SUBMIT command. Based on the result of A1, program A updates those values in a table.

(Result of A1 is passed back to program A through ABAP Memory ID.)

Program A works perfectly when run in foreground.
But on running multiple jobs in background simultaneously, it sometimes functions incorrectly.

The issue is that this program "A" is run (in background) daily at midnight for different inputs.

A -> A1
B -> B1
C -> C1

I want to know whether this could be an issue associated with ABAP Memory ID.

Has anyone faced this issue? Any answer/suggestion would help.

10 |10000 characters needed characters left characters exceeded


Did you try with writing the data using EXPORT to DATA BASE IDX instead of MEMORY ID ?



This design is not great, to be honest... If the answers below are insufficient, it'd be beneficial if you could share more details on what those A and A1 programs do exactly. There could be a better solution.

* Please Login or Register to Answer, Follow or Comment.

2 Answers

Horst Keller
Feb 08 at 04:09 PM

What does "sometimes functions incorrectly" mean at all?

And by the way, don't switch to EXPORT TO DATABASE or any other general medium too fast. Then you can can run in real problems in parallel processing, because then you really use the same ressource for multiple programs and have to think about unique keys or locking.

EXPORT TO MEMORY should be perfectly OK, so what's the problem?

Show 2 Share
10 |10000 characters needed characters left characters exceeded

"sometimes functions incorrectly" is because the program worked perfectly fine for some input parameters while for others it didn't. And this used to vary sometimes.

For example, job1 and job2 are run daily with their respective input parameters.

Day 1 - Job1 was correct but job2 was incorrect.

Day 2 - Job1 was incorrect but job2 was correct.

Day 3 - Job1 and Job2 both were correct.

I have a hunch that this issue occurred for those cases where jobs ended at the same time. Although I am not certain.

That is why I asked whether ABAP Memory ID could be an issue in case of Background Jobs.

Thank you for responding!


Yo still don't say what "correct" and "incorrect" means and what it should have to do with ABAP memory.

Raymond Giuseppi
Feb 08 at 12:31 PM

A data cluster in MEMORY ID is shared/available for all programs with a call sequence in the current session and only to those.

Did you

  • Explicitly handle the exceptions that the EXPORT statement may raise (e.g. CX_SY_EXPORT_[BUFFER_NO_MEMORY, NO_SHARED_MEMORY])
  • Check for message in system (SM21) or job (SM37) log?
  • Relase memory (DELETE) when no longer required in the call sequence? (e.g. in case of multiple SUBMIT from same program)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

If the memory lack problem is confirmed, consider export to another medium like database?


I will try catching the exceptions in EXPORT and check out SM21.

Thank you for responding.