Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Submit to sap-spool

Dear All,

I am trying to call a program'B' from program 'A'.

I will displaying both spool and joblog,using submit TO SAP-SPOOL and VIA JOB job .

but import is failed .

INITIALIZATION.

EXPORT GW_SUCEED TO MEMORY ID 'RE'.

EXPORT GW_DELNUM TO MEMORY ID 'NUM'.

START-OF-SELECTION.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

JOBNAME = 'Y_TEST_01'

IMPORTING

JOBCOUNT = W_JOBCOUNT

EXCEPTIONS

CANT_CREATE_JOB = 1

INVALID_JOB_DATA = 2

JOBNAME_MISSING = 3

OTHERS = 4.

SUBMIT Y_TEST_01 AND RETURN

TO SAP-SPOOL

SPOOL PARAMETERS

WITHOUT SPOOL DYNPRO

VIA JOB 'Y_TEST_01'

NUMBER W_JOBCOUNT

WITH P_BUKRS = P_BUKRS .

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

JOBCOUNT = W_JOBCOUNT

JOBNAME = 'Y_TEST_01'

S TRTIMMED = 'X'

EXCEPTIONS

CANT_START_IMMEDIATE = 1

INVALID_STARTDATE = 2

JOBNAME_MISSING = 3

JOB_CLOSE_FAILED = 4

JOB_NOSTEPS = 5

JOB_NOTEX = 6

LOCK_FAILED = 7

INVALID_TARGET = 8

OTHERS = 9.

IMPORT GW_SUCEED FROM MEMORY ID 'SUC'.

IMPORT GW_DELNUM FROM MEMORY ID 'DEL'.

regards

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question