Workflow trigger BUS2000126-event Cancelled

Hello,
I'm trying to trigger a workflow when a CRM Business activity (BUS2000126) has been cancelled manualy by a user in the Web UI.
I tried to use the event "cancelled" of the BO BUS2000126.
This doesn't work unfortunately, I did notice that when I use the method "UserstatusSet" to put a Business Activity to canceled it does trigger the workflow.
Any suggestions?
Regards,
Gert

Hi Gert,
You can use the "UserStatusSet" method to set the status of the Business Object to cancelled. You can check the event triggered when the Cancelled button is manaully pressed by the user. In that event check whether the status has been changed to cancelled for the BO or not. You can check that by sing the GUID of the triggered event and checking the input values when you test the BO.
If the value is not set to cancelled, then you have to write a method to make a call to the "UserStatusSet" method and chage the value to cancelled.
Now the workflow should get triggered.
Regards,
Saumya

Similar Messages

  • How can i trigger workflow when particular event happens in webdynpro

    how can i trigger workflow when particular event happens in webdynpro

    hi,
    To trigger workflow , use the fm : 'SAP_WAPI_START_WORKFLOW'
    Refer this thread for similar requirment : Workflow in WebDynpro
    Blog : http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID1564403950DB00699140435432809306End?blog=/pub/wlg/2778

  • How to trigger an event when a job is cancelled

    Hi,
    Can anyone help me out wid a transaction that will trigger an event when a job is
    cancelled....??
    My scenario is :
    When a job is cancelled (SM37) or in cancelled status  i want notify to certain ppl thru emails.
    How do i go abt doing the same??
    Its Urgent...
    Answers will be rewarded.
    regards,
    Rohan

    Hi,
    please check out the link below it might help you
    http://help.sap.com/saphelp_nw2004s/helpdata/en/71/a8a77955bc11d194aa0000e8353423/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/97d2e8b3-0b01-0010-b787-b8ce558a51c2
    for table name and list of function please check out the links below it will help you
    http://www.erpgenie.com/sap/abap/tables_system.htm
    http://www.sap-img.com/abap/function-list.htm
    **************please reward points if the information is helpful to you**********

  • Can't start a 2013 Workflow in an Event Receiver

    I am trying to run a SP2013 workflow from an Event Receiver but I get the error "The request was aborted: The request was canceled. Client ActivityId: aec2fc1b-3f33-44d8-85ab-c6c976617b8c" at the point I actually attempt to start the Workflow.
    The scenario is  as follows. I have 2 lists: List A and List B. Users have permissions to create items in List A but not List B. When users create a new item in List A, a SP2013 workflow runs which then creates a new item in List B. List B should then
    run another SP2103 Workflow but because of how SP and workflows work, this second workflow on List B doesn't automatically run. Thus I have created an Item Added Event Receiver on List B that will run the required workflow automatically (at least it should
    if it worked!)
    I'm sure the problem must be something to do with permissions but nothing I try seems to solve it:
    I can't just use the account of the user triggering the event as this user will be the person adding items to List A and they don't have permissions to do anything in List B (thus they cannot see items in list B or start workflows)
    I can't run using RunWithElevatedPrivileges as a) I don't think this works well with Event Receivers and b) SP2103 workflows cannot be run using the admin account.
    I have tried impersonation with an account specifically set up for running workflows (named mydomain\wssworkflow). This account has full control of the entire site, lists etc. but it still gives the error mentioned above. My code is shown below - the error
    occurs on the line: 
    wfi.StartWorkflowOnListItem(sub, properties.ListItemId, payload);
    Any help in working out why this isn't working would be appreciated.
    Thank you,
    -Stephen
    public override void ItemAdded(SPItemEventProperties properties)
    base.ItemAdded(properties);
    var wsm = new Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager(properties.Web);
    var wfss = wsm.GetWorkflowSubscriptionService();
    var subs = wfss.EnumerateSubscriptionsByList(properties.ListId);
    foreach (var sub in subs)
    if (sub.Name == "RequestAddedToListB")
    var userToken = properties.Web.EnsureUser(@"mydomain\wssworkflow").UserToken;
    using (SPSite site = new SPSite(properties.Site.ID, userToken))
    using (SPWeb web = site.OpenWeb())
    var payload = new Dictionary<string, object>();
    payload.Add("itemId", properties.ListItemId);
    payload.Add("WorkflowStart", "StartWorkflow");
    var wfi = wsm.GetWorkflowInstanceService();
    wfi.StartWorkflowOnListItem(sub, properties.ListItemId, payload);
    break;

    This is the alternate code I had using SPSecurity.RunWithElevatedPrivileges that didn't work. It gives the error 
    "Attempted to perform an unauthorized operation"
    on the line
    var subs = wfss.EnumerateSubscriptionsByList(properties.ListId);
    Thank you.
     public override void ItemAdded(SPItemEventProperties properties)
         base.ItemAdded(properties); SPSecurity.RunWithElevatedPrivileges(delegate
    var wsm = new Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager(properties.Web);
    var wfss = wsm.GetWorkflowSubscriptionService();
    var subs = wfss.EnumerateSubscriptionsByList(properties.ListId);
    foreach (var sub in subs)
    if (sub.Name == "RequestAdded")
    using (SPSite site = new SPSite(properties.Site.ID))
    using (SPWeb web = site.OpenWeb())
    var payload = new Dictionary<string, object>();
    payload.Add("itemId", properties.ListItemId);
    payload.Add("WorkflowStart", "StartWorkflow");
    var wfi = wsm.GetWorkflowInstanceService();
    wfi.StartWorkflowOnListItem(sub, properties.ListItemId, payload);
    break;

  • Workflow trigger an idoc

    HI
    How trigger a idoc from a workflow?????
    Hi
    idoc trigger from a workflow.please suggest.
    example like po change..
    Edited by: Abhijit Paul on Jun 26, 2009 8:42 AM

    Hi,
    You can follow following steps.
    1) Create a Z business object inherited from BUS2012.
    2) Create a Z-method in will have to create a method in your newly created business object.
        This method will have logic to create and send the idocs for PO. Delegate the business object so that you can call the method from SUPERTYPE in workflow.
    3) Create a workflow with triggering Event as Change of PO.
        This workflow will have a single step task which will call the Z method of your business object.If you have done the delegation then you can call the method using BUS2012 object type itself.
    4)  You will have to go in Tcode SWEC as mentioned in the post above.
        There you will have to do an Event linkage for change documents.
        Make an entry for EINKBELEG Bor Object ZBUS2012 or BUS2012, Event CHANGED and select on Change option.
    5) Change the PO and check if the event is getting triggered or not. Also if the method used to create and send idoc is correctly been called.
    Hope it explains the steps you need to follow.
    In case of any issues please let me know.
    KR Jaideep,

  • Is it possible to trigger FIPP event (and how?) when parking an FI document

    Hello
    I wander is it possible to trigger FIPP event (and how?) when parking an FI document with transaction fbv1(and not fv60)
    Thx in advance

    Hi,
    In Financial Accounting --> Accounts Receivable and Accounts payable >  Business Transaction> Incoming Invoices/Credit Memos  --> Make and check settings for Document Parking -->  Create Workflow Variant for Parking Documents (Click  this)
    There you have to assign your workflow.
    Regards,
    Surjith

  • How to start a workflow by an event

    Did somebody know how to start an OWB workflow after an event occur ?
    In my application, the OWB workflow must start (and import data) after a record is insert in one of my application database table. Actually, I schedule a job to look in that table every single minute. The problem is that every minute, a connection is open and close on the application database. Also, the user have to wait for one minute (at most) before is job begin to be process. Can someone have a way to start OWB on event by using trigger, queue or something else ?
    Thank you,
    MB

    owf(your_OWF).wf_engine.LaunchProcess(item_type, item_key, process_name);
    If your process is defined as:
    Module: PRC_MODULE
    Process_flow_package: PRC_PACK
    Process_name: PROCESS
    then ITEM_TYPE is PRC_PACK,
    ITEM_KEY can be anything, like p_process_name||'_'|| SYSDATE to make sure it does not get doubled,
    and process_name is PROCESS.
    So when you call this function it would look like this:
    owf(your_OWF).wf_engine.LaunchProcess('PRC_PACK', 'PROCESS_24072009120000', 'PROCESS');

  • Workflow trigger

    As i m new in abap workflow.....i want to trigger my workflow for sap standard tcode..for eg suppose when new enquire is created in sd one mail should be generate via workflow.....

    Hi,
    I am giving just an outline. Try it out and then ask your specific queries.
    First identify the business objects available in SAP through SWO1 ->F4 help->Click on SAP Applications---->Dig into Application wise (eg) SD in your case.
    Then identify th workflows available in SWDD->Click on Drop doen in Workflow input>Structure search-->Application component.
    From the identified business object and workflow, activate the event linkage in the workflow and also in other respective areas.
    Cheers,
    Raja.D

  • How to trigger an event?

    hi,
    could i trigger an event in workflow A by using "Post Internal XML Event"
    workflow B?
    must i use JMS to trigger it?
    Thanks.
    * Name: Gary Wang
    * Tele: 010-65546668-8119
    * Mail: [email protected]

    Gary
    You can use JMS (preferably JMS Header properties for performance, or
    XML document), or you can use the api and invoke a business operation as a
    bean or java class
    Tony
    "Gary" <[email protected]> wrote in message
    news:3c2c0379$[email protected]..
    hi,
    could i trigger an event in workflow A by using "Post Internal XML Event"
    workflow B?
    must i use JMS to trigger it?
    Thanks.
    * Name: Gary Wang
    * Tele: 010-65546668-8119
    * Mail: [email protected]

  • Trigger a event and send an email  when a new entry is created in a table

    Hi All,
                I have scenario here where i want to trigger a event and send an email too when a new entry is created in a Ztable or an existing entry is changed.
    Please let me know how can i achieve this.
    Please excuse me if you find it basic as I am not very old in Workflows.
    Thanks in Advance,
    Saket.

    Hi..
    For your Requirement workflow not Required.
    Write a  Program to send Mail. This Program has to execute when ever the Save Button is Click, then the mail will be sent.
    Check the program in this [link|https://wiki.sdn.sap.com/wiki/x/nYKdAw ], which send the mail.
    Regards,
    Surjith

  • SWUE SC Trigger Create Event

    Expert's,
    I'm trying to create an event for a shopping cart BUS2121, o notice that after the event the workflow trigger's an approval step to all the approvers, although there is a BADI that is correctly assigning 1 approver for each step.
    Is this a standard behaviour ?
    This only happens when creating an event with SWUE.
    Regards,
    Mário.

    Hi Masa,
    The example is, if you create a shopping cart in SRM Portal the system works fine, the approval goes to the correct approver's acording to our configuration. The problem is if i create an event in SWUE, for the same shopping cart, it goes to all the approver's. I try to debug the process and with SWUE i confirmed that the BADI is correctly assigning the approver's, but in the end in workflow Log it's going to all the approver's.
    Did you ever experience this situation ?
    Best regards,
    Mário,

  • BRF+ Trigger via Event, change on field value, etc

    Hi,
    I'm implenting BRF+ for SPM Claims & Returns Process.
    It took me a while to understand how I can set up an application, Function from type event, Rulesets, rules, etc but at the end it seems that it is a tremendous improvement compared to BRF!
    So far I have triggered the BRF+ via the CRMV_EVENT_CUST table calling a function module that triggers the BRF+ Function and receives an CRM Log message but this solution is not sufficient for all locations I want to call the BRF+.
    At first I want to call the BRF+ for the Entryvalidation: Entering a Claim with a item net value below a threashold should not be saveable.
    The second call should be to decide if the Claim will be automatically approved or set to manual investigation: This is a check that will lead to a item status change.
    The third and last check will be fullfilled by saving the Claim document: a whole set of business rules have to run and set maybe an incompleteness or process some error messages.
    I neither any information in SAP Documentation, nor on any ressource on the net any information about customing the BRF+ Solution.
    Is there any customizing in the system, as it is for BRF, that allows me to trigger the BRF+ for Business Transaction Category, Business Transaction or ItemCategories?
    Furthermore, is there an option to call BRF+ via customizing that "listens" to a field change as Reason Code ( CODEGRUPPE, KATALOGART,CODE in the Subjectprofile?)
    Can I define Events that trigger the BRF+ as in the BRF customizing?
    When I search the IMG for BRFPLUS, I find a couple of entries, but doubleclicking on this search results doesn't jump to the customizing step.
    It would be very helpfull to get some input in these topics.
    Kind regards,
    Sven

    Hi Tiwari,
    yes, the screenshot was from CRM-Financial, but available in CRM Transaction Processing:
    And I agree to your statement that there is no such customizing, because I neither found this Customizing, except:
    Using the search in the customizing IMG, you will find 3 customizing entries with BRF+ or BRFPLUS, but clicking on them you will land in Nirvana, and not in the proper customizing tree.
    But still the overall trigger for my message here is, that the BRF could be triggered via Customizing that doesn't seem to exist for BRF+ and that's strange!
    I hope someone knows how the replacement of BRF with BRF+ is intended from this customizing point of view. I have to trigger a lot of different functions and using the old BRF I could trigger this Events using this customizing setup.
    Thanks,
    Sven

  • Which field is the workflow trigger for a Contract Agreement ?

    Greeting everyone,
    I am not sure if this has been answer before or if this is the correct forum. If not, apologies in advance and do direct me to the appropriate topic/forum.
    I have an inquiries with regards to Contract Outline agreement and workflow trigger.
    Based on my company configuration, the trigger is based on the changes in value and release strategy.
    What I am unsure is that which field the workflow-trigger checks?
    Does SAP checks the field "Target Value" in contract header, or  the sum of net value in each of the contract items?
    Thank you

    Hello Sek,
    In contracts, the target value is used for the release strategy determination and not the net contract value. If you maintain a target value in the contract header, this value is set in field CEKKO-GNETW to determine the strategy. If no target value exists on header level, a cumulation of the target values of the items is carried out and used for the release strategy determination.
    Regards,
    Mauro

  • Automatically trigger the event to load data from Planning cube to Standard Cube

    Hello,
    We have a below set up in our system..
    1. A Planning BEx query using which user makes certain entries and writes back data to the planning cube.
    2. An actual reporting cube which gets data from the planning cube above.
    Now, what we want to do is to automate the data load from Planning cube to Reporting cube.
    This involves 2 things..
    1. Change the setting " Change real time load behaviour " of the planing cube to Planning.
    2. Trigger the DTP which loads data from Planning cube to reporting cube.
    We want to automate the above two steps...
    I have tried few things to achieve the same..
    1. Created an event in SM64,
    2. In the Planning cube "Manage" Screen,  clicked on "Subsequent Processing" and provided the event details. ( Not sure if its the correct place to provide the event detail ).
    3. Wrote a ABAP program which changes the setting of the planning cube (  " Change real time load behaviour " to Loading )
    4. Created a process chain, where we have used the event as a start variant, used the ABAP program as a next step, DTP run as the last step..
    This i hoped, would trigger the event as soon as a new request comes and sits in planning cube, which in turn would trigger the process chain which would load the data from Planning cube to reporting cube..
    This is not working. I dont think the event is triggering, and even if does i am not sure whether it will start the process chain automatically. Any ideas please ?

    hi,
    try to do the transformation directly in the input cube by using CR of type exit, more details :
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/43/1c3d0f31b70701e10000000a422035/content.htm
    hope it helps.

  • How can I trigger an event from an ABAP Program

    Hi everyone,
    I have a requirement, where I have to create an ABAP program, that has to execute (trigger) an event which belongs to a Process Chain. when I run the program, the Process Chain has to run.
    So, how can I do it?
    Thanks for your help, Federico

    HI ,
    The program can call function module BP_EVENT_RAISE to raise the event. you can create vent in sm64 and sm62 .There you give the parameter of the event same as what you will define in the event of start variant of your process chian ..
    Regards,
    shikha

Maybe you are looking for