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

Execute in Backgroung

Former Member
0 Likes
1,207

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

1 ACCEPTED SOLUTION
Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,184

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,

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

9 REPLIES 9
Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,185

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

Read only

Former Member
0 Likes
1,184

Do you want this for every program that the user can run in background or just one particular program/transaction?

Read only

0 Likes
1,184

Just in particular program/transaction

Read only

0 Likes
1,184

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

Read only

0 Likes
1,184

Hi,

Thank you for your help

here is my email

[email protected]

Read only

0 Likes
1,184

Can I do it by using FM 'GET_PRINT_PARAMETERS'?

Maybe I can can change at runtime the options of print parameters?

Read only

0 Likes
1,184

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.

Read only

0 Likes
1,184

I finally did what I want with FM

'SET_PRINT_PARAMETERS'

thanks for everyone

Read only

0 Likes
1,184

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