on 02-17-2014 12:41 PM
Hi All
we need to hold on the process chain before dso activation for 30 min daily in BW 3.5 .
Because we have some dependency with other process chain, once this dependent process chain completed ,
then that dso activation need to start. is there any way to this requirement.
iam trying with BP_event_raise.
Thanks in advance,
Regards,
Polu.
Hi Polu,
Create simple ABAP report with following code.
Report ZTIME_INTERVAL
PARAMETERS p_time type i.
If p_time is not INITIAL.
WAIT UP TO p_time SECONDS.
endif.
Call the ABAP program with defined variant of '1800' seconds with ABAP process type in Process chain before DSO activation.
This report you can reuse for other process chains.
Regards,
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Polu,
Below code can help you out.
Sorry, I just roughed out the logic. you may have to tune up the ABAP statements.
this is a wait of 30 minutes maximum based on checking of completion of your process chain
Please take a help of ABAP person in your team to tune up the logic below.
Data: lt_pclog type standard table of rspclogchain.
data: wa_pclog like line of lt_pclog.
* data declaration for FM call
data: I_CHAIN TYPE RSPC_CHAIN.
data: I_LOGID TYPE RSPC_LOGID.
data: E_STATUS TYPE RSPC_STATE.
* provide your process chain and select the log from it
* this is a wait of 30 minutes and as soon as the process chain is completed the program will hand over the next processing.
DO 30 TIMES.
Select * from RSPCLOGCHAIN into table lt_pclog where chain_id = ' ' AND datum = sy-datum. "<your pc id>
if sy-subrc EQ 0.
sort lt_pclog by DATUM ZEIT. "this is to get the latest Log id of process chain It will be generated if the process chain has ended.
read table lt_pclog into wa_pclog index 1. " read the latest record
I_CHAIN = '' "<your pc id>
I_LOGID = wa_pclog-LOG_ID
CALL FUNCTION 'RSPC_API_CHAIN_GET_STATUS'
EXPORTING
I_CHAIN = I_CHAIN
I_LOGID = I_LOGID
IMPORTING
E_STATUS = E_STATUS.
IF E_STATUS = 'G'. " successfully completed
* procceed
EXIT.
ELSE.
WAIT 60 Seconds.
ENDIF.
ELSE.
WAIT 60 Seconds.
Endif.
EndDO.
Thanks
Amit
Hi Amit ,
thanks for your reply its working for me , but i have done small chnges in your code like as below
DATA: i_chain TYPE rspc_chain.
DATA: i_logid TYPE rspc_logid.
DATA: e_status TYPE rspc_state.
PARAMETERS: chainid TYPE rspc_chain.
DATA: lt_pclog TYPE STANDARD TABLE OF rspclogchain,
wa_pclog LIKE LINE OF lt_pclog.
DO 240 TIMES.
SELECT * FROM rspclogchain INTO TABLE lt_pclog WHERE chain_id = chainid AND datum = sy-datum.
IF sy-subrc EQ 0.
SORT lt_pclog BY datum zeit.
READ TABLE lt_pclog INTO wa_pclog INDEX 1.
i_chain = wa_pclog-chain_id.
i_logid = wa_pclog-log_id.
CALL FUNCTION 'RSPC_API_CHAIN_GET_STATUS'
EXPORTING
i_chain = i_chain
i_logid = i_logid
IMPORTING
e_status = e_status.
IF e_status = 'G'.
EXIT.
ELSE.
WAIT UP TO 60 SECONDS.
ENDIF.
ELSE.
WAIT UP TO 60 SECONDS.
ENDIF.
ENDDO.
IF e_status = 'R' .
EXIT.
ELSEIF
e_status = 'Y' .
EXIT.
ENDIF.
Hi Anki,
As mentioned one way is to change your process chain and include dependency chain before DSO chain.
otherwise you can include a Abap program event and play with statement: "WAIT UP TO 1800 SECONDS".
Hope this will help you to resolve your issue.
Thanks & Regards,
Vipin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi polu,
did you try interrupt process?
Add interrupt process to your chain with DSO activation (lets say chain1) immediately before DSO activation.
In your dependent chain, lets say chain2, you send an event "DSOxxx". In chain1 you define event "DSOxx" as receiving event in interrupt process. When chain1 is executed it will be interrupted until it receives event from chain2. Then it will continue.
Regards,
Jürgen
H Polu,
there is a simple way of doing it.
You need to use an interrupt Process type in the process chain before the DSO activation takes place.
That interrupt should capture the events raised in the lookup chain. You need to raise an event in the lookup process chain to work.
http://scn.sap.com/docs/DOC-52411
Let me know if you need more details on it.
Thanks,
Sathya
Hi Polu,
create the meta chain under include one more local chain, means your saying dependence PC include
first dependence process chain and then DSO process chain trigger.
otherwise create the custom program ,custom program unit wait the dependence process chain will complete then custom program it will trigger the PC.
Thanks,
Phani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Polu,
Best way would be as Ravi mentioned - Create a meta chain with both the chains.
Alternatively, dirty way would be to create a custom program and include it in your dependent chain.
You can put a custom wait in the program or custom program can check the completion of last process of checking process chain.
Only one benifit I can see with custom program is that you will have more control over the processing if you use a parameter table for the time delay in program.
Please let us know if there are any queries.
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
One work around (kind of meta chain), you can add the dependent chain as local chain process before the dso activation process, so that once the dependent chain gets completed then the dso activation takes place.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.