REPORT Z_APS_TOTALINTER.
SELECTION-SCREEN BEGIN OF BLOCK rad1
WITH FRAME TITLE text-001.
SELECTION-SCREEN:SKIP 1.
PARAMETERS: p_aps01 as CHECKBOX USER-COMMAND check DEFAULT 'X',
p_aps02 as CHECKBOX USER-COMMAND check DEFAULT 'X',
p_aps03 as CHECKBOX USER-COMMAND check DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK rad1.
* 默认程序执行
START-OF-SELECTION.
IF p_aps01 = 'X'.
SUBMIT Z_APS_MATNR_BOM_01 AND RETURN. " 调用程序Z_APS_MATNR_BOM_01执行
* CALL TRANSACTION 'ZAPS001'.
write:/ '执行bom接口成功'.
ENDIF.
IF p_aps02 = 'X'.
CALL TRANSACTION 'ZAPS002'. "调用事务码ZAPS002(将程序封装成事务码然后调用)
write:/ '执行计划单工单接口成功'.
ENDIF.
IF p_aps03 = 'X'. "调用事务码ZAPS003
CALL TRANSACTION 'ZAPS003'.
write:/ '执行库存接口成功'.
ENDIF.
1、SUBMIT<program> AND RETURN:中断(不终止)当前运行的程序,启动新的被调用程序<program>,当<program>运行完后,控制权又返回到被中断的调用程序,继续执行
2、CALL TRANSACTION <TCode>:可以插入一个具有事务代码的ABAP程序,中断当前运行的程序,待被调程序执行完后,再继续执行主调程序
3、SUBMIT <program>:结束当前运行的程序,启动新的被调用程序<program>
4、LEAVE TO TRANSACTION <TCode>:结束当前运行的程序,并启动由事务码<TCode>指定的ABAP程序。在程序中使用该语句的效果等同于用户直接在命令行输入“/n<TCode>”并执行的效果。