2006 Jan 12 1:30 PM
Hi,
In my Sales order exit, under some conditions Iam raising an error message, when the order is being created in background this order will move to workflow. Now if any one process this order through the workflow i want to allow the order to get posted with out raising my exception.
So I would like to know how I can identify whether my order is being posted through the workflow or directly, in the Sales order exit code.
Thanks in advance friends,
Anvitha.
2006 Jan 12 1:35 PM
Hi Anvitha,
if the workflow-handled order is posted in the background, can't you just check the posting user ID? If it's WF-BATCH (or other workflow RFC user), then it's workflow and if it's something else then it's directly posted.
Regards,
Mikko
Hi,
In my Sales order exit, under some conditions Iam raising an error message, when the order is being created in background this order will move to workflow. Now if any one process this order through the workflow i want to allow the order to get posted with out raising my exception.
So I would like to know how I can identify whether my order is being posted through the workflow or directly, in the Sales order exit code.
Thanks in advance friends,
Anvitha.
2006 Jan 12 1:35 PM
Hi Anvitha,
if the workflow-handled order is posted in the background, can't you just check the posting user ID? If it's WF-BATCH (or other workflow RFC user), then it's workflow and if it's something else then it's directly posted.
Regards,
Mikko
2006 Jan 12 3:00 PM
You might try looking at the sytem fields for a background processing indicator. I don't have access to a system at the moment and I don't remember the name of the field (maybe sy-batch?) but somewhere in those fields there should be some indicator of the run mode.
Under some circumstances it will contain an 'X' if it's running in the background mode.
Good luck
Brent
2006 Jan 14 7:34 PM
Hi friends,
Thanks for your response.
Checking whether the order is posted in Background or foreground doesn't solve my problem, because my order may be posted in Background or foreground. But when the order is processed through workflow, the processing option depends on the configuration of the Workflow object type. So SY-BATCH doesn't serve my purpose.
Coming to using SY-UNAME, I observed that the value during the Order process through Workflow is the UserID who process it. So i can't distinguish it.
Friends, any one had any other option to identify whether the order is being posted through Workflow.
please help me out.
Regards,
Anvitha.
2006 Jan 16 3:54 AM
2006 Jan 16 10:31 AM
Hi Anvitha,
have you tried passing the order creation task a workflow-specific document type or another parameter that could differentiate it from the dialog transaction created orders?
If you want to directly distinguish between orders created by a user through a workflow task and orders created directly in a transaction, I'm afraid that's not possible since the same functionality is called by the same user.
-Mikko
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |