Skip to Content
0
Dec 19, 2011 at 08:54 PM

Execute code on different user account in background

197 Views

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