‎2006 Jul 07 1:31 PM
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..
‎2006 Jul 07 2:39 PM
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
‎2006 Jul 07 1:39 PM
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.
‎2006 Jul 07 1:42 PM
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
‎2006 Jul 07 2:39 PM
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