Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in ABAP Memory in case of Background Jobs

0 Kudos

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.

Eg.:
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.

8 REPLIES 8

kiran_k8
Active Contributor
0 Kudos

Sreejith,

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

K.Kiran.

raymond_giuseppi
Active Contributor
0 Kudos

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)

0 Kudos

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

0 Kudos

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

Thank you for responding.

horst_keller
Product and Topic Expert
Product and Topic Expert

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?

0 Kudos

"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!

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Jelena
Active Contributor
0 Kudos

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.