Process Chain - Multi Event in Report ABAP
Hi,
I should build a ProcessChain containing a report ABAP that verify the existence of 3 files on the directory and what in base to the event performs a process type or another. How am I able to set the Interface IF_RSPC_MULTI_EVENT and to pass the parameter from report ABAP for multi_event ?
Thank You.
Hi
Toi integrate an abap program in a process chain it's not necessary to modify the abap object logic. It's necessary to insert a Object ABAP Program
check this link for a typical example of abap programming in process chains
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
Andrea
Similar Messages
-
Process Chain Review Question: function module/ABAP program/Event
Hi,
1. Can you tell me a bit more about function modules such as RSPC_CHAIN_ACTIVATE_REMOTE
2. What are function modules in general terms. i.e. What is their role?
3. How do I see all function module available?
4. When is function module used instead of ABAP program?
5. How do they help in the support and monitoring of Process Chains?
6. I am getting confused over the following under process chains job, event, function module and ABAP Program
Thanks2. What are function modules in general terms. i.e. What is their role?
Function module return a value ( most of the time), they return some value either a single value of rane of value or even a table. Example: FM to return fiscal period gieven the fiscal vaeiant and system date.
3. How do I see all function module available?
Go to Se37 and this is function builder. You will find FM starting with RS* more useful. You cna also create your own in Se37.
4. When is function module used instead of ABAP program?
In addtion to answer I gave in 3 above, program is used to check some logic and update some tables or give screen output.
You may note FM is also a program.
5. How do they help in the support and monitoring of Process Chains?
As I said, for monitoring chains, use Sm37 and logs in RSPC.
6. I am getting confused over the following under process chains job, event, function module and ABAP Program
I am not clear what are you looking for.
You cna schedule a FM or a program to run in a chain. Is that what you mean?
Ravi Thothadri -
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
DVHi,
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 -
URGENT:Process Chains And events Related
Hi All,
I have created a new process chain which is a normal ODS Process Chain.For that I started with the start Process and then created event in sm62 to trigger the start of process chain.Similarly,I have at the end of the process chain ,I have added 2 ABAP Programs ,one to mark the successful completion of process chain and another to mark the Error or Unsuccessful completion.For these programs,I maintaines Processvariants and here, we have utility Programs.So used the relevant utility program and created a program variant and Events ,One for successful completion of process chain and another to mark the Error or Unsuccessful completion.
But ,Now ,I find that when I trigger the eventin sm64,I find that the process chain is not being run.Is that any problem with the events I created.This is the first i am involved with creation of events in SM62.Can anyone help me in this regard.
Can anyone,tell me thatdo we need to do anything else apart from Creating events .Imean like assigning jobs and then Programs in the Step of that Job.
Please Kindly help me in this regard.It is very very urgent for me.Thank you.Points will be assigned.
Regards,
SamirHi,
I have tried in the same way you have said .I have maintained as after event and activated and scheduled.after that i triggered the event insm64.But still,I am not able to see the Load in RSMO.
I have just checked out in sm37.And found that some jobs have failed.I think this might be the reason for the Process chain to not run.
I am just pasting the error msg and solution.
Job BI_PROCESS_ABAP, waiting for event RSPROCESS 489W6WH6I7OHV7BL3N9909F7F, has no predecessor
Message no. RSPC003
Diagnosis
Although job BI_PROCESS_ABAP has been started by event RSPROCESS 489W6WH6I7OHV7BL3N9909F7F and is recognized in the process chain, the current run for this process has no job preceding it.
This is why the system was unable to determine a log ID, and the chain is broken.
System response
The job has been terminated.
Procedure
With the exception of the start process, each process must have a process that precedes it.
Then Another error for the another cancelled job is
Job BI_PROCESS_OR, waiting for event RSPROCESS 489WC2QYBC4AJSYILQ10TWABF, has no predecessor
Message no. RSPC003
Diagnosis
Although job BI_PROCESS_OR has been started by event RSPROCESS 489WC2QYBC4AJSYILQ10TWABF and is recognized in the process chain, the current run for this process has no job preceding it.
This is why the system was unable to determine a log ID, and the chain is broken.
System response
The job has been terminated.
Procedure
With the exception of the start process, each process must have a process that precedes it.
Please kindly help me if you understand the problem.
Thanks,
Samir -
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,
RasHi 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 -
Trigger process chain using event
Hi all,
Id 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 its 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 couldnt find any entrie, and the process chain didnt start too.
I created the event at BW and R/3 side, informed the variant with event / server in R/3, etc.
Im missing some step??
Best Regards,
TomasThis 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. -
Process Chain after EVENT - More than once
Hi all, I would like to run a process chain after an event; everything works fine with the following model...
PC1 >>
>> some processes
>> EVENT TRIGGER
PC2 >>
(after EVENT) runs ok after event ONLY if I SCHEDULE it
After succesfully run, I've tried to run again immediatly PC1 again and it runs ok, even triggers mentioned EVENT, but PC2 never runs again until I manually SCHEDULE it.
The answer is: how should I SCHEDULE the process chain PC2 so I'll "never" need again to SCHEDULE it when I want it to run after event triggered on PC1?
Hope you can help me.
Thanks a lot!
BernardoHello,
Both process chains are separated. At the model I described, at the end of PC1 event is succesfully triggered. After event is triggered at PC1, PC2 triggers correctly due it is scheduled as "after event".
Everything works fine, then, if I trigger PC1 again it runs correctly; event is triggered succesfully but PC2 (that is scheduled as "after event") doesn't runs; this is because I haven't SCHEDULED it again (after the first succesfully run).
What I want is not schedule PC2 after a succesfully run. Is there any way to reach that purpose?
Thanks again!
Bernardo -
Infopackage laoding scheduled in Process Chain and events involved
Hi BW-Experts,
Till now I was loading a infopackage normally and it had an subsequent event. Now if I schedule this infoapckage in process chain will it raise event after the load finishes.
Thanks
Arun PurohitIts BW 3.5
in it when we go into infopackage we get options like..
Scheduling Options
Subsequent Processes
in subsequent processes we can tick on chk box for triggereing event.......
if I load this infopackage without Process Chain then it will raise event after load finishes....
my query is?
will this infopackage raise event if I Schedule it thru Processs Chain after load finishes..
Edited by: Arun Purohit on Jan 16, 2009 2:24 PM -
Need to find process chain from event
Dear Experts,
I need to find out all process chains which are getting triggered by a certain event.
( I have an event name , need to find corresponding process chain ).
Kindly suggest.
Regards
Vaibhav HaldeHi,
In SM37 you can find it, give event in SM37 an dsee the log. In the following blog you hav esome comments on the same so see the comments.
How to trigger the Process Chains in BW from ECC
/people/surendrakumarreddy.koduru/blog/2009/03/18/how-to-trigger-the-process-chains-in-bw-from-ecc
Thanks
Reddy -
How to find Process chain for event and parameter
Hi,
I have Event and parameter for the process, I wanted to know the which process chain does that process belons to.
Is there any table where I can see those.Hi,
Try these tables.
RSEVENTCHAIN Event Chain Processing Event Table
RSEVENTHEAD Header for the event chain
RSEVENTHEADT Header for the event chain
RSPCCHAIN Process chain details
RSPCCHAINATTR Attributes for a Process Chain
RSPCCHAINEVENTS Multiple Events with Process Chains
RSPCCHAINT Texts for Chain
RSPCCOMMANDLOG System Command Execution Logs (Process Chains)
RSPCLOGCHAIN Cross-Table Log ID / Chain ID
RSPCLOGS Application Logs for the Process Chains
RSPCPROCESSLOG Logs for the Chain Runs
RSPCRUNVARIABLES Variables for Process Chains for Runtime
RSPC_MONITOR Monitor individual process chains
Hope this helps.
Thanks,
JituK -
ABAP Program in a Process Chain
Hi!
I create a program in ABAP/4. The program modify an attribute of a Z table I have previously created.
I want to add that program in a process chain of BW which load a cube. The problem is that when I am in in the process chain, the program I have created doesn´t appear in the available programs to select and associate to the process chain.
What I have to do to have the ABAP program available to select and associate to the process chain?
Thanks in advance.Hello Nicolas, there are a few options you can try.
1. Instead of an ABAP program, would you think of incorporating your logic into a function module and then create a generic datasource in R/3 to extract the data from your Z table using the function module. There is a function module in R/3 called <b>RSAX_BIW_GET_DATA_SIMPLE</b> that you can copy and use as a template for your function module. Refer to the following blog:
<a href="/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module:///people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
You can also search this forum for RSAX_BIW_GET_DATA_SIMPLE for other ideas.
2. If you really want to use your ABAP program in R/3, then your best solution would be to create a job in R/3 that is triggered by an event. This job will have two steps in it.
Step 1: execute your ABAP program to fill your Z table
Step 2: execute program to notify process chain in BW that ABAP process is complete (sample source below)
In your process chain in BW, your ABAP process should be set up to be
Called From: (RFC destination of your R/3 system)
Scheduled Program: Event (event name in R/3)
You may get a help message about "Requirements for asynchronous processes". This is an informational message telling you that if you call an ABAP program from a remote system, there is no way for BW to monitor it, so you will have to execute a function module (RSPC_ABAP_FINISH) in the R/3 system to inform the process chain when the ABAP program finishes. You can create your own program in R/3 to use this function module:
*& Report Z_RSPC_END_PROCESS *
* Trigger end of an ABAP process in BW process chain.
REPORT z_rspc_end_process.
*"*"Lokale Schnittstelle: Detination BW
*" IMPORTING
*" VALUE(I_VARIANT) TYPE RSPC_VARIANT
*" EXCEPTIONS
*" ALREADY_FINISHED
PARAMETER: p_rfc LIKE rfcdes-rfcdest,
p_var(30) TYPE c.
CALL FUNCTION 'RSPC_ABAP_FINISH'
DESTINATION p_rfc
EXPORTING
I_VARIANT = p_var
EXCEPTIONS
ALREADY_FINISHED = 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.
ENDIF.
This program in R/3 will inform your process chain in BW that the ABAP process is finished and BW will continue to next process in the process chain.
Note:
p_rfc would be the RFC destination of your BW system
p_var would be the name of the ABAP process in your process chain
Hope this helps. -
How to I insert ABAP Programs in Process Chain ?
Hi mates,
I need to know how exactly in a Process Chain can I start a ABAP Program ?
For Instance, if X happens the go and execute this program it not execute Y program ?
Kindly adviceHi,
Yes you can definitely insert an ABAP program process in a PC.
You can include a ABAP Process which is available in the Processes under PC. And it asks for a Variant and ABAP report name.
You need to create a Variant for the ABAP program.
This will also have a Output, like if in case the variants are correct and the Program logic is matched then in that case the output is given else not given. Which turns the process GREEN / RED accordingly.
Hope this helps,
Pradip Parmar -
Hi experts!
We currently have a situation where by we need to update an end to end loading status table. This loading status table is a customize table that contains our datastage extraction status as well as its corresponding process chain load status.
We thought of writing an ABAP program and put it in the beginning of the process chain to update this loading status table inorder to do so we need to know the current process chain that is triggered and indicate it has commenced. So the question is do you all know what is the FM or program that captures the process chain ID and its details and write it into the standard RSPC Log tables?
Do note that it should be able to handle simultaneous trigger of the process chain.Hi,
Try this :
REPORT ZPCNEW.
TABLES : RSPCLOGCHAIN.
DATA : IT_tab TYPE TABLE OF RSPCLOGCHAIN,
WA_tab TYPE RSPCLOGCHAIN.
FIELD-SYMBOLS <fs> LIKE LINE OF it_tab.
PARAMETERS :LV_CHAIN type RSPCLOGCHAIN-CHAIN_ID.
select * from RSPCLOGCHAIN into table it_tab
where CHAIN_ID = LV_CHAIN
and DATUM = sy-datum.
SORT it_tab DESCENDING BY DATUM ZEIT.
Read table it_tab INDEX 1 ASSIGNING <fs>.
IF sy-subrc = 0.
if <fs>-ZEIT < sy-uzeit.
Message e000(sabapdocu) with 'Error'.
else.
MESSAGE i162(00) WITH 'Successful'.
endif.
else.
MESSAGE i162(00) WITH 'Successful'.
endif.
-Vikram -
Creating Event driven process chain
Hi all,
In my scenario there are two chains in which
1. First chain is normal chain, which we are using to
load business data.
2. Second chain will contain start variant and one ABAP
program that will call first chain and this second
chain is event driven.
So can anybody send me relevant documents or
information regarding how to create event? How to
schedule process chain using event? and also how to call
process chain using ABAP program?
Thanks & Regards
Ajinkya DeodharHi,
Look into the following links:
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
Event collector:
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
Creation of Event:
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
Hope it hepls you
Maybe you are looking for
-
This is strange. I have never recieved this error message on any other Software update. This is a two week old machine. Why is this happening?
-
What is the recommended ratio of publish nodes to dispatcher web servers for CQ5.5?
What is the recommended ratio of publish nodes to dispatcher web servers for CQ5.5? We are getting conflicting opinions on this form the field. I realize this is a loaded question. I'd like to see how Adobe presents this opinion. In the past scaling
-
Which External Harddrive should I buy for my Macbook Pro
Hi, I am looking to buy an Extenrnal Harddrive fro my Macbook Pro, so that I can use Tiem machine and backup all my photos, files etc.. I have been looking at a 2TB and a 3TB one... Does it make any difference abouthe USB 2.0 and 3.0? Does my Macbook
-
Real player and wmp on websites
Why is it when I try to listen to an audio clip on a site it says i do not have the correct plugins to use even though i downloaded and installed both windows media player and realplayer for mac on my new Macbook. I have no problem on my G5. My macbo
-
So, like I said, my iPod classic deleted my videos and now they aren't in my library. Is there any way for me to get them back or do I just count it as a total loss and move on?