Application Development and Automation 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: 
Read only

Shared Memory Areas not accessible in background processing

ged_hurst
Participant
0 Likes
2,543

Hi there

We're using Shared Memory Areas to share data between an on-line transaction and a background program. The on-line transaction collects the data, creates the Shared Memory Area and submits a background job to process it. So, after the detach_commit, it performs submit program via job_name xxxx number nnnn.

It works OK in our dev and quality systems, but does not work in our production system. The memory area is created OK, but the job cannot access it. In the background program, we get the message:

"The read lock on the instance 'ZNNNNNNN' in the client '100' of the shared objects memory area 'ZCL_XXX' cannot be set, since there is no active version of this area instance. However, the area constructor for the automatic construction of the area instance was started."

On the SMA side, we've tried seemingly every combination, even "propagate_instance".

The job seems to be running on the same application server as the SMA.

Any ideas about what we're doing wrong, anyone?

Thanks

Ged

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,421

Hi ,

if possible change it to "Export/Import to Database ID".

regards

Prabhu

6 REPLIES 6
Read only

Former Member
0 Likes
1,422

Hi ,

if possible change it to "Export/Import to Database ID".

regards

Prabhu

Read only

0 Likes
1,421

Hi Prabhu

Yes, thanks for the suggestion. We had that technique lined up as a fall-back scenario, but we would really like a solution to our SMA problem.

Cheers

Ged

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,421

Hello Ged,

Please remember that SHM is accessible across one App Server(AS) only.

If your SAP landscape has multiple AS's then it might pose a problem. When you're scheduling the background job, i guess that the Bgd work process is started in a different AS(load balancing ) and hence SHM is no accessible.

If this is the case, then you've no other option but to store the data persistently in DB clusters viz., INDX-type tables (EXPORT TO/IMPORT FROM DATABASE).

BR,

Suhas

Message was edited by: Suhas Saha

Read only

0 Likes
1,421

Hi Suhas

Almost certainly, you are correct. I seem to remember (it was some time ago now) checking out the AS where the background jobs were running and finding that they were the same but I suppose I was mistaken.

In any case, I think the design of the original application was wrong in trying use SHM in an online/background context. Clearly SHM is most useful in a purely online context where rapid access to complex data objects held in AS memory is needed, without the overhead of additional DB access and processing.

Thanks for your answer.

Regards

Ged

Read only

Former Member
0 Likes
1,421

Hi, maybe the problem is that your system have more than one applications. Can you try with method PROPAGATE_INSTANCE?

regards

Read only

0 Likes
1,421

hi Luca

We already tried, but it didn't work.

Thanks

Ged