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

Execute code on different user account in background

0 Likes
1,421

Hi,

I have the requirement, whenever a user changes an object, that the system automatically "recalculates" other affected objects in the background. This recalculation should happen immedaitely or at least within seconds after the change occured.

Since the user, might not have sufficient authorizations to access the affected objects at all, the background process must run under a different user account (a service user with high authorization level).

I investigated several optiions and found out that submitting a job with different user may be problematic, since the JOB_CLOSE function module requires special authorization for releasing the job.

Another possibility would be to raise a background event (sm64), on which a background job is registered. This seems to be unproblematic regarding authorizations.

Is this the preferred way of doing it? Or what other ideas you would have?

Best Regards,

Bruno

1 ACCEPTED SOLUTION
Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,069

The background job dependent on the event seems like a good idea, I'd go with that.

3 REPLIES 3
Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
1,070

The background job dependent on the event seems like a good idea, I'd go with that.

Read only

Former Member
0 Likes
1,067

Worlkflow or background events(SM64) are ideally suited for your requirement. Otherwise you may also think of job scheduling if the selection is not problematic or may be capturing the details in a table that a regular job looks at every few minutes.

Read only

0 Likes
1,067

OK I will go with the event... thanks for your confirmation