Trigger process chain using event

Hi all,
I’d like to know if someone ever faced this kind of situation.
I have a process in R/3 and it must run every day, and when it’s finished I have to start a process chain in BW.
I thought to do this using events. So, I created a Job that executes this process and added a step( an ABAP program ) that generates an event in a target system, BW.
The program is this one:
PARAMETERS:
    p_eventi   TYPE btceventid,
    p_eventp   TYPE btcevtparm,
    p_server   TYPE btcserver.
Obligatory parameter: EventID.
EventID should be an existing event already defined in transaction
SM64 or using CREATE method of class CL_BATCH_EVENT:
p_eventi   = 'SAP_TEST'.
Optional parameters: event parameter and target server.
p_eventp = 'Event parameter'.
p_server    = ''.
  CALL METHOD cl_batch_event=>raise
    EXPORTING
      i_eventparm                    = p_eventp
      i_server                       = p_server
      i_eventid                      = p_eventi
    EXCEPTIONS
      excpt_raise_failed             = 1
      excpt_server_accepts_no_events = 2
      excpt_raise_forbidden          = 3
      excpt_unknown_event            = 4
      excpt_no_authority             = 5
      OTHERS                         = 6.
  CASE sy-subrc.
    WHEN 0.
      EXIT.
    WHEN 1 OR 2 OR 3.
Raise failed.
    WHEN 4.
Event does not exist.
    WHEN OTHERS.
Raised failed due to unknown reason.
  ENDCASE.
The execution of the job appears to be OK, but I checked the log at SM62 and couldn’t find any entrie, and the process chain didn’t start too.
I created the event at BW and R/3 side,  informed the variant with event / server in R/3, etc.
I’m missing some step??
Best Regards,
Tomas

This is what this note does.  From R/3, it will trigger an event in BW.
You can also read this post:
Triggering a Process Chain From R/3 pgm
Hope this helps.

Similar Messages

  • Trigger Process chain using ABAP code

    Hi All,
    As per my knowledge there are 2 ways to trigger a process chain using ABAP code :
    1) Using FM ‘RSPC_API_CHAIN_START’ and passing process chain name as the parameter
    2)Using FM 'BP_EVENT_RAISE' and passing process event as the parameter, which you can create using SM62 transaction.
    I would like to know which one is better to use, in terms of advantage and disadvantage.
    Thanks,
    Praveena

    Hi praveena,
    check these links ..u .may get some help
    Process Chain
    Process Chain
    How to run a Process Chain
    Process chain-parallel process
    Regards
    BILL

  • Trigger process chains using  ABAP program selection screen.

    Hi All
    I am loading flat files through process chains. My requirment is such that i need to create a ABAP selection screen so that user can load the flat file from his PC. when the user is loading the flat file i have to copy the file onto the application server folder and then display him the monitor errors/warnings (if any). when my data load is complete i need to archive the file with time stamp onto the application server folder.
    Please help me in this regard....
    thanks and regards
    sairam phani

    Hi,
    1. Using TA: AL11 create a folder in application server.
    2. There is a program to send the flat file to application server on r/3 side.
    Program Name:RC1TCG3Z.
    3. Regarding archiving...I have no idea.
    Regards,
    Vijay.

  • Process Chains with Event Trigger

    Hi Experts,
    Happy Valentine day.
    I have a requirement to run a Process Chain using Event IDs. Now these Evenrt ID should be triggered by a Program which raises this Eovent. Then this Program should be scheduled in BAckground to run periodically. Has anyone done this before. If yes, could you please shower some light on this topic with details on the steps.
    Thanks
    DV

    Hi,
    1)You can make the process chain to be trigered by an event.
    You create user events in SM62. In SM62, next to "User even names", click on Maintain and press Enter. Click on the Create icon to create a new event (let's call it ZEVENT).
    Next, in your process chain, change the Start variant to be scheduled "After event", and put in ZEVENT for the event name. Also, click on the "Periodic job" at the bottom. This will automatically reschedule the jobs for the process chain after it executes.
    Next, create an ABAP program (let's call it Z_EVENT_RAISE) to call the function module BP_EVENT_RAISE. You're code can look like this:
    codeREPORT Z_EVENT_RAISE.
    PARAMETERS: P_EVENT LIKE TBTCO-EVENTID.
    CALL FUNCTION 'BP_EVENT_RAISE'
    EXPORTING
    EVENTID = P_EVENT.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.[/code]
    This ABAP program will prompt for an event name, so you will need to create a variant (let's call it ZEVENT) which will save the value of the event name (also ZEVENT). You will need the variant name to be able to trigger the event in a batch job.
    Now all you need is the batch job. Use tcode SM36 to create a batch job where you call the ABAP program (Z_EVENT_RAISE) using the variant (ZEVENT).
    Note, SM64 only triggers an event manually.
    and you can copy this job to schedule it three times a day.
    2)In the Start process of your process chain, select Direct Scheduling and then click the Change Selections icon. This will bring you to the Start Time window where you can put in the Date/Time you want to start your process chain. At the bottom of this window, click on the Periodic job box and you will notice another icon way at the bottom called Period Values. Click this to determine what frequency the job should be rescheduled (ie. daily, weekly, etc.).
    3)you can do this by right-clicking on the start process, selection "Maintain Variant", choose "Direct Scheduling". Next select "Change Selections", pick your date and time, set your period values and you're done.
    Thanks,
    JituK

  • How-to trigger a process chain using ABAP?

    Does anybody know how to trigger a process chain using ABAP code?
    Any help would be appreciated!
    Thanks
    Ioan

    Hi Ioan,
    try this in your ABAP:
        CALL FUNCTION 'BP_EVENT_RAISE'
          EXPORTING
            eventid         = 'Your Event'
            eventparm       = 'START'
            target_instance = ' '
          EXCEPTIONS
            OTHERS          = 01.
    and schedule your process chain, waiting for 'Your Event'.
    regards
    Siggi

  • How do we raise an event to trigger process chain in BI

    Hi Guru's,
    I am having Oracle tables as one of my source systems, I developed the code using DBConnect.
    Now i need to run my Process chain when ever table get data from downstream systems.
    how do we raise an event to trigger the process chain in BI WHEN EVER ORACLE TABLE GET DATA?
    Thanks in Advance,
    Edited by: Naveen Kumar Kencha on Apr 2, 2008 11:21 PM
    Edited by: Naveen Kumar Kencha on Apr 2, 2008 11:27 PM
    Edited by: Naveen Kumar Kencha on Apr 2, 2008 11:27 PM

    Hi Naveen,
    i think we use ABAP program under general services to generate an event.
    searching form gave me following threads which might be helpfull
    1) explains Evenet generation [Event raising procedure]
    other helpfull threads
    [Standard tools for Event raising]
    [Event in Process Chain]
    i could get the process for triggering it weekly,,,it may giv u some help in resolving
    change the Start Process (1st process) in your Process Chain to trigger it to start after the event. To do this, maintain the Start Process of your Process Chain. Select "Direct Scheduling" and click the "Change Selections" icon. This will bring up a Start Time window. Click the "After Event" icon and enter your event name. Also, click the "Periodic Job" (this will insure that all the jobs created for each process in the Process Chain will reschedule themselves after executing the first time). Now save the Start Process, and reactivate and schedule the Process Chain.
    To execute the Process Chain, use transaction SM64 to trigger the event.
    If you want to trigger the event in batch, you will need to create an ABAP program that calls function module BP_EVENT_RAISE (sample ABAP code is available in this forum if you search for "BP_EVENT_RAISE").
    We create batch jobs where we call an external program called SAPEVT, located on the server, and I believe is available on all SAP clients, with the following parameter:
    EVTID('WEEKLY_PROCESS') SID(PU3) NUMBER(00) EVTPARM()
    This will trigger the event WEEKLY_PROCESS.
    See if this helps.
    regards,
    NR

  • Raise event to trigger process chain

    I have to raise the event to trigger the process chain, but I don't have authorizations to sm64, se37 to triger form fm bp_event_raise, can any body please help me in triggering the process chain.
    [email protected]

    Hi,
    Execute FM bp_event_raise in se37.
    give input parameters:
    EVENTID: *******  ( Mandetory , it is in process chain's event)
    EVENTPARM:  ( Optional)
    TARGET_INSTANCE  : (Optional).
    Then press F8.
    that all you need to do.
    Hope this will help.
    Manju

  • How to Trigger process chains??

    hi all
    How to Trigger process chains??
    Can anybody step by steps??
    thanks
    Senthil

    The background control options are available to directly schedule the start process. You can start the start process immediately , that is when activating the process chain, for a specified time, or after a particular event. When you activate the process chain, the start process is scheduled in the background as defined in your selections.
    You can also trigger the start of a process chain via a meta chain. A meta chain is when a process chain, to which you set this start condition, is fixed to another process chain. The process chain is started directly by this meta chain.
    When you start the start process via a meta chain, it is not scheduled after you activated the related process chain. The process is only started when the meta chain, to which it is linked, is running.
    The remaining chain processes, that is the application processes and the collection processes, are scheduled to wait for an event.
    The start process has the following special features:
    Only the start process can be scheduled without a predecessor process.
    The start process can not be a successor to another process.
    Only one start process is allowed for each process chain.
    One start process can only be used in an individual process chain

  • Trigger process chains from UNIX

    Hi,
    I just wanted to know how can we trigger Process chains from UNIX Server.
    Any pointers will be appreciated.
    Thanks

    I suggest to use the sapevt.exe.
    With it you can trigger an event in the SAP system with the execution of a simple command file (.bat for ex.)
    So the event will start the chain as you require.
    You can find more info for sapevt in:
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/frameset.htm
    Regards,
    Sregio
    Did you try that?
    Message was edited by: Sergio Locatelli

  • How to find process chain using background job in sm37

    How to find process chain using background job in sm37

    Better is to select the job.
    Select (Define) Step (s) or F6.
    Select the line and Menu Goto>Variant.
    The variant contains the name of the CHAIN and its VARIANT.
    Success
    We faced an old job and via job monitoring we were informed about a cancelled job every 'interval'.
    We noticed that the related chain was deleted but still the job was scheduled each interval again and was cancelled because an event was missing
    We could not find the scheduled job via SM37.
    Via view V_OP, view over tbtco abd tbtcp, we find the related entry.
    We delete these entries via function BP_JOB_DELETE....
    Edited by: Jack Otten on Jul 9, 2010 2:50 PM

  • Difference between process chain and event collector

    what is the difference between process chain and event collector and also plz explain about metachain.In what scenarios they are used.
    Many Thanks,

    hi,
    have a look at these help docs
    Process Chain:
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/c08b3baaa59649e10000000a11402f/content.htm
    Event Collector:
    http://help.sap.com/saphelp_bw30b/helpdata/en/c1/6c0538c7cb583ae10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/6e/192756029db54192427cf6853c77a7/content.htm
    Creating an event colector:
    http://help.sap.com/saphelp_bw30b/helpdata/en/45/253d3873130057e10000009b38f842/content.htm
    regards
    sham'm

  • Process chains and event collectors

    Hi All,
    I need help in Process chains and event collectors.I joined in new project and this client using process chains and event collectors and they ask me to work on these areas.I didnt work on this as of now So please send any docs on this area and explain the procedure and technology methods behind this concept.I would really appreciate If someone can send me the full documentation on this concept as I couldnt find any  any docs on this.
    Thanks,
    Ras

    Hi Ras,
    Process chains are a sequence of processes to be performed. The are put together in a chain with the necessary dependancies (process A needs to finish before B can start) and conditions (if A and B are successful then C else send an email), and then scheduled. They usually revolve around processes related to data loading: Load, activate, roll up, compress etc.
    Please take a look at this links/threads for more info:
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/c08b3baaa59649e10000000a11402f/content.htm
    process chains
    process chains
    Process chains
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8da0cd90-0201-0010-2d9a-abab69f10045
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/19683495-0501-0010-4381-b31db6ece1e9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36693695-0501-0010-698a-a015c6aac9e1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9936e790-0201-0010-f185-89d0377639db
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/263de690-0201-0010-bc9f-b65b3e7ba11c
    Process Chains
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8da0cd90-0201-0010-2d9a-abab69f10045
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/c08b3baaa59649e10000000a11402f/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/19683495-0501-0010-4381-b31db6ece1e9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36693695-0501-0010-698a-a015c6aac9e1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9936e790-0201-0010-f185-89d0377639db
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/263de690-0201-0010-bc9f-b65b3e7ba11c
    Re: Ho to make a variable mandatory or optional?
    There are lot of threads available in the SDN....go through them.....hope it really helps you in getting understand what are process chains and Events included in that.
    Assign points if it helps you.
    Regards,
    Sreedhar

  • PI Interface Posting Files - Trigger Process Chain Issue

    Dear Reader,
    Situation -
    We get multiple flat files from source system via PI interface. To process this in BW 7.0 side we have created the web service interface. In the function module we have written a code to trigger process chain, once a data is posted.
    Issue -
    As there are multiple files being posted, the PC runs on completion of the every single post, which is not desired. We need to run the process chain only once at the end of all the files being posted.
    Notes -
    1. Number of files keep varying.
    2. Clubbing all the files in a single file and then posting it would cause performance issues.
    Request your help in find a way like -
    1. A file being posted of name, say 'START PC', which can be trapped in the funciton module and controll the PC call.
    2. <any Other idea>
    regards,
    vinay gupta

    Hi Dhanya,
    This is the code i have in the ABAP program in the process chain. I just included the API_SEMBPS_POST part, but still it doesn't work. Please give me your email address so that i can send some screenshots.
    REPORT  ZHTEST.
    DATA: l_subrc TYPE sy-subrc.
    DATA: ls_return TYPE bapiret2.
    CALL FUNCTION 'API_SEMBPS_POST'
    IMPORTING
       E_SUBRC         = l_subrc
       ES_RETURN       = ls_return.
    CALL FUNCTION 'RSAPO_CLOSE_TRANS_REQUEST'
      EXPORTING
        I_INFOCUBE               = 'ZMAP_TAB'
    EXCEPTIONS
      ILLEGAL_INPUT            = 1
      REQUEST_NOT_CLOSED       = 2
      INHERITED_ERROR          = 3
      OTHERS                   = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Finding Process Chain using the Request Number

    Hello,
    I am new to BI and currently monitoring Process Chains.
    I am scheduling a process chain which runs 3 times in a day.
    When i see the infocube there are four requests in the infocube, that means one more request apart from my three.
    The other reuqest is also being exeuted by user ALEREMOTE which means even it is being triggered by some other process chain.
    Can i please know how to find out the other process chain using the request number or so.
    Thanks in Advance.
    Bharathi.

    Hi,
    Goto each request and navigate to Infopackge screen and there you ll be able to find the process chain maintenance button. Click on that button, there you ll come to know what are all the process chain have been used for the single or multiple IPs.
    Check one by one Request Infopak.
    Thanks
    Sathish

  • Use event trigger process chain

    Hi friends,
    I am working on a process chain tuning task.
    One request is to change a schedule method  of an interrupt from date/time to event.
    I know how to generate and utilize event.
    My worrying is:
    Is an event has duration?
    E.g Today's process chain scheduled at 01am,,processing, the interrupt was triggered  by event at 04am, but at 10am, the event was trigger again for some unknown reason.
    Then,the process chain with the interrupt will be scheduled  at 04am tomorrow, but actually, there may be no event for tomorrow as requirement(due to some reasons,we do not like PC run everyday).
    Anyone know how to solve this problem?

    Martin
    You partially answered my questions.
    My chain contains both date/time schedule and event trigger.
    As is:
    Start-date/time schedule daily at 1:00am
    step1,step2,,etc
    interrupt-now, it is date/time schedule,at 4:00am
    other steps.
    To be:
    Start-date/time schedule daily at 1:00am
    step1,step2,,etc
    interrupt-  event trigger schedule
    other steps.
    I know how to trigger event by ABAP program.
    My concern is:
    Today afternoon, someone run this ABAP 10 times to generate 10 events,what will happen tomorrow?
    Actually,according to business requirement,tomorrow's process chain(interrupt below part) shall not be ran.

Maybe you are looking for

  • Button to extract pages

    myexportFunc = app.trustedFunction(function(){ ////Get Naming Convention var cRtn = app.response('Enter naming convention for section:'); ////Save to current location. Get path of current doc var testing = this.path; var test = testing.split('/'); va

  • Align left panels inside BoxLayOut / Center a frame center screen

    Hi, I've googled for a good while now so now I'm posting the question I have not found a satisfactory answer. It may be that I've been searching by the wrong terms, because it's an easy thing in concept. This is a JSwing question and all terms below

  • Nokia c6 model

    nokia c6 how can support amharic language?

  • Sobre el recargo de equivalencia

    Hola: Necesito ayuda para configurar el grupo impositivo 16 % de IVA  + 4 % de Recargo de equivalencia. Si hago una factura utilizando este grupo impositivo, en ningún caso me muestra la línea del recargo de equivalencia en el total. Actualmente lo h

  • 2.0.2 "No WiFi"

    I upgraded to 2.0.2 last night and I lost WiFi capability. In settings wifi I have "No WiFi" and the entire line is grayed out. I have restored my phone with no success, I reset the network settings on my phone, anyone have any suggestions.