Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

spool number

Former Member
0 Kudos

Hi experts,

I have a requirement where in i am scheduling back ground jobs to generate spools. How to get this spool number against each job.

Thanks&Regards.

Bharath

6 REPLIES 6

Adi_Bathineni
Participant
0 Kudos

HI Bharat,

You can watch the spool numbers fro SP01 or SP02.

There you can find the Spool numbers for each job you are running.

Correct me if i'm wrong.

Thanks,

Adi.

Former Member
0 Kudos

Hi Bharath,

Goto SP01, from there select the Created by, & date reange in which you can see the all spool No's which in that range..

Generally Spool No's are stored in TSP01-RQIDENT.

Thanks & regards,

Dileep .C

Former Member
0 Kudos

Hi,

You can get the spool number against each job from the table TBTCP. The field LISTIDENT gives the spool number.

Hope it helps

GauthamV
Active Contributor
0 Kudos

You can get Spool number related to job from TBTCP table.

jj
Active Contributor
0 Kudos

call function 'GET_PRINT_PARAMETERS'

exporting

destination = 'LP01'

list_name = 'REPORT'

list_text = 'ZTEST'

immediately = ' '

line_size = '1023'

no_dialog = 'X'

importing

out_parameters = print_parameters

valid = valid_flag.

if valid_flag eq 'X'.

concatenate 'PR'

sy-datum+4(4)

sy-uzeit into

print_parameters-plist.

endif.

In this way you can pass your own defined value as Plist name.

Then you can

SELECT single rqident FROM tsp01

INTO gd_spool_nr WHERE rq2name = print_parameters-plist.

Former Member
0 Kudos

Hi Bharath,

you can try 3 ways :

1) go to transaction SP01 and just execute.

u'll see all the spool numbers that have been generated...also u wud see username from which it has been generated, so that wud be easy for u to identify, which is the spool number for ur job.

2) go to SE11 and put table name TSP01 and simply execute it.

u'll see all the spool numbers generated with their other attributes.

3) you can a piece of code in ur program to fetch the spool number.

The code is as follows :

To Setup The Print Parameters

DATA: V_PRINT_PARMS LIKE PRI_PARAMS.

DATA: V_PDFSPOOLID TYPE TSP01-RQIDENT.

DATA: V_RQIDENT TYPE TSP01-RQIDENT.

DATA: V_RQ2NAME TYPE STRING.

to get print parameters

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

AUTHORITY = SPACE

COPIES = '1'

COVER_PAGE = SPACE

DATA_SET = SPACE

DEPARTMENT = SPACE

DESTINATION = SPACE

EXPIRATION = '1'

IMMEDIATELY = SPACE

LAYOUT = SPACE

MODE = SPACE

NEW_LIST_ID = 'X'

NO_DIALOG = 'X'

USER = SY-UNAME

IMPORTING

OUT_PARAMETERS = V_PRINT_PARMS

EXCEPTIONS

ARCHIVE_INFO_NOT_FOUND = 1

INVALID_PRINT_PARAMS = 2

INVALID_ARCHIVE_PARAMS = 3

OTHERS = 4.

Retrieving Spool ID From TSP01 Table

CONCATENATE V_RQ2NAME SY-UNAME INTO V_RQ2NAME.

SELECT * FROM TSP01

WHERE RQ2NAME EQ V_RQ2NAME ORDER BY RQCRETIME DESCENDING.

V_RQIDENT = TSP01-RQIDENT.

EXIT.

ENDSELECT.

I hope any of these 3 ways would surely give u the spool number.

All The Best

Regards,

Radhika