Skip to Content
author's profile photo Former Member
Former Member

Not able to see print and print preview options simultaneously

Hi Everyone,

i have designed a smartform,and passed all parameters correctly

but my requirement is that, when i choose print option it only prompts me to print

button, while still i am seeing print preview option too , when i chosed print button,

it should not prompt me for preview.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 03, 2014 at 04:54 AM

    Hi Shweta,

    just see this code, and pass USER_SETTINGS = 'X', while calling your smartforms

    and if you have written anything for print and print preview then please delete it, it will solve your problem.

    CALL FUNCTION FNAME

    EXPORTING

    CONTROL_PARAMETERS = p_control_parameters

    OUTPUT_OPTIONS = i_output_options

    USER_SETTINGS = 'X'

    TABLES

    IF SY-SUBRC <> 0.

    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 05:25 AM

    Hi,

    please add these codes to your programs, it will solve your puzzle.

    DATA: fname TYPE rs38l_fnam,

    lw_out_option TYPE ssfcompop,

    lw_control TYPE ssfctrlop.

    data : i_output_options type ssfcompop.

    data : p_control_parameters type ssfctrlop occurs 0 with header line.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2014 at 05:26 AM

    HI ,

    Just add little code like,

    DATA: gt_control TYPE ssfctrlop,

    gt_output TYPE ssfcompop.


    gt_control-preview = 'X'.

    * gt_control-no_open = 'X'.

    * gt_control-no_close = 'X'.

    * gt_control-no_dialog = 'X'.

    gt_control-device = 'PRINTER'.

    gt_output-tddest = 'LP01'.

    * gt_output-tdnoprint = 'X'.

    call function '/1BCDWB/SF00000291'

    exporting

    * ARCHIVE_INDEX =

    * ARCHIVE_INDEX_TAB =

    * ARCHIVE_PARAMETERS =

    CONTROL_PARAMETERS = gt_control

    * MAIL_APPL_OBJ =

    * MAIL_RECIPIENT =

    * MAIL_SENDER =

    OUTPUT_OPTIONS = gt_output

    * USER_SETTINGS = 'X'

    t_vbrp = t_vbrp

    v_vbeln = p_vbeln

    t_vbrk = x_vbrk

    c1 = c1

    * IMPORTING

    * DOCUMENT_OUTPUT_INFO =

    * JOB_OUTPUT_INFO =

    * JOB_OUTPUT_OPTIONS =

    * EXCEPTIONS

    * FORMATTING_ERROR = 1

    * INTERNAL_ERROR = 2

    * SEND_ERROR = 3

    * USER_CANCELED = 4

    * OTHERS = 5

    .

    if sy-subrc <> 0.

    * Implement suitable error handling here

    endif.


    Regards,

    Sivaganesh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.