Tuesday, November 9, 2010

hello,i have a question about process chain. i have 2 process chains

PROCESS CHAIN 1
PROCESS CHAIN 2

PROCESS CHAIN 1 runs everyday from 11 PM - 6 AM. i want to run PROCESS CHAIN 2 every 30 mins every day. but not while PROCESS CHAIN 1 is running. any idea how to do that?


You need to write some logic in a program to raise event
by including conditions (11 PM - 6 AM) and raise event for every 30mins
Add that event in 2 nd PC


1 - define ABAP Report Z_EVENT_RAISER (see sample code below)
2 - define a variant for this Report (Event Name mandatory)
3 - Call ABAP Report Z_EVENT_RAISER from within your Proces Chain.

This should work
Hope it helps

GFV

*====================================================
&---------------------------------------------------------------------
*& Report Z_EVENT_RAISER *
*& *
&---------------------------------------------------------------------
*& *
*& *
&---------------------------------------------------------------------

REPORT Z_EVENT_RAISER .

selection-screen begin of block parametri with frame.
parameters:
EVENT like BTCH1250-EVENTID obligatory,
PARAM like BTCH1250-PARAMETER.
selection-screen skip.
selection-screen end of block parametri.

CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
eventid = EVENT
EVENTPARM = PARAM
* TARGET_INSTANCE = ' '
* EXCEPTIONS
* BAD_EVENTID = 1
* EVENTID_DOES_NOT_EXIST = 2
* EVENTID_MISSING = 3
* RAISE_FAILED = 4
* OTHERS = 5
.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

No comments:

Post a Comment