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

Overwriting spool parameters.

Former Member
0 Likes
1,211

Hi all,

I have a Z program and I am setting the print parameters using the FM 'GET_PRINT_PARAMETERS'

The destination is set to LOCL.

However my program calls a standard program - RFEBKA00.

This program again uses the 'GET_PRINT_PARAMETERS' and it is not setting destination to LOCL.

The parameters I am setting is getting over written in the second call to this FM.

Thus when the job runs in back ground, I am getting the error : printer " " not found

I am not getting a way how to come out of this.

YOur valuable suggestion would be helpful and rewarded.

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
925

Hi Sachin

I guess you are using SUBMIT statement for calling program: RFEBKA00.

Try to make use of addition <b>DESTINATION</b> in SUBMIT statement to pass the printer and <b>ARCHIVE PARAMETERS</b>.

Kind Regards

Eswar

Hi all,

I have a Z program and I am setting the print parameters using the FM 'GET_PRINT_PARAMETERS'

The destination is set to LOCL.

However my program calls a standard program - RFEBKA00.

This program again uses the 'GET_PRINT_PARAMETERS' and it is not setting destination to LOCL.

The parameters I am setting is getting over written in the second call to this FM.

Thus when the job runs in back ground, I am getting the error : printer " " not found

I am not getting a way how to come out of this.

YOur valuable suggestion would be helpful and rewarded.

regards

6 REPLIES 6
Read only

Former Member
0 Likes
926

Hi Sachin

I guess you are using SUBMIT statement for calling program: RFEBKA00.

Try to make use of addition <b>DESTINATION</b> in SUBMIT statement to pass the printer and <b>ARCHIVE PARAMETERS</b>.

Kind Regards

Eswar

Read only

0 Likes
925

Hi Eswar,

Thanks for the reply.

I have used hte code in the following way::

SUBMIT rfebka00

WITH Destination EQ 'LOCL'.

its not working tough..

Read only

0 Likes
925

Need to use ARCHIVE PARAMETERS also.

Below examples from the documenation might help you understand the same:

Example

* Without archiving 
DATA: PARAMS LIKE PRI_PARAMS, 
      DAYS(1)  TYPE N VALUE 2, 
      COUNT(3) TYPE N VALUE 1, 
      VALID    TYPE C. 

CALL FUNCTION 'GET_PRINT_PARAMETERS' 
  EXPORTING DESTINATION           = 'LT50' 
            COPIES                = COUNT 
            LIST_NAME             = 'TEST' 
            LIST_TEXT             = 'SUBMIT ... TO SAP-SPOOL' 
            IMMEDIATELY           = 'X' 
            RELEASE               = 'X' 
            NEW_LIST_ID           = 'X' 
            EXPIRATION            = DAYS 
            LINE_SIZE             = 79 
            LINE_COUNT            = 23 
            LAYOUT                = 'X_PAPER' 
            SAP_COVER_PAGE        = 'X' 
            COVER_PAGE            = 'X' 
            RECEIVER              = 'SAP*' 
            DEPARTMENT            = 'System' 
            NO_DIALOG             = ' ' 
  IMPORTING OUT_PARAMETERS        = PARAMS 
            VALID                 = VALID. 

IF VALID <> SPACE. 
  SUBMIT RSTEST00 TO SAP-SPOOL 
    SPOOL PARAMETERS PARAMS 
    WITHOUT SPOOL DYNPRO. 
ENDIF. 


Example
* With archiving 
DATA: PARAMS   LIKE PRI_PARAMS, 
      ARPARAMS LIKE ARC_PARAMS, 
      DAYS(1)  TYPE N VALUE 2, 
      COUNT(3) TYPE N VALUE 1, 
      VALID    TYPE C. 

CALL FUNCTION 'GET_PRINT_PARAMETERS' 
  EXPORTING DESTINATION            = 'LT50' 
            COPIES                 = COUNT 
            LIST_NAME              = 'TEST' 
            LIST_TEXT              = 'SUBMIT ... TO SAP-SPOOL' 
            IMMEDIATELY            = 'X' 
            RELEASE                = 'X' 
            NEW_LIST_ID            = 'X' 
            EXPIRATION             = DAYS 
            LINE_SIZE              = 79 
            LINE_COUNT             = 23 
            LAYOUT                 = 'X_PAPER' 
            SAP_COVER_PAGE         = 'X' 
            COVER_PAGE             = 'X' 
            RECEIVER               = 'SAP*' 
            DEPARTMENT             = 'System' 
            SAP_OBJECT             = 'RS' 
            AR_OBJECT              = 'TEST' 
            ARCHIVE_ID             = 'XX' 
            ARCHIVE_INFO           = 'III' 
            ARCHIVE_TEXT           = 'Description' 
            NO_DIALOG              = ' ' 
  IMPORTING OUT_PARAMETERS         = PARAMS 
            OUT_ARCHIVE_PARAMETERS = ARPARAMS 
            VALID                  = VALID. 

IF VALID <> SPACE. 
  SUBMIT RSTEST00 TO SAP-SPOOL 
    SPOOL PARAMETERS PARAMS 
    ARCHIVE PARAMETERS ARPARAMS 
    WITHOUT SPOOL DYNPRO. 
ENDIF.

Regards

Eswar

Read only

0 Likes
925

Thanks Eswar.....

Problem Solved...

A real life saver...

regards,

Read only

0 Likes
925

Glad could help you:)

Regards

Eswar

Read only

Former Member
0 Likes
925

Hi,

After using FM: GET_PRINT_PARAMETERS, modify any parameters that you want to change and then use the FM: SET_PRINT_PARAMETERS to set the new print parameters.

Regards

Subramanian