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: 

Execute code on different user account in background

0 Kudos

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

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

3 REPLIES 3

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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