我们知道SM36是一个用来做background job的工具也很容易使用,这里介绍如何用程序实现background job


DATA: g_jobname TYPE tbtcjob-jobname VALUE 'ZTEST_JOB'.
DATA: g_jobaccount TYPE tbtcjob-jobcount.

START-OF-SELECTION.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = g_jobname
IMPORTING
jobcount = g_jobaccount.

CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = 'DDIC'
jobcount = g_jobaccount
jobname = g_jobname
report = 'ZPILLAR_TEST_JOB'.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = g_jobaccount
jobname = g_jobname
strtimmed = 'X'.