cancel
Showing results for 
Search instead for 
Did you mean: 

Need to trigger a background job from workflow background task(activity step)

09-29-2022 3:24 PM
tanmoynandy Newcomer
634 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

I am trying to call the program BPINDX00 from a workflow background step/task.

code is written inside a workflow class method.

If I test the task method from SE24 with or without debugging, the code works as expected and creates a JOB with spool.

but, when this functionality is executed at real time inside the workflow background task, the step does not complete or completes without any job being created.

Please suggest me if my approach needs to be changed.

I have used code in this sequence.

Code:

------------------------------------------------------

call function JOB_OPEN

SUBMIT BPINDX00 with var1 = input1

TO SAP SPOOLS

SPOOL PARAMETER <LS_WA>

WITHOUT SPOOL DYNPRO

VIA JOB <JOBNAME> NUMBER <NUM>

AND RETURN.

call function JOB_CLOSE

------------------------------------------------------


0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

lutzi3
Active Participant

I propose to add a COMMIT WORK. At the end. Does the user(s) have all needed authorizations to create/ run a job?