on 11-27-2014 6:17 PM
Hi friends,
I have a requirement to schedule a process chain on weekdays and on weekends the process chain must get unscheduled,How to proceed with this requirement.
Regards,
Sivarama Landa
Hi Siva,
You can try with Decision Between Multiple alternatives process type which is available under General Services.
DATE_WEEKDAY1( SYST-DATUM ) = '6' OR DATE_WEEKDAY1( SYST-DATUM ) = '7'.
. Design the chain in way that after start variant include Decision Between Multiple alternatives and then the remaining steps
Every day the chain will trigger but it will check the decision, if it is sunday or saturday the chain will go to AND variant or else it will process to the next steps.
Hope this will work
Thanks
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
Easiest way is to schedule 5 different WEEKLY jobs, each weekly job should be scheduled to run on monday, tuesday, wednesday, thursday and friday respectively.
Regards,
Harish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Siva,
Did you check on the above option?
Regards,
Tp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Siva,
Implement BADI "RSAR_CONNECTOR" where you can implement a custom function.
In the custom function you can write a logic to find the day.
refer to the below forum it serves your purpose.
http://scn.sap.com/docs/DOC-56309
Regards,
Tp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello all,
Thanks for the important inputs.All the inputs have been very helpful
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can achieve this by using event in process chain.
DATE_COMPUTE_DAY will give the Day no for the particular date.
0 Sunday
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
Sample program.
REPORT YXXXXX.
DATA: WK_DAY TYPE SCAL-INDICATOR.
DATA: EVENTID LIKE TBTCJOB-EVENTID.
DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM.
EVENTID = 'YEVENT'.
EVENTPARM = 'YEVENT_PARAMETER'.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
DATE = SY-DATUM
IMPORTING
DAY = WK_DAY.
IF WK_DAY EQ 1 OR
WK_DAY EQ 2 OR
WK_DAY EQ 3 OR
WK_DAY EQ 4 OR
WK_DAY EQ 5.
CALL FUNCTION 'RSSM_EVENT_RAISE'
EXPORTING
I_EVENTID = EVENTID
I_EVENTPARM = 'YEVENT_PARAMERTER'
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 5.
Thanks,
Somesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kris,
1. You can also use a 3rd party scheduling tool to meet your condition.
2. Create a background job.
Regards,
AR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, Factory caladar is the way to go in this scenario. You can use the existing one as well, but make sure that it doesn't have any holidays listed, otherwise chain will run not run on that day. The best way to create a seperate Calandar w/o any holiday, that way chain will run from Mon to Fri.
Rgds..
Shambhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you could schedule a job or trigger an event only on weekdays, and then let your PC run after that job/event. But to schedule this job you will have the same problem 🙂
The easiest way is to create a factory calendar in BW which is NOT used in ECC.
Txn SCAL is what you're looking for. Select factory calendar and click edit. then create a new calendar and don't enter a holiday calendar. Select your working days and you're good to go.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I think we have at least 2 way to get this :
first of all, if there's factory calendar maintained or extracted into your BW system, when you maintain the start variant, schedule the process chain everyday, then use "Restirction" option to check on "do not run or sunday or holiday" option.
Second, use some code to deal with it :
1. Schedule process chain executed everyday, at the beginning of processchain, you can use a "Decision" process to check if it's working day or weekend, if weekend terminate process chain , otherwise go ahead.
2. Create a simple ABAP program, check whether the current date is working day or weekend, if working day , raise a event to trigger the process chain, otherwise, finish program. and then schedule this program executed everyday. For this way, process chain starter must configured as after event.
Maybe there're more better idea, let's share them together, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.