How to raise an event from a program

Hi,
I am creating a workflow for HR, the person will request a basic pay change than, this will start the workflow. For this i am making a screen from where i need to triger the event for the workflow.
Does anybody has any idea? of how to raise an event from a program. or has anybody worked on a scenario like this
Khusro Habib

You can also use the FM SAP_WAPI_CREATE_EVENT which is a little newer I think. (I don't have access to a system today so that may not be the exact name of the FM but if you search SE37 under SAPWAPIEVENT* you should find it.
the parameters will be the event name, and the object key.  The object key will be the key field of the workflow object you are using. 
For example if you were using the saled document object then the object key would be the sales document number.  Carefull how you enter the object key, it can be a little tricky on whether or not you need the leading zeros in the input parameter. 
Hope this helps.
Brent

Similar Messages

  • Raise business events from BPEL

    How to raise business events from BPEL process?
    Related questions -
    1. Is it possible or good to address this by embedding Java code in BPEL process that raises the business event? If so, what additional jar files should be included?
    2. Any links on API to raise the business events from Java code?
    3. Any links that describe how to raise the business events from BPEL process?

    Hi Guillaume,
    Thanks for your reply.
    Please find below environment details.
    EBS 11.5.10,
    Stand alone SOA Suite v10.1.3.1
    Oracle Apps Adapter
    I am trying to capture PO approval event ('oracle.apps.po.event.xmlpo') raised by BES in BPEL PM.
    I see in the BPEL PM logs that there is a handshake happening between EBS-BES and BPEL PM. But after the handshake, some XML DOM parser errors are thrown.
    I have pasted the error seen in BPEL PM log below
    <2007-08-01 11:33:18,000> <INFO> <default.collaxa.cube.engine> <CubeEngine::loadAllProcesses>
    26 processes have been loaded for BPEL domain "default".
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> MessageReader_readMessage: Received TranslationException
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound>
    ORABPEL-11211
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:139)
         at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179)
         at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533)
         at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:272)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291)
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:134)
         ... 6 more
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> MessageReader_readMessage: Received TranslationException
    <2007-08-01 11:34:18,750> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound>
    ORABPEL-11211
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:139)
         at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179)
         at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533)
         at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:272)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291)
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:134)
         ... 6 more
    From the initial assessment, it looks like the event schema defined in BPEL PM and BES event schema mismatch. But I do not know, how to correct it.
    Please let me know, if you have any suggestions in overcoming this issue.

  • Object does not match target type when raising an event from c# to VB6

    I have a c# .net DLL that I use from a VB6 app. It exposes an event,
    and the VB6 app is sinking it.
    The VB6 app is receiving the event, as long as it is raised from the
    main thread of the .net DLL.
    I have an aync task being handled inside the DLL (delegate BeginInvoke). Any
    attempt to raise the event from within that thread casuses the reported
    error, even from within the AsyncCallback function, when the thread is ending.
    I noticed that the delegate for the event is not declared inside the
    interface. It's in that module, but above the interface definition:
        [ComVisible(false)]
        public delegate void LoggingEventHandler( string logData );
    The event is declared in the class itself as:
        public class Processor : _Processor
            public event LoggingEventHandler        LogNotification;
    Finally, to raise the event:
    if ( this.Completed != null )
        this.Completed( true );
    If I open the tlb with OLEVIEW, I can see the public event just fine. Of course, I expected to, as it's working up until the helper thread kicks in.
    Now for the REAL WIERD PART! This DOES work on several servers that have
    been in production for months. It's just this one server that it won't work
    on. Same code. Resinstalled/registered it 1,000 times. It took me a while to
    find that an error was even occuring, since it was being raised in the
    seperate thread. In other words, I'm receiving the event just fine on a series of servers. This is a new machine we're trying to bring online. I suspect it's environmental, but I can't figure it out.
    I don't understand why the publisher would be expecting a certain type of
    subscriber in the first place... unless the error is really triggered by the client when the event reaches it. I've put logging into the client, though, and the first line of code inside the event is not being executed.
    For the VB6 app, I reference the tlb file that is automatically created when
    I compile (Interop is checked). I unregistered and re-registered the tlb on
    the server. I regasm'd the dll itself. All dlls are in the same folder - not
    in the GAC.
    The stack trace is as follows:
       at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
    invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
    culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
    Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
    CultureInfo culture, String[] namedParameters)
       at System.RuntimeType.ForwardCallToInvokeMember(String memberName,
    BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
    msgData)
       at HPFS.Queue.IProcessorEvents.LogNotification(String logData))

    This is driving me nuts!
    I sure would appreciate any suggestions.
    I got this working on one of the two machines. The other machine had some other issues, so I had it re-imaged. It's been so long since I fixed the first one, that I can't remember exactly how I did it. Plus, I did so many things to it over two weeks, that I never really felt confident, anyway. But ... I could *swear* that the last thing I did back then to get this event to flow was to re-register the DLL's TLB.
    So ... This is win 2k with FW 1.1 + SP1.
    Completed is the delagate I'm trying to invoke.
    this.Completed.Target.GetType().Name = "__comobject"
    I've tried everything. Unregistered the .tlb. Unregistered the .net DLL. Verified that the app completely failed while unregistered. Created the TLB using RegAsm /tlb syntax.
    I tried using CLR SPY. It registers nothing. It only lets me pick an EXE. This is a DLL tring to raise to an EXE.
    I've looked at the TLB in OLE VIEW and I just don't know what I'm looking at.
    Is there any other tool or technique I can use to audit/monitor/trap this? .net is giving me *** for details about what's failing. I wish I could somehow debug into exactly what it's trying to do and get more details on the failure.
    Here's the error I'm getting:
    (Code -1) Object does not match target type.<Source:mscorlib>(Stack:    at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
       at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
       at HPFS.Queue.IProcessorEvents.Completed(Boolean success)
       at HPFS.Queue.Processor.RequestDone())
    Processor = the DLL I'm trying to raise the event from.
    IProcessor = the event interface that's exposed through COM.

  • HOW TO TRIGGER AN WORKFLOW FROM A PROGRAM ?

    HELLO THERE ,
    CAN ANYBODY PLZ TELL ME HOW TO TRIGGER AN WORKFLOW FROM AN PROGRAM AND TO PAS THE VALUE TO THE CONTAINER ?

    Hello Neon,
    If you want to trigger the workflow directly, use the FM, SWU_START_WORKFLOW
    CALL FUNCTION 'SWU_START_WORKFLOW'
      EXPORTING
        task                  =
    *   LANGUAGE              = SY-LANGU
        user                  =
    *   SENDER_ID             =
    * IMPORTING
    *   RETURN_CODE           =
    *   WORKITEM_ID           =
      tables
    *   CONTAINER             =
    *   MESSAGE_LINES         =
        attachment_list       =
    A workflow can also be triggered by and event which is in turn triggered by a program.
    By the FM, SWE_CREATE_EVENT
    Example:
    w_key = 'Connie'.
      w_creator-otype = 'US'.
      w_creator-objid = 'SAPDEV02'.
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                       = 'YH_BUDDIES'
          objkey                        = w_key
          event                         = 'event'
         creator                        = w_creator
    *     TAKE_WORKITEM_REQUESTER       = ' '
    *     START_WITH_DELAY              = ' '
    *     START_RECFB_SYNCHRON          = ' '
    *     NO_COMMIT_FOR_QUEUE           = ' '
    *     DEBUG_FLAG                    = ' '
    *     NO_LOGGING                    = ' '
    *     IDENT                         =
    *   IMPORTING
    *     EVENT_ID                      =
    *   TABLES
    *     EVENT_CONTAINER               =
       EXCEPTIONS
         objtype_not_found              = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        WRITE: / 'EVENT TRIGGERED'.
      ENDIF.
      COMMIT WORK.
    Hope it helps you.
    Regards
    Indu.

  • How can I remove events from my iPhone. I want to delete all the events from my iPhone.

    how can I remove Events from my Photo in iPhone

    Connect to computer iTunes and uncheck under Photos > Events then do a sync.

  • How to Access Maintenance View from a program

    Hi Experts,
    I have created a maintenance view for a table. i want to insert data's into the table through the maintenance view. I don't know how to access the view, how to insert data into the Maintenance view. Please suggest me how to access the view from the program.
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    What is the need to search for a program.
    Use transaction SM30 or SE16 to create or maintain entries in the table.
    e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
    Regards,
    Himanshu

  • How to trigger an event in the program

    Hi,
    I have a program. The purpose of the program is to retrieve the data matching the selection criteria and downlod the same to a file.
    In the selection screen, I have a parameter called 'EVENT'. Here, user enters some event name. Generally, they enter the 'Background job processing events'.
    So, my requirement is... once the files are successfully downloaded, the program should trigger the 'EVENT' specified in the selection screen at run time.
    Can someone help me in this regard. How to trigger an EVENT in the program. Is there any Function Module or Method available in SAP which triggers the EVENT at runtime.
    And is there any table available in SAP which stores all the events available in SAP. Because, whenever the user enters an EVENT in the selection screen, we should check whether the event is valid or not. So, if there is any table available which has all the events then, it will be easy I guess. or is there any other way to validate the EVENT name.
    Please help me. Thanks in advance,
    Best Regards,
    Paddu.

    Hello Paddu,
    have a look at tables
    - btcsev, btcsed (system events)
    - btcuev, btcued (user events)
    and use function BP_EVENT_RAISE.
    kind regards
    Walter Habich

  • Programatically raise Contextual Event from a ClientEvent

    Hi,
    JDev v11.1.2.0.0.
    Earlier I had a event raised on the value change of my inputText component. But due to certain requirement, I had to discard the valueChange and had to do that same logic using clientListener and serverListener. But the problem now is, the contextual event is not getting raised and I'm looking for a way to raise the specific event on the ClientEvent method that is bound to the serverListener on my fragment.
    I've checked lot of blogs but most of it are talking about raising the event programatically on ValueChange or ActionEvent. Any thoughts? Appreciate any help on this. Thanks !
    Edited by: 119413 on Mar 14, 2013 10:29 AM

    Ok. Finally, I ended up invoking a hidden button click action in my client listener and raised the event from the ActionEvent bound to that button. Let me know if anyone could think of better options.. Thanks !
    Edited by: 119413 on Mar 15, 2013 10:40 AM
    Edited by: 119413 on Mar 15, 2013 10:41 AM

  • How to get all events from calendar using calcalendar store framework.

    Hello,
    I have two problems with calcalendar store framework programming.
    1. I need all the event which are present in iCal calendar.Event may be present in year 2025 or 2050. and if the event is recurring then i need only one event.
    2. if the event is recurring then i need only one event within the calendar event predicates (start date and end date). I am not suppose to give the occurrence date for event.
    How can I implement this with CalCalendar store framework.
    Thanks And Regards,
    xmax.

    Hi,
    Per my knowledge, there is not a method to get all the recurring events using CAML query in one request.
    Here is a thread with the similar question for your reference:
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/eed6be6d-c9ff-4d01-80de-8a4b67d3d7a5/use-caml-to-get-all-recurring-events-from-a-calendar
    We can get all the calendar list events at first, then filter all the recurring event from the result set.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Raise an event from do_prepare_output

    Hi All,
    I have a requirement where I need to raise an event after having defaulted a value in a dropdownlist field.
    I'm working on component BT120H_CPL/NewComplEF.
    Here I have to default a value in the field REFOBJECTTYPE (context node NEWCOMPL). This is not a problem, I actually managed to write my logic in the do_prepare_output.
    My problem is that upon selecting a value for this field the event ONREFOBJECTTYPE is executed, unfortunately if I default a value the server_event 'select' is not triggered and the sub-screen ExtRefItemEL is not called.
    Do you know how to push/simulate an event from do_prepare_output in order to call the sub-screen immediately?
    Thanks in advance
    Paolo

    Hi Paolo,
    You can call the event handler ONREFOBJECTTYPE
    from do_prepare-output by calling
       CALL METHOD me->eh_ONREFOBJECTTYPE
    *  EXPORTING
    *    htmlb_event    =
    *    htmlb_event_ex =   .
    please try and tel me know.
    Regards,
    Taity

  • How to raise error message from PAI of oops ALV report

    Hi All,
    I have a requirement to raise error message form editable oops alv . After entering the data and then press SAVE button .
    Please help.
    Thanks in Advance

    HI SK,
    Write a Local class (Event Handeler) to handel the events. In Editable ALV once the user enter a value, CL_GUI_ALV_GRID will raise an event called DATA_CHANGED.
    1. Define and Implement a local class to handle that event.
    In the implementation of this class you need to get data from imported object to an internal table, then compare the same with the ALV output table.
    * Local Class to handler the events raised from the ALV Grid
    CLASS LCL_EVENT_HANDLER DEFINITION.
    PUBLIC SECTION.
    * Method to handel EDIT event, DATA_CHANGED of CL_GUI_ALV_GRID
      METHODS : ON_DATA_CHANGE FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                           IMPORTING ER_DATA_CHANGED.
    ENDCLASS.
    * Event handler class Implementation
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
      METHOD ON_DATA_CHANGE.
        DATA : LT_MODIFY TYPE LVC_T_MODI,
                   LS_MODIFY TYPE LVC_S_MODI.
    * Copying changed data into intenal table from Object
        LT_MODIFY = ER_DATA_CHANGED->MT_MOD_CELLS.
    * Modifying the ouptut table with the changed values
        IF LT_MODIFY[] IS NOT INITIAL.
              *Compare the ALV Output table with LT_MODIFY
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Then raise  a message on required condition in the same method.
    Note: To trigger the above method, you need to set event handler before displaying ALV (before calling method SET_TABLE_FOR_FIRST_DISPLAY)
    * Creating object for the Local event handler class
      CREATE OBJECT GR_HANDLER.
    * Set handler (call method of Event_handler) to handler Edit event
      SET HANDLER GR_HANDLER->ON_DATA_CHANGE FOR  GR_GRID.
    Regards,
    Vijay

  • How to find out tcode from a program that can run the same report?

    Hello all,
    I have a program name and I can see it is successfully proccessed. Now if I want to get the report via a tcode, how can I get it?
    How can I find the tcode from the program itself?
    Regards,

    Hi,
    1) Go into SE80, > Enter the name of the program, and press 'Enter'.
    2) You will see a folder called 'Transactions' appearing in the object list on the bottom left.
    3) Open the folder, and you'll find T.code of that program.
    Thanks,
    Nirav

  • How do I transfer events from one iphoto library to another?

    I have  2 iphoto libraries.  How do I transfer some events from one to the other?

    Either:
    1. Export from Library A to the Finder and then import to Library B - this means you won't get the edit history of the images nor will you get all the metadata
    or
    2. Use iPhoto Library Manager for the job, which will get all versions and all metadata
    or
    3. If you have Aperture, use that.

  • How to access a variable from one program to another (independent)

    Hi,
    My requirement is to use a variable(value) from one program(prog1) to another (prog2). how is it possible.
    Regards
    Arani Bhaskar

    Go for memory id .
    passing on values from one program to another program
    Program1
    EXPORT (variable) TO MEMORY ID 'LOC'.
    Program2
    IMPORT (variable) FROM MEMORY ID 'LOC'.
    LOC is the address , for more press f1 on export in abap editor.

  • How do I delete "Events from my Mac" from my iPad photo library?

    I usually sync images from Aperture via iTunes. And though I've unchecked all the boxes so that no photos were to be synced, the pad still has a ton of photos that show up in the Events or Moments.
    I've now turned off Photo syncing in iTunes, which should have deleted all the photos, but the pad still has this huge album of images titled, "Events from my Mac". How do I get rid of these images? They're taking up piles of space. I can't trash them as no trash icon shows up. ?
    Help!

    More info:
    So under the iPad preferences in General/ Usage:
    Camera roll = 69.0 MB
    Photo Library  = 7.96 GB ? !!!!
    Photo Stream = 345 MB ? PhotoStream is turned off! ?
    I just don't understand.
    iCloud is turned off on the Mac. It's on on the pad but Streaming is turned off, both personal and sharing.
    In iTunes there are no pictures from Aperture to import or sync.
    So what gives?
    Help!

Maybe you are looking for

  • How do I replace image color with an exact html color code?

    I simply want to change the color of a small pic to an existing html color code, 3399CC.  The pic is very simple, and only has one color.  In Photoshop CS4, I go to:  Image -> Adjustments -> Replace Color.  For the new replacement color, when I type

  • SAX Transformation

    Hi, I have a problem with creating a SAX Parser on the PI 7.1 server. I get the following error in the log when I test the code in the repository and in the message flow.  com.sap.aii.ib.server.mapping.execution.jaxpfactories.MappingTransformerFactor

  • Can BI Publisher 11.1.1.5 output native Excel 2007 format?

    I've tried auto-generating an RTF layout template from a very simple data model, but the layout can only produce old Excel format. When I set it to Excel2007, I get the following error in my BIP log: [2012-03-08T11:31:16.457-08:00] [AdminServer] [WAR

  • Where is iMac memory going?

    I have 4GB memory installed.  I have a program called Memory Cleaner installed.  As I use the comouter during the day, my memory gets used up and I end up with having to use the HD for additional memory.  Right now, for instance, I have Mail and Safa

  • Configuration guide for implementing RAC

    I am very new to Oracle . Can anybody give me comprehensive configuration guide about RAC using enterprise and manually. Thanks