2007 Feb 21 11:42 AM
In the SP01 Transaction there is an option to search for the Spool by .
1.Spool request name
2.Spool request name (suffix 1)
3.Spool request name (suffix 2)
The above three parameters are set automatically by system.
I am printing the spool in the following way
NEW-PAGE PRINT ON NO DIALOG
COVER TEXT 'Test Spool'
DESTINATION space
IMMEDIATELY space
KEEP IN SPOOL space.
WRITE : / 'Amit Behera'.
NEW-PAGE PRINT OFF.
I tried to change the default value of the system fields <b>SY-PRDSN</b> and <b>SY-PLIST</b> when the control was on <b>WRITE : / 'Amit Behera'.</b>, the values got changed at the runtime but when I double clicked the spool number the <b>'Name'</b> section still contained the default system values and not the one I had changed at the runtime.
I tried the FM <b>'SET_PRINT_PARAMETERS'</b> and <b>'RSPO_SET_ATTRIBUTES_SPOOLJOB'</b> but it didn't work.
How do I go on to change these values ? Please let me know.
Thanks in advance.
Regards,
Amit Behera.
2007 Feb 22 3:04 PM
Hi.
Try something like this.
data:
params like pri_params,
valid(1) type c.
get default params
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
NO_DIALOG = 'X'
IMPORTING
OUT_PARAMETERS = params
VALID = valid
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
amend default params
params-prdsn = 'PLUM'.
params-plist = 'PRUNE'.
use params
NEW-PAGE PRINT ON NO DIALOG
parameters params.
WRITE : / 'Amit Behera'.
NEW-PAGE PRINT OFF.
John
In the SP01 Transaction there is an option to search for the Spool by .
1.Spool request name
2.Spool request name (suffix 1)
3.Spool request name (suffix 2)
The above three parameters are set automatically by system.
I am printing the spool in the following way
NEW-PAGE PRINT ON NO DIALOG
COVER TEXT 'Test Spool'
DESTINATION space
IMMEDIATELY space
KEEP IN SPOOL space.
WRITE : / 'Amit Behera'.
NEW-PAGE PRINT OFF.
I tried to change the default value of the system fields <b>SY-PRDSN</b> and <b>SY-PLIST</b> when the control was on <b>WRITE : / 'Amit Behera'.</b>, the values got changed at the runtime but when I double clicked the spool number the <b>'Name'</b> section still contained the default system values and not the one I had changed at the runtime.
I tried the FM <b>'SET_PRINT_PARAMETERS'</b> and <b>'RSPO_SET_ATTRIBUTES_SPOOLJOB'</b> but it didn't work.
How do I go on to change these values ? Please let me know.
Thanks in advance.
Regards,
Amit Behera.
2007 Feb 22 3:04 PM
Hi.
Try something like this.
data:
params like pri_params,
valid(1) type c.
get default params
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
NO_DIALOG = 'X'
IMPORTING
OUT_PARAMETERS = params
VALID = valid
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
amend default params
params-prdsn = 'PLUM'.
params-plist = 'PRUNE'.
use params
NEW-PAGE PRINT ON NO DIALOG
parameters params.
WRITE : / 'Amit Behera'.
NEW-PAGE PRINT OFF.
John
2007 Feb 27 9:45 AM
Hi John,
Using this solved the problem but a pop up is generated. how to stop that pop up from getting displayed and still achieved the desired result.
Regards,
Amit Behera.
2007 Feb 27 9:49 AM
hi,
u need to give
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY = C_IMMEDIATELY
LAYOUT = WK_SPOOL
LIST_NAME = TEXT-004
NO_DIALOG = SPACE
IMPORTING
OUT_PARAMETERS = WK_PRIPAR
VALID = W_VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF W_VALID <> SPACE.
NEW-PAGE PRINT ON PARAMETERS WK_PRIPAR NO DIALOG.
ENDIF.
do reward if it helps,
priya.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |