2009 Jun 04 6:13 AM
Hi All,
I am using the following Submit statement in my Z program.
SUBMIT RKO7KO8G USING SELECTION-SET VARIANT
TO SAP-SPOOL SPOOL PARAMETERS v_print_param
ARCHIVE PARAMETERS archi_parameters
WITHOUT SPOOL DYNPRO
AND RETURN.
I am taking the spool number into a variable
DATA: v_spool TYPE tsp01-rqident.
v_spool = sy-spono.
Using the Spool request, I am calling,
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
rqident = v_spool
first_line = 22
last_line = 35
TABLES
buffer = i_buffer
EXCEPTIONS
no_such_job = 1
not_abap_list = 2
job_contains_no_data = 3
selection_empty = 4
no_permission = 5
can_not_access = 6
read_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
perform send_mail
endif.
I am executing my Z program in background. But the job is getting cancelled and in the job log the following message is coming:
Spool request (number 0000052462) created without immediate output
Spool request 0 no longer exists
Please tell me how to correct this. I need to read the spool using the spool number.
Thanks,
Neethu.
2009 Jun 16 6:07 AM
Hi,
in debugging did you check the value for v_spool.
i think it will be zero, because you have to collect the sy-spono in the program
your submitting .
try this.
DATA: NUMBER TYPE TBTCJOB-JOBCOUNT,
NAME TYPE TBTCJOB-JOBNAME VALUE 'TEST_SPOOL',
PRINPAR TYPE PRI_PARAMS,
ARCPAR LIKE ARC_PARAMS,
WA_TBTCP TYPE TBTCP,
RQIDENT TYPE TSP01-RQIDENT,
VAL.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
LAYOUT = 'X_65_132'
LINE_COUNT = 65
LINE_SIZE = 132
IMPORTING
OUT_PARAMETERS = PRINPAR
OUT_ARCHIVE_PARAMETERS = ARCPAR
VALID = VAL
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = NAME
IMPORTING
JOBCOUNT = NUMBER
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SY-SUBRC = 0.
SUBMIT ZPRK_ALVLVC TO SAP-SPOOL
SPOOL PARAMETERS PRINPAR
WITHOUT SPOOL DYNPRO
VIA JOB NAME NUMBER NUMBER
AND RETURN.
IF SY-SUBRC = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = NUMBER
JOBNAME = NAME
STRTIMMED = '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
OTHERS = 8.
IF SY-SUBRC = 0.
WAIT UP TO 5 SECONDS.
CLEAR WA_TBTCP.
SELECT SINGLE *
FROM TBTCP
INTO WA_TBTCP
WHERE JOBCOUNT = NUMBER.
WRITE 50 'spool-number.' COLOR 5.
WRITE:/ WA_TBTCP-LISTIDENT HOTSPOT.
ENDIF.
ENDIF.
ENDIF.
.
Regards,
R K.
Hi All,
I am using the following Submit statement in my Z program.
SUBMIT RKO7KO8G USING SELECTION-SET VARIANT
TO SAP-SPOOL SPOOL PARAMETERS v_print_param
ARCHIVE PARAMETERS archi_parameters
WITHOUT SPOOL DYNPRO
AND RETURN.
I am taking the spool number into a variable
DATA: v_spool TYPE tsp01-rqident.
v_spool = sy-spono.
Using the Spool request, I am calling,
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
rqident = v_spool
first_line = 22
last_line = 35
TABLES
buffer = i_buffer
EXCEPTIONS
no_such_job = 1
not_abap_list = 2
job_contains_no_data = 3
selection_empty = 4
no_permission = 5
can_not_access = 6
read_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
perform send_mail
endif.
I am executing my Z program in background. But the job is getting cancelled and in the job log the following message is coming:
Spool request (number 0000052462) created without immediate output
Spool request 0 no longer exists
Please tell me how to correct this. I need to read the spool using the spool number.
Thanks,
Neethu.
2009 Jun 04 6:20 AM
Hi,
In the transaction SU01 in the defualts tab, , check whether the checkbox for Delete after output is unchecked. May be because of this even if the spool is created, it gets deleted immediately.
Hope this helps.
Regards,
Mansi.
2009 Jun 04 6:31 AM
Hi,
I am not having access to SU01. Is there any other option ?
Thanks,
Neethu.
2009 Jun 16 5:49 AM
In SU01 default tab , if delete after ouput is X also no use. I am also having same problem,Please
let me know whether u got the solution.
Regards,
Harsha
2009 Jun 16 6:07 AM
Hi,
in debugging did you check the value for v_spool.
i think it will be zero, because you have to collect the sy-spono in the program
your submitting .
try this.
DATA: NUMBER TYPE TBTCJOB-JOBCOUNT,
NAME TYPE TBTCJOB-JOBNAME VALUE 'TEST_SPOOL',
PRINPAR TYPE PRI_PARAMS,
ARCPAR LIKE ARC_PARAMS,
WA_TBTCP TYPE TBTCP,
RQIDENT TYPE TSP01-RQIDENT,
VAL.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
LAYOUT = 'X_65_132'
LINE_COUNT = 65
LINE_SIZE = 132
IMPORTING
OUT_PARAMETERS = PRINPAR
OUT_ARCHIVE_PARAMETERS = ARCPAR
VALID = VAL
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = NAME
IMPORTING
JOBCOUNT = NUMBER
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SY-SUBRC = 0.
SUBMIT ZPRK_ALVLVC TO SAP-SPOOL
SPOOL PARAMETERS PRINPAR
WITHOUT SPOOL DYNPRO
VIA JOB NAME NUMBER NUMBER
AND RETURN.
IF SY-SUBRC = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = NUMBER
JOBNAME = NAME
STRTIMMED = '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
OTHERS = 8.
IF SY-SUBRC = 0.
WAIT UP TO 5 SECONDS.
CLEAR WA_TBTCP.
SELECT SINGLE *
FROM TBTCP
INTO WA_TBTCP
WHERE JOBCOUNT = NUMBER.
WRITE 50 'spool-number.' COLOR 5.
WRITE:/ WA_TBTCP-LISTIDENT HOTSPOT.
ENDIF.
ENDIF.
ENDIF.
.
Regards,
R K.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |