2006 Jan 11 1:32 PM
Hi,
When user execute report in background (F9) he can choose to delete the spool after printing (DELETE IMMEDIATELY AFTER PRINTING option).
I don't want the user to be abble to do that?
Any idea?
Thank in advance,
Joseph Fryda
2006 Jan 11 2:02 PM
Hi Joseph!
One (bad) option is of course modification.
An other way is, planning a second job by your report with correct setting in case wrong option was used and terminate the first job.
But I would set on user training.
Regards,
Christian
Hi Joseph!
One (bad) option is of course modification.
An other way is, planning a second job by your report with correct setting in case wrong option was used and terminate the first job.
But I would set on user training.
Regards,
Christian
2006 Jan 11 2:02 PM
Hi Joseph!
One (bad) option is of course modification.
An other way is, planning a second job by your report with correct setting in case wrong option was used and terminate the first job.
But I would set on user training.
Regards,
Christian
2006 Jan 11 4:40 PM
Do you want this for every program that the user can run in background or just one particular program/transaction?
2006 Jan 11 8:49 PM
2006 Jan 11 10:08 PM
HI,
Send ur mail id , i will send one pdf on background jobs.This may not help u in current situation but will give some idea
2006 Jan 12 9:08 AM
2006 Jan 15 12:35 PM
Can I do it by using FM 'GET_PRINT_PARAMETERS'?
Maybe I can can change at runtime the options of print parameters?
2006 Jan 15 12:51 PM
Hi
Yes I think you should do that:
use that function to get out print parameter and then clear the parameter to delete the spool after printing:
DATA: OUT_PARAMETERS LIKE PRI_PARAMS, VALID.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
ARCHIVE_ID = C_CHAR_UNKNOWN
ARCHIVE_INFO = C_CHAR_UNKNOWN
ARCHIVE_MODE = C_CHAR_UNKNOWN
ARCHIVE_TEXT = C_CHAR_UNKNOWN
AR_OBJECT = C_CHAR_UNKNOWN
ARCHIVE_REPORT = C_CHAR_UNKNOWN
AUTHORITY = C_CHAR_UNKNOWN
COPIES = '001'
COVER_PAGE = C_CHAR_UNKNOWN
DATA_SET = C_CHAR_UNKNOWN
DEPARTMENT = C_CHAR_UNKNOWN
DESTINATION = C_CHAR_UNKNOWN
EXPIRATION = C_NUM1_UNKNOWN
IMMEDIATELY = 'X'
IN_ARCHIVE_PARAMETERS = ' '
IN_PARAMETERS = ' '
LAYOUT = C_CHAR_UNKNOWN
LINE_COUNT = C_INT_UNKNOWN
LINE_SIZE = C_INT_UNKNOWN
LIST_NAME = C_CHAR_UNKNOWN
LIST_TEXT = C_CHAR_UNKNOWN
MODE = ' '
NEW_LIST_ID = C_CHAR_UNKNOWN
NO_DIALOG = C_FALSE
RECEIVER = C_CHAR_UNKNOWN
RELEASE = C_CHAR_UNKNOWN
REPORT = C_CHAR_UNKNOWN
SAP_COVER_PAGE = C_CHAR_UNKNOWN
HOST_COVER_PAGE = C_CHAR_UNKNOWN
PRIORITY = C_NUM1_UNKNOWN
SAP_OBJECT = C_CHAR_UNKNOWN
TYPE = C_CHAR_UNKNOWN
USER = SY-UNAME
DRAFT = C_CHAR_UNKNOWN
ABAP_LIST = ' '
USE_ARCHIVENAME_DEF = ' '
DEFAULT_SPOOL_SIZE = C_CHAR_UNKNOWN
IMPORTING
OUT_ARCHIVE_PARAMETERS =
OUT_PARAMETERS = OUT_PARAMETERS
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.
if valid = 'X'.
OUT_PARAMETERS-PRREL = SPACE.
submit USER SY-UNAM VIA JOB <JOBNAME> NUMBER <JOBNR>
TO SAP-SPOOL
SPOOL PARAMETERS OUT_PARAMETERS
WITHOUT SPOOL DYNPRO AND RETURN.
ENDIF.
Use fm JOB_OPEN and JOB_CLOSE to schedule the job.
2006 Jan 15 1:33 PM
I finally did what I want with FM
'SET_PRINT_PARAMETERS'
thanks for everyone
2006 Jan 15 1:46 PM
Hi
This fm is correct if you don't want to allow the user sets the print parameters, but I've understood the user couldn't set only one parameter (to delete spool after print).
Max
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |