08-29-2008 3:36 PM
I experts,
I created a spool with the NEW-PAGE PRINT ON/OFF instruction.
I used the addiction PARAMETERS p_param where p_param is initialised with the GET_PRINT_PARAMETERS fonction module like this :
Call Function 'GET_PRINT_PARAMETERS'
Exporting
RELEASE = ' '
Importing
out_parameters = print_parameters
valid = valid_flag
Exceptions
invalid_print_params = 2
Others = 4.
I want that spool not to be printed immediately but later (when I'll call a fonction module that I will create for this task)
2 Questions :
Is the RELEASE parameter of the FM resposible of keeping or not the spool ?
How can I get a spool back for prinitng it ?
Thanks a lot !
--Yohann.
08-29-2008 3:40 PM
*" VALUE(IMMEDIATELY) LIKE PRI_PARAMS-PRIMM DEFAULT C_CHAR_UNKNOWN
if you set IMMEDIATELY = 'X' then it will print immediately.
Call Function 'GET_PRINT_PARAMETERS'
Exporting
IMMEDIATELY = 'X'
08-29-2008 3:40 PM
*" VALUE(IMMEDIATELY) LIKE PRI_PARAMS-PRIMM DEFAULT C_CHAR_UNKNOWN
if you set IMMEDIATELY = 'X' then it will print immediately.
Call Function 'GET_PRINT_PARAMETERS'
Exporting
IMMEDIATELY = 'X'
08-29-2008 3:46 PM
Use FM RSPO_RPRINT_SPOOLREQ to print your Spool.
Regards,
Naimesh Patel
08-29-2008 3:51 PM
You want to do this before printing spool .
***********************************************************************************
* Find the spool request
************************************************************************************
CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'
EXPORTING
RQOWNER = SY-UNAME
TABLES
SPOOLREQUESTS = SPOOL.
^ Saquib
.
08-29-2008 3:59 PM
Check this sample code.
REPORT ztest_print line-size 100
line-count 10.
data: valid type c.
DATA: out_parameters TYPE pri_params.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LOCA' "Replace with your Dest.Printer
immediately = 'X'
release = 'X'
NO_DIALOG = 'X'
IMPORTING
out_parameters = out_parameters
VALID = valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3.
NEW-PAGE PRINT ON PARAMETERS out_parameters NO DIALOG. .
WRITE 'this is for testing'.
NEW-PAGE PRINT OFF.
09-01-2008 8:29 AM
Thanks for your answers, I'm just not able to use FM RSPO_RPRINT_SPOOLREQ, I have the message
'Can't find the spool 0 in the system <my_system>' ...
I tried to give all parameters to this FM using FM RSPO_ISELECT_TSP01 but it still show me the same message. And I well put the spool number value in the RQIDENT field..
Do you know what is this problem from ?
I Also don't know what to put in the rs_selfield parameter of FM
RSPO_RPRINT_SPOOLREQ, is-it usefull for printing ?
Thanks,
--Yohann
Edited by: Yohann Camp on Sep 1, 2008 9:32 AM