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: 

Printing a spool

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos
*"     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'

5 REPLIES 5

former_member188685
Active Contributor
0 Kudos
*"     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'

naimesh_patel
Active Contributor
0 Kudos

Use FM RSPO_RPRINT_SPOOLREQ to print your Spool.

Regards,

Naimesh Patel

0 Kudos

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

.

former_member188685
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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