Asynchronous Business Object Event not triggering Workflow
Hello everybody,
I created a workflow for processing of inbound messages (IDoc). The workflow is correctly started when an IDoc arrives. Then it prepares some data and runs into a waiting step. After the user processes the messages via a custom transaction, the workflow should proceed and send some additional information to the message origin.
I created a new BO with an event ProcessComplete, which is called in the custom transaction via the following code:
INCLUDE <cntn01>.
DATA lo_zisu TYPE swc_object.
swc_container lo_container.
swc_create_container lo_container.
swc_set_element lo_container 'VAR1' lv_var.
swc_create_object lo_zisu 'ZABC' lv_object_key.
swc_raise_event lo_zisu 'ProcessComplete' lo_container.
But when I call this code, the workflow does not continue. When I use SWEL to manually create an event on this object, the workflow only continues when I set the check box "synchronous call". So in some way, the asychronous calls disappears completely.
Can anyone give me a hint, where to look for these calls? May there be a setting not active on the system for this particular workflow? Other workflows with the same method of event handling work well.
Thanks and regards,
Christoph
Hello,
I debugged deeper into the whole issue. When I call the function module for the event creation directly (not via the macro posted in my initial post), I have the option to control syncronous va. asynchronous processing:
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'ZISU_MDC'
objkey = lv_objkey
event = 'ProcessComplete'
start_recfb_synchron = 'X'
IMPORTING
receiver_count = lv_rcvcnt
event_id = lv_evtid
TABLES
event_container = lo_container
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
The export parameter start_recfb_synchron controls this. In the program flow, the following is the difference between the two ways:
Synchronous:
CALL FUNCTION im_handler->m_linkage-recfb
DESTINATION im_handler->m_linkage-rfcdest
EXPORTING
sender = l_sibf_object_por
event = l_sibf_event
rectype = l_sibf_rectype
handler = l_receiver_por
exceptions_allowed = 'X'
xml_size = l_xml_size
event_container = lt_xml_container
IMPORTING
result = l_result
EXCEPTIONS
temp_error = 1
OTHERS = 99.
Asynchronous:
CALL FUNCTION im_handler->m_linkage-recfb
IN BACKGROUND TASK
AS SEPARATE UNIT
DESTINATION im_handler->m_linkage-rfcdest
EXPORTING
sender = l_sibf_object_por
event = l_sibf_event
rectype = l_sibf_rectype
handler = l_receiver_por
exceptions_allowed = ' '
xml_size = l_xml_size
event_container = lt_xml_container
CALL FUNCTION 'ID_OF_BACKGROUNDTASK'
IMPORTING
tid = l_trfc_id.
The first one works fine, the event gets processed, there is an entry in SWEL, the workflow continues. The second way does not work. The second function returns a tRFC ID, but when locking tRFC in the debugger and search for the call via SM58, there is no entry.
In parallel I opened an OSS message, but did not get any (useful) response yet.
Regards,
Christoph
Similar Messages
-
Event not triggering workflow always
Hi,
I have a parallel approval workflow which I trigger everytime I receive a decision from a UWL.it works fine but in some cases all the decisions are not received by the workflow.
Steps: I receive the decision from UWL via a RFC
I trigger the workflow with the decision using SAP_WAPI_EVENT_CREATE.
However sometimes out of 5 decisions only 4 reaches and the workflow never completes since I wait till all the decisions are received.
After triggering the event I also update a table which shows correct values meaning the data is correctly passed from UWL.
Not sure what can be the cause. Anyone any ideas.
Thanks
PapiyaHello,
Either the event isn't being created, or the event is being created ad the workflow isn't triggering.
Check tx SWEL (event trace, turn on with SWELS) to see if SAP_WAPI_CREATE_EVENT is creating the events.
It will also show you if a workflow is triggered, and what the workitem id is. It will also show any errors.
regards
Rick Bakker
Hanabi Technology -
Access ECC business object event in CRM
Hi Experts,
We have a requirement in which we need to check whether a business object event is triggered in ECC system and access the related business object details in CRM system.
The ECC and CRM systems are already integrated.
Any help on how to access business object events in the other system would be highly appreciated.
Regards,
SaumyaClosing due to lack of replies
-
Please let me know to find the where used list for a business object - event?
There are many events defined for each Business Object. But I find either none or just a few of these events for the business objects defined through the event linkages.
Only events that start a follow on process using a workflow, standard task or an FM or defined in event linkages. Not all entries available will be flagged as active. Some of these could be supplied as standard and you activate them as needed and may involve additional config steps. Some of them might have been active once and deactivated later.
I am assuming that all events for a business object must have been defined for a specific purpose and that they must be getting triggered/created somewhere.
Every object can have certain standard entries like Created, Changed etc. There could be object specific events also. There are standard SAP objects with no events defined at all. You can also extend an object with your own events. How you want to react to an event is specific to your business needs. Also, not all the events defined for an object are triggered/created. You may have to do it yourself with various tools provided by SAP. You can test what events get published for an object by activating event trace and taking the object thorough various stages.
a) Is there a way to get a where-used list for events?
One way is to look at the event linkages (txn SWETYPV) as you have already done. Another way is to txn SWU0 to simulate an event and see how the system would react to that event.
b) Are there some SAP-defined events that never get created?
Answered above.
ANd checkout this link
http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8534ac011d1894e0000e829fbbd/content.htm
Thanks, -
TCA Business Object Events: Raise Events Program
Hi,
We are integrating two ebiz instances using SOA and both the instances currently are on 11.5.10. We have back ported patches from ebiz 12i into these instances to use TCA Business Objects functionality(Business Object API's and events). I have a few questions realted to the concurrent program "TCA Business Object Events: Raise Events Program":
1) Do I need to schedule this concurrent program to raise business object events?
2) Is there an alternate way to raise these business object events(any profiles)?
Appreciate if someone can answer these questions.
Thanks,
SakHi,
We use AIA and TCA Business Object Events program to integrate from one Ebiz instance to another.
To achieve what you want I would not do anything in SOA.
In out integration TCA ends up putting messages into WF_BPEL_Q.
I would use the following process: (Assuming offline time is a possibility)
1. Retire the parts of AIA that dequeue from WF_BPEL_Q. (depending on how messages are picked up.)
2. Create a PLSQL script that dequeues all messages from WF_BPEL_Q but dosn't process them. Using relevant select statements you can dequeue by message ID and select only relevant messages
3. Run whatever process you need that puts fires the Raise Events Program
4. Run the script to dequeue the messages that does nothing with them.
5. Re-activate the parts of AIA that dequeue from WF_BPEL_Q
This should give you the desired effect. Just be careful you don't screen out messages that do need to be transfered.
Robert -
Issue regarding [Work Flow] Business Object Event Raise in ABAP Program
Hi All,
I have one issue regarding [Work Flow] Business Object Event Raise in ABAP Program.
Actual TDS is as below:
If E message type written, raise Business object BUS2005 (Production order) Event PickShortage for production order passing warehouse, transfer request
(BUS2065 Object key) in event container. Also include table of text version of error
messages for this set of Transfer
Request.
Can anybody tell me how can i write it technically in ABAP Code.
Can anybody solve this issue!
Thanks in advance.
Thanks,
Deep.Hi,
Can anybody solve above posted issue!
Thanks,
Deep. -
Regarding [Work Flow] Business Object Event Raise in ABAP Program
Hi All,
I have one issue regarding [Work Flow] Business Object Event Raise in ABAP Program.
Actual TDS is as below:
If E message type written, raise Business object BUS2005 (Production order) Event PickShortage for production order passing warehouse, transfer request
(BUS2065 Object key) in event container. Also include table of text version of error
messages for this set of Transfer
Request.
Can anybody tell me how can i write it technically in ABAP Code.
Can anybody solve this issue!
Thanks in advance.
Thanks,
Deep.Hi,
Can anybody solve above posted issue!
Thanks,
Deep. -
How to find the WhereUsed List for a Business Object Event?
How to find the WhereUsed List for a Business Object Event?
Can anybody let me know how to get which
Whereused function will get the data from
different Werks in multi-level?
Any sample program please!!! -
Dear SDN,
I have created a Workflow and i am triggering through an event . For this have created ZEvent in ZBOR(Modified from Std. APPR_DOC)and attached the zevent in my screen (HR related template PHAP_CATLOG_PA) through oohap_basic.When I run in Background everything is working fine.But when I run through the Tcode(PHAP_CATLOG_PA). event itself not triggering.Problem is my event is not firing.When I check in SWEL my zevent is showing std BOR.My zevent is not catching my ZBOR.Can anyone help me out with this issue.
Regards,
Gopi.Hi,
gopi BOR will always show the standard BOR and you can put a start condition based on that condition.
after that in first activity you can use your custom BOR and it's methods.
Hope magic Works!
Regards,
Purvesh Patel. -
BUS2001-'created' event not triggering
Hi experts,
I have created workflow for project release which is using BUS2001-delegated to zbus2001. im using the " Created" event but which is not trigeering the workflow and i tried checking manually using tcode "SWUE" its triggering. i Dnt know why its triggering while creating project in Tcode:- Cj20n... is there changes need to do in SWEc for standard event..
regards,
RoopsHi Roop,
Can you let me know y you have created a subtype and delegated? Bcs according to your scenerio you dont require any custom business object, since you are using standrad event.
Can you let me how you are triggering this standard event and y you have configured in swec?
swec is for change documents.
Please elobarate the question.
Regards,
Vijay. -
BLOCKEDPRICE event not triggering
Hi All,
We have developed a custom workflow with Business object BUS2081 and the event 'BlockedPrice' was enable in the SWETYPV T code. We on the trace.
When we created Invoice with Pmnt Block u201CRu201D we are getting 'BlockedPrice' event in SWEL, but when we are creating Invoice with Pmnt Block u201CEu201D we are not getting 'BlockedPrice' event in SWEL.
Why we are not getting 'BlockedPrice' event in SWEL trace when invoice is created with Pmnt Block is u201CEu201D .
When Pmnt Block is u201CEu201D it is saving in RBKP- ZLSPR but when Pmnt Block is u201CRu201D it is not saving in RBKP- ZLSPR.
Why it is not saving in RBKP- ZLSPR when Pmnt Block is u201CRu201D .
Thank you,
Sekhar.Hi SR,
you need to check in the system for what the invoice is blocked, is it against vendor invoice and PO, so there could be other cases too.
Hence I think it must be set that though BLOCKEDPRICE is triggered, the WF should trigger only for payment block R.
So have a check and see for which payment block the WF is set to trigger.
Aditya
P.S shall watch this thread for experts answer.
Edited by: Aditya Varrier on Jul 29, 2010 2:06 PM -
BSEG.CREATED event not triggering when a document is posted in FB60
Hi All,
I have a requirement in which i need to post documents in FB60/FB65/FB01 tcode. But when i post the document in FB60 the event BSEG.CREATED is not triggering. I could not see any trace in SWEL. But when i park the document in FB60, FIPP.CREATED event is getting triggerd.
Can anyone tell me why this BSEG.CREATED event is not triggering.
Thanking you in advance,
satheesh.Hi Viji,
Thanks for your quick reply.
We have maintained the required configurations in the system related to this. But still the event BSEG.CREATED is not triggering.
for this the alternative solution is to implement the BTE '1030'. But our functional team is asking us to check whey standard business object BSEG.CREATED is not triggering when we post a document. So that particular reason we are not able to find out.
Configuration maintained.
1) Created a workflow variant and assigned it to particular company code(OBWA and OBWJ).
2) Checked the 'Posting' release' and 'Release payments' checkboxes in the OBWA transaction.
3) Event linkage for BSEG is active.(SWETYPV)
Thanks,
satheesh -
Subtype event not triggering and supertype event triggers twice!!!!!!
Hi,
We have created a subtype for object bus2030 and also an event created for that. My workflow should trigger whenever an inquiry is created.
I've maintained this as triggering event in SWDD and done type linkage is SWE2 and everything looks fine.
When i simulate or create event the WF is triggered but when create inquiry in VA11 WF does not triggers.
I've checked SWEL for event trace but no event is triggered at all... Am i missing something... I've done almost everything that i used to do...
Even synchronized buffer!!! nothing paid me a solution...
Infact the same was working with 3.1i system but after migration to ECC6 we had to create new WF template for the same Process.
Now I also see that the supertype bus2030-created event is triggered twice but, obviously no receiver type exists. But the zbus2030 event is not being triggered at all!!!!
Kindly help me understanding my mistake...
Regards,
PBHope you have already set the deletegation in SWO6.
Now, event dont get triggered automatically, jus because they are defined in object. They have to be explicitly published in thesystem.
Check for a suitable user exit in your transaction, which makes use of function module to create the event, from that you know how to proceed.
If you dont find user exit, try other triggering techniques such as change documents, logistics, BTEs... etc.
regards,
Sandeep Josyula -
Event not triggering for SWEC entry (MM_SERVICE) on create
Hi All,
I have been trying to trigger a customised event for BUS2009 based on creation of the Change Object MM_SERVICE. I have created an entry in SWEC as follows:
- Change Doc Object: MM_SERVICE
- Object Cat : BOR
- Object Type: BUS2009
- Event: RELEASEDREQCHANGED
- On Create
(no field conditions)
However, the event does not seem to publish upon an insert of ESUH-SUMLIMIT (Overall Limit on the Purchase Req - a field in Change Object MM_SERVICE), as I am not seeing the event in SWEL. Please note I have also tried to do this with field conditions in SWEC, but to no avail.
Alternatively, I have tried to setting the Change Doc config via SWU_EWCD, however, it comes back with an error message saying "No change document object for business object type BUS2009" - I believe this might have to do with the incompatibility of the key structures between MM_SERVICE and BUS2009. We have written a function module to overcome this problem and placed same in SWEC, which is why the (BUS2009) event is currently publishing for "on change" of MM_SERVICE - is there any way around this?
On the other hand, the event will publish OK if the SWEC entry is amended to "ON CHANGE" (with field conditions) - upon changing the value of ESUH-SUMLIMIT, not insert/create.
Would anyone be able to kindly advise how I can get the event to publish upon "ON CREATE" as well?
Thanks in advance.
~Andy.Thanks for your prompt response Surjith.
However, I believe the above setup in SWEC is already configured for the purpose of triggering the event. The customised event in BUS2009 (RELEASEDREQCHANGED) is linked to the Change Document Object MM_SERVICE via "on create" in SWEC - it's just that there are no events coming up in SWEL
I have exactly the same config setup for RELEASEDREQCHANGED, MM_SERVICE via "on change" - and this is working perfectly fine (ie. I can see the event in SWEL whenever there is a change in any of the restricted fields of MM_SERVICE).
My understanding is that upon "on create" (in SWEC), it is not necessary to set up field restrictions in order to publish the event. In any case, I have tried to trigger the event both with and without any field restrictions, none of which came up with any event when a field in MM_SERVICE has been inserted. This is the reason why I tried SWU_EWCD instead, however, due to the incompatibility in the key structure between BUS2009 and MM_SERVICE, the transaction did not allow me to complete the setup.
Is there any way around this?
Many thanks.
~ Andy -
BSP Terminating event not triggering
Hello Friends,
We have a scenario, where a BSP application is triggered from a Workflow, for a certain approval, and after the user clicks on Approve button on the BSP Page, the BSP would write to the workflow container using SAP_WAPI_WRITE_CONTAINER and then we call SWF_WSC_CALLBACK_LAUNCH.
This used to work, but after an almost Fatal incident with our system, we are not able to get this to work.
We can see in the workflow log that the container is written, but the terminating event is not triggered, and the workflow doesn't move forward
Is there a setting that we're missing..??
Thanks,
Tat.Have you tried:
call function 'SAP_WAPI_DECISION_COMPLETE'
Maybe you are looking for
-
How to control the diffeence qty in MB25
In MB22 - Reservations, suppose a line item of the movement type is deleted then the DIFFERENCE QTY at MB25 should show ZERO. How to do this? Thanks Ven
-
How do I set up which comics I want on my comics app?
How do I set up which comics I want on my comics app?
-
Hi, Is there any way to order large prints (16x20 or 20x30) scaled to fit the page with a margin for matting and framing? I typically crop my photos to odd sizes, then export to another application (GraphicConverter) to scale and add margins, then im
-
Help creating custom XMP file for Photoshop CS5
I was wondering if there is anyone out there that would be willing to help me create a custom XMP file for Photoshop CS5. What I need is very simple, I really just don't know how to go about creating it myself. Feel free to email me at [email protect
-
If I have iPad1 and if I lose it or brake it and buy a ipad2 can I restore all the thing I had through the computer if so how