cancel
Showing results for 
Search instead for 
Did you mean: 

we need to hold on the process chain before dso activation for 30 min daily in BW 3.5 .

Former Member
0 Kudos

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.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Sachin,

thank you iam looking the same , is there way to  calculete the time of process chain 1 ,

i mean here we are giving the fixed one right , this will stop the chain 30 min .

is there any way to do auto calculation of the time .

Regards,

Polu.

Former Member
0 Kudos

Hi Polu,

Do you want to wait for Chain1 need to be finished for DSO activation (Chain 2) need to be triggered or just a process type of chain1?

the auto calculation of single process type would be difficult.

We can handle it through events. I need more calrification.

Regards,
Sachin

Former Member
0 Kudos

Hi Sachin,

chain 1  .... ACR

chain 2 ..... DSO activation

for me  chain1 need to be finished ,then chain 2 dso activation need to triggred.

regards,

Polu.

Former Member
0 Kudos

Hi Polu,

Include DSO activation process type step in Chain 1. After the last step in existing Chain 1.

Former Member
0 Kudos

Hi Polu,

In such case your chain 1 should be part of chain 2 as meta chain. (local chain).

Or

Add Chain 2 at the end of Chain 1.

Regards,

Sachin

Former Member
0 Kudos

No sachin.....!!! iam trying BTC_event_Raise program  ...

Regards,

Polu

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Polu,

Glad! it worked

Happy working.

Regards

Amit


Answers (4)

Answers (4)

former_member229708
Active Participant
0 Kudos

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

Former Member
0 Kudos

Hi vipin,

Already the both the chains are running in one meta chain, that process it will not work in my case.

That’s why iam planning to create some program here.

Thanks helpful.

Regards,

Polu.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos


Hi Jürgen

we have interrupt process type from sap bi 7.0 onwords , not in 3.5

regards,

Polu.

Former Member
0 Kudos

Hi raju 

we have interrupt process type from sap bi 7.0 onwords , not in 3.5

regards,

Polu.

Former Member
0 Kudos

Hi Polu,

Yes you are right.

Sorry i missed that part. You did mention 3.5 in  your question.

Thanks,

Sathya

former_member976
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Amit,

Already the both the chains are running in one meta chain, that process it will not work in my case.

That’s why iam planning to create some program here.

if you have sample program for it ? Thanks helpful.

Regards,

Polu.

Former Member
0 Kudos

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