cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update table from background job.

Former Member
0 Kudos

hi All,

I am using one background job in my workflow, this job uses method of a class to update database table.

But it is not performing the same, whenever it reaches that activity containing background job, got stuck at that point only.

But when i am performing the same action manually, i.e; executing the class method manually, it is working fine.

Any idea why it is not working from background job.

I checked the bindings also, i also checked container element, importing parameter is properly set.

Still my method is not working from workflow.

Thanks,

Amar

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Amar,

maybe the workflow-customizing of your System is incomplete. Check SWU3 whether the background tasks are customized.

Greetings

André

former_member185167
Active Contributor
0 Kudos

Hello,

Does the method return anything, like a return code or a success message?

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Hi,

Again i am facing same problem.

In return parameter it is returning nothing.

And when i am making that activity as fore ground activity (by dis selecting back ground job check box), and executing that activity from SWIA, by clicking Execute Without Check button, the same activity is updating my table.

But whenever i am making that activity as background job it is not updating, and not returning any error too.

Amar

Former Member
0 Kudos

HI Amar,

try to put this code in report an run as background job, and see whether its updating the tables or not.

If problem persists, might be you should look in the code , sometimes FM or code that we use, need to be run only in foreground, check the code and make necessary changes if required.

Hope this helps.

Sangvir Singh

Former Member
0 Kudos

Hi Amar,

Also check the user WF-BATCH. It should have the SAP_ALL Authorization. Otherwise it will not able to update the data's.

Also copy the WF-BATCH user and create a new user. Change the user type as dialog and check your business object using this User. So that you can identify if any authorization issues.

Thanks,

Viji.

Former Member
0 Kudos

hi,

I checked WF_BATCH user authontication, and it is SAP_ALL.

I also wrote my code in a report and scheduled it as a back ground job, and it successfully updated my table.

But when i am using back ground job of work flow same code is not working.

Amar

Former Member
0 Kudos

Hi Amar,

So your code and WF-BATCH is not a issue.

Ok, please assign the Requested start deadline to your Task. You can set just a 1 minute as the deadline Interval.

Please check and let me know.

Thanks,

Viji.

Former Member
0 Kudos

Hi Viji,

I did as u suggested, and created Requested start deadline for 1 minute.

Same result, the only difference is waited for 1 minute and then passed that activity.

Amar.

Former Member
0 Kudos

Hi Amar,

You are trying to update which table?

Also give me the details how did you update this table? using any BAPI or which way did you update this details.

If you trying to update the table from workflow is it showing any error? what happened to that Task in workflow log?

what is the status of this Task in workflow log?

Thanks.

Former Member
0 Kudos

Hi Viji,

I am trying to update my custom infotype.

And i am using function "HR_INFOTYPE_OPERATION" for updation, within method of my class, which i am calling in my back ground activity.

I am reading return parameter of HR_INFOTYPE_OPERATION also, but getting blank, no error.

This back ground Step is showing as completed.

My Problem Scenario:

From approval activity if approved calling method "X", if rejected calling method "Y", and filling work area, and finally calling method "Z" from both these methods X and Y where have HR_INFOTYPE_OPERATION code.

Now my approval path is working absolutely fine, it is calling method X and from X calling method Z.

But i am facing this problem in Rejection path.

Amar

former_member185167
Active Contributor
0 Kudos

Hello,

First you had this problem in July, and now you have it in October? How did you solve it the first time?

regards

Rick Bakker

hanabi technology

former_member214498
Contributor
0 Kudos

Hi Amar

It is required to be checked whether the system is actually invoking the method at all in the background task. For this you can use a dummy variable in TVARVC and update a value say X in your method. If you run this method in foreground, off course it will update the dummy variable with flag 'X' but it would be intresting to see whether the same variable is updated when the task is run in the background. You can also update the above flag in the Sy-subrc check for your updation. Whenever it is not zero, you can write it to dummy variable.

If you establish that its not accessing the method or updating the infotype, then look for SU53 screenshot whether there is a authorization failure or not.

-Waz

bpawanchand
Active Contributor
0 Kudos

Hi,

Did you try to check any dumps are generated in the backend system by using the xn ST22

Regards

Pavan