Application Development and Automation 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: 
Read only

spool request no.

madan_ullasa
Contributor
0 Likes
543

Hi frnds,

Can i anyway get the spool request no. within the print program dynamically once the form is output.

points assured to all replies.

Regards,

Madan..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
503

Hi ,

Can use the following code :-

----


  • FORM get_spool_number *

----


  • Get the most recent spool created . *

----


  • --> F_REPID (prog. name) *

  • --> F_UNAME (user name ) *

  • --> F_RQIDENT *

----


form get_spool_number using f_repid

f_uname

changing f_rqident.

*-- Declaring local variables.

data:

lc_rq2name like tsp01-rq2name,

lc_rqident like tsp01-rqident.

*-- In TSP01 table, the 'RQ2NAME' field holds the combined

*-- ( first nine characters of the program name followed *-- by first three characters of the user name)value of

*-- the corresponding program and username.

concatenate f_repid+0(9)

f_uname+0(3)

into lc_rq2name .

select * from tsp01 where rq2name = lc_rq2name

order by rqcretime descending.

f_rqident = tsp01-rqident.

exit.

endselect.

if sy-subrc ne 0.

clear f_rqident.

endif.

endform." get_spool_number

3 REPLIES 3
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
503

Hi,

after firing the print.

Get the latest spool number from TSP01 table(with date,user,latest one),which will store the spool numbers.

or

use F.M <b>LIST_FROM_MEMORY</b>

By this u can able to get the number.

Cheers,

Simha.

Read only

Former Member
0 Likes
503

Hi,

Please check the Function Group SPOX for all function modules

Also check out FM <b><b>RSPO_FIND_SPOOL_REQUESTS</b></b>

<b> RSPO_GET_ATTRIBUTES_SPOOLJOB</b>

Hope this helps

Got another FM for it.

Message was edited by: Dominic Pappaly

Read only

Former Member
0 Likes
504

Hi ,

Can use the following code :-

----


  • FORM get_spool_number *

----


  • Get the most recent spool created . *

----


  • --> F_REPID (prog. name) *

  • --> F_UNAME (user name ) *

  • --> F_RQIDENT *

----


form get_spool_number using f_repid

f_uname

changing f_rqident.

*-- Declaring local variables.

data:

lc_rq2name like tsp01-rq2name,

lc_rqident like tsp01-rqident.

*-- In TSP01 table, the 'RQ2NAME' field holds the combined

*-- ( first nine characters of the program name followed *-- by first three characters of the user name)value of

*-- the corresponding program and username.

concatenate f_repid+0(9)

f_uname+0(3)

into lc_rq2name .

select * from tsp01 where rq2name = lc_rq2name

order by rqcretime descending.

f_rqident = tsp01-rqident.

exit.

endselect.

if sy-subrc ne 0.

clear f_rqident.

endif.

endform." get_spool_number