on 2020 Oct 23 6:44 PM
As I got it from documentation for BOR events, the events, both standard and custom ones, can be defined only when BOR objects change theirs status and/or state: CREATE, CHANGE, DELETE, APPROVE, RELEASE, etc.
But what about simulation of BORs? Do the workflow triggered in that case?
By simulation I mean running some business-functions without creating object: for example BAPI_SALESORDER_SIMULATE or BAPI_SALESORDER_CREATEFROMDAT2 with testrun = X?
Do BUS2032 events are triggered in that case? If not, can we somehow enable them?
Request clarification before answering.
Hi Pavel,
As sandra.rossi said, you can trigger events manually with transaction SWUE. To do this, you need to fill in the business object key (so the Sales Order must already exist).
Events are triggered all the time in SAP. It only matters when you are trying to react to an event. Since I'm not familiar with Sales Orders or those BAPIs, you could always run them with the 'X' and without the 'X' in the testrun parameter, and then look in the event log using transaction SWEL.
(The Event Log must first be turned on using transaction SWELS).
Good luck,
Sue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I apologize if what I've written below seems basic, but I wanted to be sure you and I are on the same page regarding the definitions of some terms.
A Workflow is different from a BOR object. A BOR object is the technical representation of a business 'document' or transaction. To view this functionality, I recommend that you go to transaction SWo1, and enter a business object type - perhaps BUS2032. Then you will have to instantiate the business object - that is, give it a key for a document that already exists in your system. You will see a list of Keys, Attributes, Methods, and Events on your BOR Object. This is the information and activities that are defined for this BOR Object. You can extend a BOR object (as delivered by SAP) by copying it into a Z-Version.
A Workflow is a set of tasks and decisions that determines what should be done with that object. Workflows can be started from events - but only if they are linked to the designated event. You can see which Workflows SAP has delivered by clicking on the where-used button from transaction SWo1.
As for your event trace, please ensure that you have turned it on first - events will only be written to your event log if you have turned the trace on. Then you can test your BAPI, or run various SAP transactions. You will only see workflows started if they are linked to an event (via transaction SWETYPV).
Example of SWELS - to turn event trace on or off - attachment 1
Example of Event Trace (or log) - attachment 2.
Note that many events are logged, but only BUS2038 CREATED started a workflow.
Hope this helps,
Sue
susan.keohan > I apologize if what I've written below seems basic
it's okay, but As for your event trace, please ensure that you have turned it on first is indeed too basic, I am not so newbie to conduct the tracing without switching on the trace switch ��
> Then you will have to instantiate the business object - that is, give it a key for a document that already exists in your system
That is the key to my problem I am struggling to explain to you. I am afraid that running BAPI_SALESORDER_SIMULATE/BAPI_SALESORDER_CREATEFROMDAT2 does not result in instantiation of BOR object. And I am seeking your confirmation is it true or not.
Compare these two trace screenshots I attached to this comment, the first one is from tracing after BAPI_SALESORDER_CREATEFROMDAT2 01-bapi.jpg
and the second one is from tracing VA01 transaction. 02-va01.jpg
The first variant didn't triggered Workflow, the second did. Why?
Is it more clear now what I am asking?
No, I didn't commit and this is reason, thank you. But my original question as per the title was: can we invoke Workflow without object creation, particularly I am interested in simulation, but running the BAPI w/o commit and in test-run also fits that description. From your understanding I got that it is impossible, and Workfow is never triggered in that case, correct?
any ideas about that, dear experts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
52 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.