‎2006 Sep 22 11:02 AM
Hi All,
Could any one please tel me ....In scripts when the spool no. is generated that while processing the driver program OR after the print log processing?
and also provide me the table and fields that contain the spool no.
Regards
Vishnu
‎2006 Sep 22 11:04 AM
Table <b>TSP01</b> has all the spool numbers.
regards
Vivek
Please reward points for all the useful answers
‎2006 Sep 22 11:10 AM
Check the below code for getting the data in the SPOOL request. Spool requets will be stored in the table <b>TSP01</b>.
&----
*& Report YPRA_SAMPLE38 *
*& *
&----
*& *
*& *
&----
REPORT ypra_sample38.
*Type Declarations
TYPES: BEGIN OF ty_rdidata,
line(1000) TYPE c,
END OF ty_rdidata.
DATA: ws_spool LIKE tsp01-rqident,
i_rdidata TYPE STANDARD TABLE OF ty_rdidata,
wa_rdidata TYPE ty_rdidata.
ws_spool = '0000019125'.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB_RAW'
EXPORTING
rqident = ws_spool
FIRST_LINE = 1
LAST_LINE =
TABLES
buffer = i_rdidata
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.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename =
'C:\Documents and Settings\P.Ramu\Desktop\RDI1.xls'
TABLES
data_tab = i_rdidata
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.