怎样使程序只运行一个实例
来源:互联网 发布:大数据金融有哪些风险 编辑:程序博客网 时间:2024/05/16 17:41
SAP提供了两个FM来解决程序运行时的同步锁定问题。 ENQUEUE_ES_PROG和DEQUEUE_ES_PROG。
ENQUEUE_ES_PROG
Summary
Prevents the parallel execution of a program.
Description
This function creates a lock in a program that should not be processed more than once, simultaneously.
The lock remains in place until either the DEQUEUE_ES_PROG function module
is called or the transaction is completed (with an implicit DEQUEUE_ALL call).
Parameters
EXPORTING
NAME Program name to lock
SCOPE Controls how the lock is passed to the update program:
Value Meaning
1 The lock is not passed to the update program. The lock
is removed when the transaction ends.
2 (default) The lock is passed to the update program. The update
program is responsible for removing the lock.
3 The lock is passed to the update program. The lock must
be removed in both the interactive program and in the
update program.
DEQUEUE_ES_PROG
Summary
Releases program locks.
Description
This function releases a lock in a program that has been set by ENQUEUE_ES_PROG.
Parameters
EXPORTING
NAME Program name to lock
使用时需要注意下列问题:
1 程序在锁定后,解锁的动作不是必须的,程序退出或者完成后会自动解锁。
2 程序的锁定只对前台程序有用,如果运行的是后台服务,则需要其他的解决方案。可以考虑使用如下方法:a 将AS配置为同一程序只允许同时运行一个JOB。 b 通过判断表TBTCO的JOB状态字段来解决。
3锁定的FM在不同的事件中运行效果不同,请根据具体的需求来确定该在何种事件后锁定。
- 怎样使程序只运行一个实例
- Delphi----怎样保证程序只运行一个实例
- Delphi----怎样保证程序只运行一个实例
- 如何使程序只运行一个实例
- 使Qt程序只运行一个实例
- 只运行一个程序实例
- 只运行一个实例程序
- 程序只运行一个实例
- 只运行一个程序实例
- 程序只运行一个实例
- 程序只运行一个实例
- 程序只运行一个实例
- 怎样让程序只开一个实例
- 一个程序只运行一个实例
- 程序只运行一个是实例
- C++Builder 程序只运行一个实例
- 确保程序只运行一个实例
- 只允许程序运行一个实例
- javascript入门系列演示·三种弹出对话框的用法实例 .txt
- js入门·表单详解一(修改表单属性,修改表单元素值) .txt
- VC++中进程间相互通信的多种方法
- Delphi利用数据库实现文件打包
- js入门·表单元素(select下拉列表)制作二级联动菜单和网站导航 .txt
- 怎样使程序只运行一个实例
- TDD简介
- 总觉得自已过分将时间用于细节,写的程序整体上无棱无角
- CodeProject.com上微软BizTalk平台技术文章集锦
- 收集的英语听力网站
- UNICODE编程资料(转贴)
- SAP的SYSTEM的函数列表和代码示例
- J2EE开发之Eclipse集成开发工具使用篇(摘)
- The Womain Taxi Driver In Cairo一