Application Development 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: 

regarding popup in print dialog

Former Member
0 Kudos

while printing, I want to select the print output device thru input screen parameter using abap program and if you click print button in application bar, it gives again print popup box.

i dont want to make popup box to display if we already selected in selection screen. as both times i have to select input.

can you please guide me how its possible.

Suggestion please.

thanks

ambichan.

9 REPLIES 9

Former Member
0 Kudos

Hi Ambi,

You can do that in two steps:

1) While calling the Function Module associated with smartform, set the USER_SETTING to space .

2) set the no_dialog field of the control parameters.

Please refer this link.

Regards,

SP.

0 Kudos

hi, sahil,

As u maintion no_dailog it for smartfrom when u called driver program so that time u seggesion is right but if we r using module pool and that time we gv rint thrught custom buttion and want to hide the the dailog box and no spool request so it is possble.

plz coorect me if i wrong i was try early this way this is only for driver program but i want to do same thng in module pool ( hide dailog box and all procedure done by programng) so is that possible or any FM for that .

Regards ,

Amar

Former Member
0 Kudos

If you are using SAPScript then You can make use of the structure ITCPO Where you need to set TDPREVIEW field as X and pass this structure to OPEN_FORM. This will avoid the popup. You may also pass the Printer parametes to the structure as well

Regards,

Thomas.

0 Kudos

well. thanks for all of your reply.

Here i am talking about Standard Print button dialog box not the one which we call in abap program.

The problem is i want to disable the Standard print dialog box option not the one which i developed.

how to do this.suggestion please.

Former Member
0 Kudos

Hi Chan,

When calling the script in OPEN_FORM we have got an option called dialog. pass space to that value, and ur dialog box will not be displayed.

Regards,

Tushar

Former Member
0 Kudos

hi Ambi,

for this,while calling the script in OPEN_FORM, pass space to the parameter for displaying dialog box. By default it is marked as 'X'.

Hope this solves the issue

Regards,

Richa

former_member223537
Active Contributor
0 Kudos

Hi,

Please check the following code :-

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DIALOG = ' '

DEVICE = 'PRINTER'

FORM = form name

LANGUAGE = SY-LANGU

  • OPTIONS =

EXCEPTIONS

CANCELLED = 1

DEVICE = 2

FORM = 3

OTHERS = 11

.

IF SY-SUBRC NE 0.

MESSAGE ...

ENDIF.

In the above function module the parameter

OPTIONS = It is a structure of type ITCPO and it controls the various attributes like number of copies , print preview etc. Provide OPTIONS parameter and pass X or blank for Dialog.

Best regards,

Prashant

Former Member
0 Kudos

hi  Bhaasha,

Tel your actual requried in detail bec as i understand u want hide dailog box but what you doing exectly bec of u r doing driver program using smart form then go with the code and your problem will solve

code:

data:

    LS_CONTROL_PARS TYPE  SSFCTRLOP.

DATA: LS_OUTPUT_OPTIONS TYPE SSFCOMPOP.

       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

       EXPORTING

         FORMNAME                 = 'zzz ' "smartform program name

*   VARIANT                  = ' '

*   DIRECT_CALL              = ' '

      IMPORTING

        FM_NAME                  = ' ' "input field

  EXCEPTIONS

    NO_FORM                  = 1

    NO_FUNCTION_MODULE       = 2

    OTHERS                   = 3

        LS_CONTROL_PARS-PREVIEW  = 'X' .

        LS_CONTROL_PARS-NO_DIALOG  = 'X'.

         LS_OUTPUT_OPTIONS-tdimmed = 'X'.

        LS_OUTPUT_OPTIONS-tddelete = 'X'.

        LS_OUTPUT_OPTIONS-tddest = 'L2'.

CALL FUNCTION '/1BCDWB/SF00000032'

           EXPORTING

*   ARCHIVE_INDEX              =

*   ARCHIVE_INDEX_TAB          =

*   ARCHIVE_PARAMETERS         =

      CONTROL_PARAMETERS         = LS_CONTROL_PARS

*   MAIL_APPL_OBJ              =

*   MAIL_RECIPIENT             =

*   MAIL_SENDER                =

    OUTPUT_OPTIONS             LS_OUTPUT_OPTIONS

      USER_SETTINGS              = ''

       P_MATNR                    =  ' ' "input field

* 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

.


Message was edited by: amar anadkat

Former Member
0 Kudos

Hi,

For SapScript :

tddest from the structure itcpo will hide the dialog box.

Regards,

Srish