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

Smartform avoid print window

Former Member
0 Likes
635

Hi Experts

what r the necessary parameters should be passed to the fm

GET_PRINT_PARAMETERS for avoiding print dialog window.

i want to avoid dialog window.And how to declare those parameters, pls explain me

my printer name is 'LP01'.

i need one copy, how to set these to the fm.

Pls help me.

Thanks in advance

Regards

Rajaram

4 REPLIES 4
Read only

Former Member
0 Likes
599

Hi Ram,

declare two variable of type :

data: gfl_ctrlop TYPE ssfctrlop,

gfl_compop TYPE ssfcompop,

enter these values:

gfl_compop-tddest = 'LP01'. "Spool: Output device

gfl_ctrlop-getotf = 'X'.

gfl_ctrlop-no_dialog = 'X'. "To hide the print priview screen

gfl_compop-tdnoprev = 'X'.

pass these variables in function module of smart form.

window will get suppresed.

CALL FUNCTION g_fname

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

control_parameters = gfl_ctrlop

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

output_options = gfl_compop

  • USER_SETTINGS = 'X'

header_data = gfl_header_data

item_table = git_item_data

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

job_output_info = g_return

  • JOB_OUTPUT_OPTIONS =

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards:

Talwinder

Read only

Former Member
0 Likes
599

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 = 'LP01'

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.

Awrd Oints if useful

Bhupal

Read only

0 Likes
599

Hi Bhupal

I tried yours but still its asking dialog window yar.

i dont want to show dialog window, once i execute it should be printed.

Pls advice me and, whether we need to specify smarform name anywhere in this fm.

Thanks in advance.

Regards

Rajaram

Read only

0 Likes
599

Hi,

Specify Default printername in ur Userprofile.

Path:

System->UserProfile->Own Data->defaults.

Award points if helpful.

Regards,

Srinivas