on 08-02-2013 1:19 PM
Dear All,
We have been using event based custom workflow to set the usage decision of inspection lot automatically and to create TO for the TR's.
It is a background task and delegated the std BUS2045 with the custom objects and methods.
It is working perfectly in the sandbox environment.
But it is not working in Development environment, in which the background task is not getting completed and showing the status In-process.
It completed the first step of the task (automatic usage decision), but its not creating the TO from TR. I have read many forums and tried to trace the problem. Its working perfectly if i run it in foreground task. I have verified the workflow configurations by 'Verification workflow in SWU3'.
Did anyone face problem like this??
Thanks & Regards,
Arun.
Dear All,
The Problem is solved and is due to the default printer assignment to the WF-BATCH user.
In Sandbox, the TO printing form is SAP script and in development environment, we changed that to smartform, which expects the default printer.
Thanks Rick and others for the prompt response.
Whats the role of default printer in printing object in background process? for Transfer order, already we will maintain the printer location.
Even while sending the PO as PDF output in email, there will be no content in the email PDF attachment if the default printer is not set in the user profile parameters.
Thanks & Regards,
Arun Prasath Kumar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arun !
You've asked the following question:
"Whats the role of default printer in printing object in background process?"
Answer for this question is master data will always bite you.
Regards,
S.Suresh.
Hi Arun,
Thanks for following up and congratulations on solving the problem.
As per Susan's blog, did you ever see the default printer in an error message anywhere?
Could you verify what the situation was:
- WF-BATCH did not have a default printer set
- background task remained In Process
- you set the default printer (to what, exactly?) and now the background task is okay
Is that correct?
regards
Rick
Hi Suresh,
Thanks for sharing the link.
Hi Rick,
I did not get any error message anywhere in the workflow. Yes, you are absolutely correct.
Actually in my case, i checked the default printer configuration also. But I didn't bother much about that, as it was working fine in Sandbox environment without this default printer. Then only came to know the twist the printing form was SAP Script in Sandbox and Smart form in Development environment.
Thanks,
Arun Prasath Kumar.
Hi Rick,
In my case, the error which caused the workflow to fail (when run under WF-BATCH) was:
When I changed the default printer to LP01 for WF-BATCH, everything went along smoothly.
The most frustrating thing was that if I debugged thru this Smartform/PDF generation task, I would NOT get the error message, and everything went along just fine.
Hvae you checked runtime errors ST22? mostly due to runtime errors, task is remains in process. Just try to complete manually that task and check results. U will get idea of fault.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
The background task might be doing some update using BAPI or fetching the info using BAPI and when you do the stand alone test, the BO method may give you the proper results. Try to involve some delay so that the information is available(but this will pose a performance threat).
And in case you are using a BDC recording in the method, ensure that the mode is background.
Regards,
Rahul Kulkarni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arun !
Is this background method behaves as expected when it is tested in SWO1 transaction ?
If yes, check this method is asynchronous method.
Regards,
S.Suresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
Background task is working fine in SWO1 transaction and the method associated is synchronous only.
When i checked the graphical log in the sandbox and development environment, i found the following differences,
1. Workflow will start by triggering event, but it is starting from the default 'Workflow started task' in DEV. In Sandbox enviroment, it is starting from the event task.
2. Also the receiver type- object key is not available in the custom event, when i checked the event trace in SWEL.
3. There are only 2 steps(Background task started, (Sub) workflow item created) in the step history of DEV environment, when i checked the log. but in Sandbox, there are 4 tasks(Start Event received, (Sub) Workflow created, workflow started, Work item processing complete).
I want to know, why this workflow is not started from the 'Event triggered step'.
I checked the event linkage(SWE2), PFTC triggering event etc..
Thanks & Regards
Arun Prasath.
Hello Arun !
You've spotted some differences in sand box and development system.
Incorporate changes in development system suct that it reflects the configurations maintained in sand box for this workflow.
Trigger the workflow via event. To trigger the event, maintain the proper configurations as in sand box. In addition, make sure event binding is perfect. Also, ensure the all required parameters passed through binding for the back ground task to attain successful execution.
Regards,
S.Suresh.
Hi Rick,
Verification workflow is working fine.
I just changed the background task to Dialog in SWO1, PFTC task and assigned myself as agent in SWDD. I tested the same scenario, it came to my inbox for decision. When i gave the decision, it worked fine without any errors.
But its not working fine, when i run it as background task with the WF-BATCH user.
Thanks & Regards
Arun Prasath Kumar.
Hi Rick,
There are no dumps in ST22.
Background task will perform two process.
1. Automatic usage decision of the inspection lot using BAPI_INSPLOT_SETUSAGEDECISION.
2. Automatic creation of TO from TR using the Function module, 'L_TO_CREATE_TR'.
Here first step is working fine and its not creating the TO automatically in background task. The workflow overview in QA03 inspection lot shows that its still in in process.
When i checked the events in SWEL, my custom event is getting triggered,but there exists no work item & object key in the receiver type. If the workflow is started using the trigger event, it would have got the receiver parent work item.
Thanks & Regards
Arun Prasath Kumar.
Hello Arun !
You've stated that background task under goes two process.
I suppose, there is some dependency between first process and second process. In other words, some data has to be passed from first process to second process. Either no data or some missing data or data in improper format is passed to first process or second process.
Ensure first process attains completion as expected i.e., with necessary data for successful execution of second process.
In addition, check whether any terminating events has to be raised for successful execution of this method. If so, check whether it is triggered with necessary parameters.
Regards,
S.Suresh.
Hi Rick,
I have created a custom BOR and delegated to the standard BUS2045. My workflow is event based and have given my custom event as tiggering event.
When the results recording for the inspection lot is done, which will trigger the events of the BUS2045 and my custom event. This custom event will start the workflow to perform the process.
Thanks ,
Arun Prasath.
Hi Arun,
Okay, your workflow with the problem is being started by a custom event.
You said:
"When i checked the events in SWEL, my custom event is getting triggered,but there exists no work item & object key in the receiver type."
And yet there must've been a workflow created, because otherwise you wouldn't have a workitem of In Process status. If you look in the workflow log, does it have an instance of the BUS2045 object?
regards
Rick
Hi Arun,
What's the purpose of the background job ?
Regards,
Ragav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Check that WF-BATCH has SAP_ALL and SAP_NEW.
regards
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rick,
We have given full authorizations SAP_ALL & SAP_NEW to the WF-BATCH user.
We are able to run the workflow. In the background task, one of the process 'Automatic usage decision' is happening, but the second process is 'Automatic TO creation; is not happening.
I have checked event linkages, task, workflow etc. I am not sure whether i have done the binding properly.
Is there any way to check whether i have binded container information correctly.
Thanks & Regards,
Arun Prasath Kumar.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.