[BAPI]如何修改工单状态-BAPI_ALM_ORDER_MAINTAIN详解编程语言
2023-06-13 09:11:51 时间
1,BAPI简介
DO_NOT_EXEC_NOTIF_CLOSE :Do not execute and complete notifications
Note: This also automatically completes any outstanding tasks in the notifications.
DO_NOT_EXEC_NOTIF_DEALLOC :Do not execute and remove assigned notifications from order
Note: Notifications assigned to the order header are not removed, but rather automatically completed.
TECO_WITH_NOTIF :Technically complete with notifications
Note: If a reference date is transferred, the notification with the reference date is also completed. The tasks of the notification are not automatically completed.
CANCEL_TECO_WITH_NOTIF : Reset technical completion and put assigned notifications in process again
RESET_DLFL_WITH_NOTIF :Reset deletion flag and put assigned notifications in process again
CREATE, CHANGE, RELEASE, ATPCHECK, CALCUALTE, SCHEDULE, CREATETONOTIF, DO_NOT_EXECUTE, LOCK, UNLOCK, TECHNICALCOMPLETE, CANCEL_TECHNICAL_COMPLETION, COMPLETE_BUSINESS, CANCEL_BUSINESS_COMPLETION, SET_DEL_FLAG, RESET_DEL_FLAG
lt_methods TYPE TABLE OF bapi_alm_order_method, ls_methods TYPE bapi_alm_order_method, lt_return TYPE bapiret2_t, ls_return TYPE bapiret2. lv_aufnr = 200000000123.
CALL FUNCTION BAPI_TRANSACTION_ROLLBACK. MESSAGE ls_return-message TYPE S DISPLAY LIKE E. ELSE. CALL FUNCTION BAPI_TRANSACTION_COMMIT EXPORTING wait = X. MESSAGE 工单状态更新成功 TYPE S. ENDIF. ENDIF.
可以通过调用BAPI BAPI_ALM_ORDER_MAINTAI来更改工单的状态,具体使用到的参数是IT_METHODS。
img >
IT_METHODS的定义如下:
img >
各个字段含义如下:
REFNUMBER:是objecttype参数中填入的相关对象对应的内表行数,
OBJECTTYPE:对象类型,类型如下:
METHOD:方法,可以实现创建、修改、删除、保存等功能以及工单的状态-lock、unlock、TECHNICALCOMPLETE等,具体代码如下:
CREATE :Create objectsDO_NOT_EXEC_NOTIF_CLOSE :Do not execute and complete notifications
Note: This also automatically completes any outstanding tasks in the notifications.
DO_NOT_EXEC_NOTIF_DEALLOC :Do not execute and remove assigned notifications from order
Note: Notifications assigned to the order header are not removed, but rather automatically completed.
TECO_WITH_NOTIF :Technically complete with notifications
Note: If a reference date is transferred, the notification with the reference date is also completed. The tasks of the notification are not automatically completed.
CANCEL_TECO_WITH_NOTIF : Reset technical completion and put assigned notifications in process again
RESET_DLFL_WITH_NOTIF :Reset deletion flag and put assigned notifications in process again
OBJECTKEY: 外部对象码,详细如下:
0-12 Order number 工单号CREATE, CHANGE, RELEASE, ATPCHECK, CALCUALTE, SCHEDULE, CREATETONOTIF, DO_NOT_EXECUTE, LOCK, UNLOCK, TECHNICALCOMPLETE, CANCEL_TECHNICAL_COMPLETION, COMPLETE_BUSINESS, CANCEL_BUSINESS_COMPLETION, SET_DEL_FLAG, RESET_DEL_FLAG
lt_methods TYPE TABLE OF bapi_alm_order_method, ls_methods TYPE bapi_alm_order_method, lt_return TYPE bapiret2_t, ls_return TYPE bapiret2. lv_aufnr = 200000000123.
CALL FUNCTION BAPI_TRANSACTION_ROLLBACK. MESSAGE ls_return-message TYPE S DISPLAY LIKE E. ELSE. CALL FUNCTION BAPI_TRANSACTION_COMMIT EXPORTING wait = X. MESSAGE 工单状态更新成功 TYPE S. ENDIF. ENDIF.
程序运行前,tcode IW33查看工单状态为释放REL
img >
程序运行后,工单状态为技术完成TECO
img >
其他,工单的技术完成状态可以通过IW32撤销,
img >
以上。
19314.html
cgojava相关文章
- 关于加载状态的思考和尝试
- 新增桥接连接状态监控、重构日志系统
- Android下获取SD卡的状态并写入文件到SD卡详解编程语言
- android判断服务是否是运行状态详解编程语言
- 泛函编程(34)-泛函变量:处理状态转变-ST Monad详解编程语言
- 使用 jquery 获取一组或者单个 checkbox 的选中状态的值详解编程语言
- Hibernate之对象三种状态详解编程语言
- hibernate 三种状态的转换详解编程语言
- HTTP协议简介详解 HTTP协议发展 原理 请求方法 响应状态码 请求头 请求首部 java模拟浏览器客户端服务端编程语言
- MySQL Status Mysqlx_ssl_accept_renegotiates 数据库状态作用意思及如何正确
- MySQL Status Table_open_cache_overflows 数据库状态作用意思及如何正确
- MySQL: 获取新的可能性(mysql当前状态)
- 多线程状态及线程池管理详解编程语言
- 修改包装单元(handling unit)用户状态[HU_STATUS_UPDATE]详解编程语言
- vue 保持组件状态防止重新渲染 缓存组件失效详解编程语言
- Win10 21H1状态页更新:正扩大自动升级的PC规模
- 探索MySQL服务器状态信息(查看mysql状态)
- Linux查看网口状态:一步搞定(linux查看网口状态)
- 维护MySQL数据库状态维护:优化稳定运行(mysql 数据库状态)
- MySQL服务器运行状态检测 mysqlping(c mysql_ping)
- 基于Redis集群的状态实时上报功能(redis集群状态上报)
- Linux中使用mysqladminextended-status配合Linux命令查看MySQL运行状态