在特定周几跑或者不跑处理链

来源:互联网 发布:食品制造业数据 编辑:程序博客网 时间:2024/06/16 14:23

Schedule  a Process chain on specific weekdays

Requirement:


In a week, process chain should load the records only on specific weekdays ? How to schedule it?

Here in this example, the chain should run only on wednesday  and thursday of a week?


Solution :


Here there is no need of creating an ABAP program or a factory calender. A simple formula in the Process chain will suffice the above requirement.


By this we can minimize the dependency of ABAP. Also we are not going to create a factory calender which is specifically to this particular process chain.


If there is any other chain which needs to be schedule only on Friday and Saturday, again we need to go for creating a factory calender. So instead a simple formula and theDecision Process type will solve this type requirement.


前面巴拉巴拉都是废话。


Step by step Navigation:


1. Go to RSPC, click on Create. Give the technical name & Description of the process chain  and click on Continue as highlighted below.

2014-01-17 11_13_16-Process Chain Maintenance Planning View.png

1. 到RSPC创建一个PC


2 . Create a start variant for the process chain. Click on Create. Give the technical name & Description of the Start Variant and click on Continue.

2014-01-17 11_14_17-Process Chain Maintenance Planning View.png


2. 创建一个START


3. Schedule the process chain for daily execution as shown below. Save the variant

2014-01-17 11_16_25-Start Time.png


3. 设置成每日运行。


4. Now the start variant is created. Click on Continue.2014-01-17 11_18_04-Process Chain Maintenance Planning View.png

4. 继续


5. Now drag & drop the Decision process type which is under General services as highlighted below. 

2014-01-17 11_18_29-Process Chain Maintenance Modified Version_ PC for Wed & Thur.png

5.  在多个备选间的决定。


6. After that click on Create

2014-01-17 11_19_07-Process Chain Maintenance Modified Version_ PC for Wed & Thur.png

6. 创建


7. Give the technical name & description for the Decision Process type and Click on Continue.

2014-01-16 11_48_55-Process Chain Maintenance Modified Version_ PC chain test.png


7. 写出技术名和长描述



8. The following Screen will appear. Click on Create under Formula column.

2014-01-16 11_53_20-Process Maintenance_ Decision Between Multiple Alternatives.png

8. 在跳出的屏幕中选公式



9. Here  in this example the chain has to run on every Wednesday and Thursday of a week.

For this purpose, use the system variable " SYST-FDAYW "

 

The formula should look as below:
2014-01-16 11_55_33-Form.png

To schedule for any weekday, you can refer :


 

SYST-FDAYW0周日SYST-FDAYW1周一SYST-FDAYW2周二SYST-FDAYW3周三SYST-FDAYW4周四SYST-FDAYW5周五SYST-FDAYW6周六


Then Check the formula and click on Back button (F3).

9. 写公司,点返回


10.  Following screen will appear. Here we have to specify the event. Click on the search button under the Event column as shown below.

2014-01-16 11_57_44-Process Maintenance_ Decision Between Multiple Alternatives.png


10. 重新选择EVENT

11.  Select the OPTION 02. This will make the chain to execute successfully only on WED and THUR based on the defined formula and click on check and save.
2014-01-16 12_00_28-Event Selection.png

11. 选OPTION 2 

12.  Finally the formula should look as below.

2014-01-16 12_01_01-Process Maintenance_ Decision Between Multiple Alternatives.png

12. 公式最终如图


13.  The Process chain is created. You can build the remaining as per your data flow.

2014-01-17 12_27_48-Process Chain Display Active Version_ PC chain test.png

 

This chain is a daily schedule. But it will run only on Wednesday and Thursday. Remaining days the chain will fail at the Decision Process type. It wont cause any issues.


** Feedback & Suggestions are welcome. Thanks.


-- KRPK

0 0
原创粉丝点击