Process chain - schedule for certain days
Hello all,
How can I schedule a process chain that :
-should run 3 times per day
-between the 8th and the 12 workingday of a month
Any sugesstions?
Thank you.
Maybe I cna help others with my solution.
So...
I made the chain to run 3 times per day as Debjani advidced me in this thread.
I put 3 jobs, at the hours I wanted, the period daily, without weekends and holidays.
I made a reports that tests the 18-th working day (for example) and some others:
REPORT Z_DAYS.
TABLES : TFACS.
DATA: GI_CURSOR TYPE CURSOR,
GI_TABIX TYPE SY-TABIX,
GT_TFACS TYPE TABLE OF TFACS.
DATA: TEXT(50) TYPE C,
LEN TYPE I,
IND TYPE I,
POS TYPE I,
CNT_ONE TYPE I,
CNT_ZERO TYPE I,
DAY_VAR TYPE I,
IND_VAR(3) TYPE C.
DATA: EVENTID LIKE TBTCJOB-EVENTID.
DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM.
FIELD-SYMBOLS: <GT_TFACS> TYPE TFACS.
DAY_VAR = SY-DATUM+6(2).
OPEN CURSOR GI_CURSOR FOR
*select data for factory calender Germany (01) and year 2009
SELECT * FROM TFACS
WHERE IDENT EQ '01' AND JAHR EQ SY-DATUM+0(4).
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
MOVE 100 TO GI_TABIX.
DO.
FETCH NEXT CURSOR GI_CURSOR
INTO TABLE GT_TFACS
PACKAGE SIZE GI_TABIX.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
*loop on internal table
LOOP AT GT_TFACS ASSIGNING <GT_TFACS>.
TEXT = <GT_TFACS>-MON01.
LEN = STRLEN( TEXT ).
WRITE : 'len' , LEN.
DO LEN TIMES.
IND = SY-INDEX.
POS = SY-TABIX.
IND = IND - 1.
IND_VAR = IND + 1.
WRITE: / 'ind', IND_VAR.
WRITE : 'pos'.
WRITE POS.
IF TEXT+IND(POS) = '1'.
*number of working days increases with 1
CNT_ONE = CNT_ONE + 1.
IF CNT_ONE EQ 8 AND ( DAY_VAR = IND_VAR ).
WRITE : / '8th working day'.
EXIT.
ELSEIF CNT_ONE EQ 9 AND ( DAY_VAR = IND_VAR ).
WRITE : / '9th working day'.
EXIT.
ELSEIF CNT_ONE EQ 10 AND ( DAY_VAR = IND_VAR ).
WRITE : / '10th working day'.
EXIT.
ELSEIF CNT_ONE EQ 11 AND ( DAY_VAR = IND_VAR ).
WRITE : / '11th working day'.
EXIT.
ELSEIF CNT_ONE EQ 17 AND ( DAY_VAR = IND_VAR ).
WRITE : / '17th working day' COLOR 5.
EVENTID = 'ZE_PROD'.
EVENTPARM = 'ZEP_PROD'.
CALL FUNCTION 'RSSM_EVENT_RAISE'
EXPORTING
I_EVENTID = EVENTID
I_EVENTPARM = EVENTPARM
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 5.
IF NOT SY-SUBRC IS INITIAL.
WRITE:/ 'EVENT DID NOT START'.
ENDIF.
EXIT.
ELSEIF CNT_ONE EQ 18 AND ( DAY_VAR = IND_VAR ).
WRITE : / '18th working day' COLOR 5.
EVENTID = 'ZE_PROD'.
EVENTPARM = 'ZEP_PROD'.
CALL FUNCTION 'RSSM_EVENT_RAISE'
EXPORTING
I_EVENTID = EVENTID
I_EVENTPARM = EVENTPARM
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 5.
IF NOT SY-SUBRC IS INITIAL.
WRITE:/ 'EVENT DID NOT START'.
ENDIF.
EXIT.
ENDIF.
ELSEIF TEXT+IND(POS) = '0'.
*number of holidays days increases with 1
CNT_ZERO = CNT_ZERO + 1.
ENDIF.
ENDDO.
WRITE : /.
WRITE: 'January :' COLOR 1, <GT_TFACS>-MON01.
ENDLOOP.
REFRESH GT_TFACS.
ENDDO.
WRITE / .
WRITE ' The number of working days is :'.
WRITE CNT_ONE COLOR 5.
WRITE / .
WRITE ' The number of holiday days is :'.
WRITE CNT_ZERO COLOR 7.
WRITE : / DAY_VAR.
CLOSE CURSOR GI_CURSOR.
When I am in the 18-th day, I raise an event. I test the year,the calender of the system and the month (January).
This report is called in the chain, as ABAP process.
Then, in my chain , I put a local chain , that starts after it receives the event 'ZE_PROD' and the parameter for it 'ZE_PROD'.
This event with parameter has to be created in SM62.
I hope this helps and thank you all for the advices.
PS: - the factory calender method seems not to be to good, because need special rights to create it and I don' t think it's possible to customize it (because the holiday calender has to be changed and I did not see how).
Edited by: EMI on Jan 27, 2009 4:21 PM
Similar Messages
-
Stopping Process Chain schedule for just one day...
Hi,
Our source systems and BI are getting a patch upgrade during this weekend and I need to stop all the Process Chains schedule for Friday night/ Saturday morning. Is there a simple way I can stop all the Process Chains from executing just for tomorrow instead of manually removing each PC from schedule and again putting them back on schedule on Saturday?
Thanks,
Sri.Hi
You can reschedule them instead of de-schedule and schedule back.
1)open your process chain in rspc1
2) goto planning mode
3) right click on start --> display schedule job
4) select the job --> in menu bar --> click on first one from left --> change
here change the dates as per your requirement and save the job.
If you have any event based chains which are going to start after time based chains gets complete, no need to de-schedule as we are not going get trigger from time based chains.
I don't think so we have any program to de-schedule all the chains at a time.
Regards,
Venkatesh -
Problem in process chain running for 3 days
Hi Experts,
Please help me
We have process chain like below
1. delete index
2. full loads going 3 cubes (16 infopacs)
3. loading to ods and then update to cube
4. delete overlapping requests (16 infopac)
5. create index
6. aggregate filling
7. delete PSA
Now the issue is, from last Saturday onwards
Process chains was still in Yellow status till date, so now, 1,2,3,4, are still running
In process chains, out if 16 infopacs, 12 are green, remaining 4 are stopped
And in ODS activation of ods data variant shows yellow, but when checked the data is activated, but not pushed to cube. When checked log it show u201Csystem exception error_messageu201D, so process terminated.
When we checked for shortdump,
It says u201Clocal time on the application server is incorrectu201D
Experts please let me know how to solve this and correct the load.Hi Experts,
Thank u for your help,
I have done the steps manually yestarday, checked todays, still it is in yellow status.
let me explain the scenario,
The data is going to 3 cubes,
the process chain is designed like this,
1. initially delete index
2. full load to cube using 16 infopac and loading from (2)ODS to cube.
3. delete overlapping requests
4. create index (3 cubes)
5. fill aggregates (only one cube)
6. Delete PSA request
so now , chain is having problem at
1. data is loaded to ods
2. data activation (showing yellow, but when checked data is activated)
3. further update to cube (2 cubes) in process chain this is not started atall ( so y'day I've done manually)
4. out 16 infocpack, only 12 infopacs are green and remaining 4 are not started.
so yestarday I've manually schedule remaining 4 infopacs.
and deleted previour requests in infocube as they are full load, but I did'nt done create index and fill aggregate steps.
now the problem is , out of 3 cube report available request is present for 2 cubes, but for 3 cube this report request is not available, but QM status is green
please let me know how to proceed.
one small silly question, do i need to fill aggregate step to get this report available request.....please suggest.
Thanks & Regards,
Raghu -
Process Chain Failed for Perticular day, want to take load from R/3 for day
Hi Experts,
While monitoring the process chain i found that on 16 Nov2010 the schedule got failed then i checked but that was due to rfc connection to R/3 failed then again i repeated the process in RSPCM. But toady in the morning when i was checking i found that for 17 nov scheduled got run successful but when i drilled down on date for 16th data but it was failed for 16. Now please guid me how to bring the data for 16nov from R/3. My process chain contains both Master Data/ Transaction Data and Deltas / Full loads ???Hi,
As you have mentioned in your post, the process chain for 17th has finished successfully, can you confirm if all the dataload also finished successfully?
If the dataload also has finished successfully, then ther is not much to be done from your side. Pplease note below points
1. For Delta Loads- No need to worry about them. For standard datasources, the system would have automatically fetched all the deltas since your last successful delta load. For generic datasources as well, based on previous delta pointer in RSA7, all the delta records would have got fetched.
2. For full dataloads- Check the selection criteria in your infopackages. If its based on date, then you would have to do dataload again.
The selection criteria for this dataloads should include the dates for 16th & 17th dataload. Everything else should be fine.
Else, if your dataload did not finish succesfully on17th, though the process chain has finished. You need to do below
1. For all the delta loads- Carry out Repeat Delta loads. This would fetch all the deltas missed. After this load, all the deltas would continue to come normally.
2. For full loads, perform same as mentioned in point 2 above. -
Hi
I have created a process chain and i have set it to run every day night.
The selection in the infopackage must be the present date like today 2007.09.16 and tomorrow it should be 2007.09.17.
Is there any way where it can change the date automatically instead of me changing the date in info package daily and activating the process chain daily.
Thanks
sandeepHi
check these links...might be helpful for you.
Re: scheduling process chain 3 specific times a day
Re: How to schedule process chain to run only during specific time.
Process chain schedule daily twice
regards
biplab
<i>***Reward with points if it helps u!!</i> -
Hi All,
We have a requirement where we want to have data load on the last day of the month for each month.
Can anyone please explain how to accomplish this step by step through process chains scheduling??
Thanks in advance.
Points will be rewarded generously.Hi Jayesh,
Here are the steps you can use.
1. Create an event in your BW system (SM62).
2. In your R/3 system, write a RFC enabled FM. Inside this FM, call 'BP_EVENT_RAISE'.
3. Create a program in SE38 and call the RFC FM using the destination as your BW system. In this program, you can use 'LAST_DAY_OF_MONTHS' FM to get the last day of month by passing SY-DATUM. I am writing some pseud code for you here.
RFC FM:
Import Parameters: EVENTID like TBTCO-EVENTID (check 'Pass Value').
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
eventid = EVENTID.
SE38 Program:
data: date type dats.
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
day_in = sy-datum
IMPORTING
LAST_DAY_OF_MONTH = date.
If sy-datum = date.
CALL FUNCTION 'ZBP_EVENT_RAISE'
DESTINATION '<your BW system>'
EXPORTING
eventid = EVENTID .
This should do the needful.
Hope this helps.
Thanks and Regards
Subray Hegde -
Run process chain on last three days of the month
Hello
I need to run process chain on last three days of the month. For example , It should run on 28, 29 and 30th dates of June.
There is no option to put a code in the start process of the process chain.
I can run it every day and put a code in the infopackage/DTP so that empty load (0 records) will be done on other days.
This doesnt sound as a good option.
Do u know any other options?Hi
See the code and details how to do it, and change the code as per your requirement.
http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
Triggering the Process Chains at Particular Date using Events
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/triggering%20%20the%20process%20chains%20at%20particular%20date%20using%20events.pdf
BI-ABAP (Trigger Process Chains on evry month 3rd and 4th day).
https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=81428842
Thanks
Reddy -
Reg : To view process chain flow for a cube
HI Experts,
I need to view process chain flow for a particular cube of sales distribution.Can you please tell me stps to perform .Hi,
If the cube is already loaded then you can just to the infopackages which are loading it and in the infopackages you have option in the "schedule" tab to see which process chain it is loading.
if not then you will have to identify which data source is loading to the cube and check for the infopackge.
and I think the DTP will be in the same chain as well.
For DTP it is alreday mentioned by the others.
Thanks
Ajeet -
Mostly tables in process or scheduled for a longer period of time
Hi Folks,
I am a newbie to SLT. Sorry if I ask some basic stuff.
I am using HANA and SLT and can see below list of tables are in state or 'In Process' or 'Scheduled' for couple of days.
For one of my Ztable its says 'scheduled' in HANA and trigger state is DEACTIVATED in SLT.
Now what I want to do is delete the same from HANA and replicate it again but I am not able to do.
Below are the list of the tables which are creating issues,
I am attaching both HANA as well as SLT screenshots.
Kindly let me know the approach needs to be followed to solve the issues.
I have one more query , I am trying this on my home HANA system but in projects
will loading of data or migrating of tables from ECC to HANA will be done by BASIS guys or by HANA developer?
By profession I am ABAP as well as HANA developer.
BR
SumeetHello sumeet durgia
Now what I want to do is delete the same from HANA and replicate it again but I am not able to do.
Remarks:
Sometimes, the UI side does n't seems to be working as expected in the Hana studio side.
Did you try this:
SLT System --> LTRC -->
Stop and restart again.
BR
Prabhith -
Need FM or Tables to see Process Chain scheduled(future) date and time
Hello Gurus!
Can anybody tell me where/How i can get the Process Chain scheduled(future) date and time..?
I mean, I want to see at what date and time is the PC scheduled for tomarrow/next month etc... Like TBTCO-SDLSTRTDT / TBTCO-SDLSTRTTM along with its Process chain name or PC's Start varient?
I will give the points for all the answers
Bye.. Happy New YearHi Anil,
You can check in SM37 by giving the job name.then you can see when that particular chain is scheduled.
Goto SM37,
Give Job name = *
User name = *
and select job status - ready,scheduled. then F8 (Execute).
Then you can see which job is schduled at what time and date.
Regards,
Lakshman.G -
Is it possible to run process chain from the certain process/point?
Hello
Is it possible to run process chain from the certain process?
How?
ThanksHello,
yes it possible! use the following steps.
1. Goto the process which you want the chain to start from.Goto display messages>> Chain tab. In the generated instance note the variant and instance.
2. Goto table RSPROCESSLOG and give variant and instance and get logid details.
3. t codese37>> run FM RSPROCESSFINISH.
4. give the deatils u have got in RSPROCESSLOG table here and say execute.
This will solve ur problem.
Hope this helps!
Reg
Deepmala -
Process Chain Assining for another source sytem
Hi Experts,
I have a quick question on process chain assining for another source sytem.
For Example. I have a Process chain with 10 Infiopackages. Letz say that Infopackage was assinged to one source system.
Now I wanna a create a new process chain which shoud be the replica of the existing process chain. I wanna to load the data for the same info packages thru another sources system. Can we do this or else we have to reassign the data source for new source system for every infosources.. Is this Possible.
Kindly guide me if there is any nother solution for this.
Warm Regards,
AluriHi..
ABAP routines are in place at infopack level or at the Transformation level?
If its there at the Transformation level then there wont be any issues for ur redesigning..
if its there at the IP level then u need to copy those things in ur new IP as per the requirement and change the things accordingly..
and then design the process chain..
Assign points if this helps..
Thanks -
Process Chain Server for Scheduling
Hello,
I would like to schedule my process chains such that I avoid any deadlocks from not enough background processes being available and other kinds of resource failures. I have been trying to schedule certain chains on different servers logically, but if an app server changes unexpectedly then the loads fail. It seems that hard coding chains to servers is not an ideal solution. What is the best option for server scheduling when you schedule a process chain? Is there an option that gives some sort of load balancing? Should you just leave the server field blank? What about the server group option?
Thanks,
TMSleave the server field blank.
the load balancing feature will take care of distribution of jobs automatically -
ABAP process job ( BI_PROCESS_ABAP ) in process chain running for long time
Dear Experts,
We have an ABAP process job BI_PROCESS_ABAP in a process chain. This job is running for a very long time than previous run time.
Recently we had an ORACLE database upgrade from 9.2 to 10g.
From the very next day , we are having this problem.
And also previously this process-chain was under control of BASIS guys . they were using a tool called CRONACLE to schedule it. At the time of upgrade this tool was crashed and they asked us to schedule it in BW system instead.
Underlying program is using two custom tables.
one is having both primary & secondary indexes but the other table is having only primary index.
I am not sure whether we have secondary indexes on other table prior to upgrade or not.
Where must be the problem?...
At the time of upgrade BASIS has re-organized the table space along with database upgrade.
please help me...
Regards,
SRIKANTHPlease ask yr basis consultant to check the system parms.
Below i have listed down SAP recommneded system parms .
abap/heap_area_total 4000000000
abap/heap_area_dia 2000000000
abap/heap_area_nondia 2000000000
Also check in SM37 if any other jobs are running for long time, peventing the your job running.
Check the SM12 for locks or SM58 -
Process chain failing past 3 days
Hi,
Process chain is failing since 3 days which suppose run 6 PM everyday, If i run manually it is working fine, again it is failing at schedule time 6 PM.
In Canceled job log giving the following information. NO_MORE_SPACE: can not crate MTE: No more space: no more MESSAGE_CONTAINER slots available.Process chain variant XXXX not having scheduled variant for the event RSPROCSS.
Please advice me to over come this issue.
Regards,
B JHI JB,
Check in DB02 is there enough space available or not?
Contact your basis people if space related issue means.
NOTE: Assign points if it helps
Regards,
Arun.M.D
Maybe you are looking for
-
Apple loops again... again
I installed the new Garageband, but decided to work in Garageband ´11 (5) instead. Fine. But something happened with my apple loops. I have no flutes anymore, occationally i found one that the system didn't recognize, a mideveal flute. I bought the f
-
Switching from Flash to Flash Catalyst/Flex
For the last few years I have been developing applications for project reporting. To explain this in simplest terms, my clients give me hundreds of reports and supporting documents, graphics, videos, etc. which I then condense and reorganize into a p
-
Modification of header in an exit.
N-tracker will have to be able to handle changes in the serial number assignment to a delivery line item. N-tracker will have to mark the necessary serial numbers as shipped and unshipped. If a change is made to the serial number dialog for a delive
-
Hi, I am trying to write a package but occurs Errors. Anyone Can Help me? Tanks, Luis Paulo Create Package body test as procedure strReturn(input in varchar2,output out varchar2) as begin output := input; end; end; LINE/COL ERROR 0/0 PL/SQL: Compilat
-
Is it possible to make a shared folder between profiles?
Hi, My e-mail is a mess with personal and work e-mail and urgent and unimportant email mixed and I am losing a lot of productivity trying to manage the onslaught. I would like to be able to create a new profile for only important work e-mail. I'm won