cancel
Showing results for 
Search instead for 
Did you mean: 

launch process chain after the event

Former Member
0 Kudos

Good afternoon.

I

need to set up the launch process chain after the event.

Next process - data from a web-service (XI) are loaded into the PSA data source. After request is received in PSA, I need to start the process chain.

I created an event in sm64, described the event call-in program through BP_EVENT_RAISE. In sm34 I am trying to schedule a job BI_PROCESS_TRIGGER is my chain processes. I do not understand how to do it? Probably need a schedule RSPROCESS in step?

Accepted Solutions (1)

Accepted Solutions (1)

michael_devine
Employee
Employee
0 Kudos

Hi,

Please follow Note 919458 - Program 'BTC_EVENT_RAISE'

Regards,

Michael

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you.

Table RSSELDONE can really determine whether requests for a certain period - such as sy-datum. Knowing requests can determine what status they have. Only select queries can be closed in the table RSREQDONE. And then raise the event that will trigger the chain.

But I decided my task easier. The module upload data from XI, after the data were sent to the data sources, I just call the event

CALL METHOD cl_batch_event => raise

Former Member
0 Kudos

Thanks for answers.

But this is not what I need. Apparently I badly explained.

I need to understand that the PSA data source request came with the data, and only after the request has come, I start the event, which has already run the process chain.

Do you have any suggestions on how you can check for a new request in the PSA data source?

timkorba
Participant
0 Kudos

Are you stating that only after the PSA data is loaded for the InfoObject that you want to execute the follow on processes?  If you want to do that, why not view the table RSSELDONE and determine the latest PSA entry that was loaded and if it was the prior day then you execute the event within the same program?  Just trying to think of other options and see if that is what you are trying to do.

timkorba
Participant
0 Kudos

Pavel,

If I am understanding your requirement, you want to create a program to raise an event which will be called within the process chain.

You should do the following:

1) Create a wrapper program that calls the FM cl_batch_event (with a snip-it of the code below)

2) Create a local event for an ABAP program within your process chain which calls the event

3) You need to have your other process chain released so it will be looking for the event when it is raised. I would recommend executing both process chains at the same time.


Let me know if this supports your question.

CALL METHOD cl_batch_event=>raise
         EXPORTING
           i_eventid             = p_event
*         i_eventparm           =
*         i_server              =
         EXCEPTIONS
           excpt_raise_failed    = 1
           excpt_raise_forbidden = 2
           excpt_unknown_event   = 3
           excpt_no_authority    = 4
           OTHERS                = 5.
       CASE sy-subrc.
         WHEN 0.
           WRITE: 'Event ', p_event, ' successfully raised'.
         WHEN 1 OR 5.
           WRITE: 'Event ', p_event, ' failed to properly execute. Please retry.'.
         WHEN 2.
           WRITE: 'Event ', p_event, ' is forbidden from execution.'.
         WHEN 3.
           WRITE: 'Event ', p_event, ' not found.'.
         WHEN 4.
           WRITE: 'You do not have authorization to execute event ', p_event.
       ENDCASE.