‎2008 Feb 27 10:14 PM
Hi Experts,
Is there a FM which basically returns the Spool Request Number generated by a particular Program / User ?
System: 4.6C
Thanks a lot.
‎2008 Feb 27 10:18 PM
I don't think so...But you can do this...
SELECT RQIDENT
INTO (T_TSP01-RQIDENT)
FROM TSP01
WHERE RQOWNER EQ SY-UNAME
AND RQCLIENT EQ SY-MANDT.
APPEND T_TSP01.
ENDSELECT.
You will had the last spool number generated by a particular user...
Greetigns,
Blag.
‎2008 Feb 27 10:29 PM
Hey Thanks for the reply.
I was already using this select statement before in my previous programs. But was wondering if there is a FM.
Thanks.
‎2008 Feb 27 10:36 PM
‎2011 Mar 03 2:45 AM
I have done it with this function module: RSPO_FIND_SPOOL_REQUESTS passing AUTHORITY = RSPO_GET_TEMSEOBJ_OF and RQOWNER = user. It returns a list of spool requests with creation date and time.
‎2011 Dec 14 9:40 AM
call this function module 'set_print_parameters'
and pass the subsequent values .
regards ,
Amit shandilya
‎2011 Dec 14 9:43 AM
one more is there
'RSPO_OPEN_SPOOLREQUEST'
it will give the appropriate solution to your query.
‎2011 Dec 14 9:45 AM
or try this,
SUBMIT (p_repid) TO SAP-SPOOL
SPOOL PARAMETERS mstr_print_parms
WITHOUT SPOOL DYNPRO
AND RETURN.
but it will create infinite loop , so use abap memory and export a flag variable with
a value to restricted the excution of the above submit only once and all the internal
table and other data which you want in your program . below is the example .
importing variable value set at first time to restrict the infinite loop .
IMPORT var FROM MEMORY ID 'abc' .
var = var + 1 .
*checking variable to restricted scecond time exction of this block of code
*IF var = 1 .
v_memid = 1 .
EXPORT var TO MEMORY ID 'abc' . (flag variable to restrict the excution only once )
EXPORT it_pernr it_pernr_quali v_memid TO MEMORY ID 'bcd'.(internal table and otherdata)
submitting the spool request
SUBMIT (p_repid) TO SAP-SPOOL
SPOOL PARAMETERS mstr_print_parms
WITHOUT SPOOL DYNPRO
AND RETURN.
ENDIF.
‎2011 Dec 14 9:47 AM
one more is there
'RSPO_OPEN_SPOOLREQUEST'
it will give the appropriate solution to your query.
‎2011 Dec 14 9:49 AM
one more is there
'RSPO_OPEN_SPOOLREQUEST'
it will give the appropriate solution to your query.
another one ,
SUBMIT (p_repid) TO SAP-SPOOL
SPOOL PARAMETERS mstr_print_parms
WITHOUT SPOOL DYNPRO
AND RETURN.
but it will create infinite loop , so use abap memory and export a flag variable with
a value to restricted the excution of the above submit only once and all the internal
table and other data which you want in your program . below is the example .
importing variable value set at first time to restrict the infinite loop .
IMPORT var FROM MEMORY ID 'abc' .
var = var + 1 .
*checking variable to restricted scecond time exction of this block of code
*IF var = 1 .
v_memid = 1 .
EXPORT var TO MEMORY ID 'abc' . (flag variable to restrict the excution only once )
EXPORT it_pernr it_pernr_quali v_memid TO MEMORY ID 'bcd'.(internal table and otherdata)
submitting the spool request
SUBMIT (p_repid) TO SAP-SPOOL
SPOOL PARAMETERS mstr_print_parms
WITHOUT SPOOL DYNPRO
AND RETURN.
ENDIF.
‎2011 Dec 14 9:55 AM
Hi Venu,
Use this FM to get spool numbers by passing owner Parameter
RSPO_RINIT_SPOOL_SP01