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

open_form without dialog

former_member537489
Participant
0 Likes
1,563

Dear experts,

I am using the 'OPEN_FORM' fm, in my sapscript, which I need to print to a PRINTER device, but I dont want to show the dialog, so in parameter DIALOG i use space.

But when I do that, it doesnt know that i want to print, I havent pushed button PRNT in the popup.

What can i do?

Thank you in advance,

Roxani

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
888

Please try giving the printer name.



  data itcpo type itcpo.

    itcpo-tdimmed    = 'X'.
    itcpo-tdnewid    = 'X'.
    itcpo-tdprogram  = sy-repid.
    itcpo-tddest = 'PRINTER_NAME'.

    call function 'OPEN_FORM'
         exporting
              device   = 'PRINTER'
              language = sy-langu
              options  = itcpo
              dialog   = ' '
         exceptions
              others   = 1.

Regards,

Rich Heilman

Message was edited by:

Rich Heilman

Dear experts,

I am using the 'OPEN_FORM' fm, in my sapscript, which I need to print to a PRINTER device, but I dont want to show the dialog, so in parameter DIALOG i use space.

But when I do that, it doesnt know that i want to print, I havent pushed button PRNT in the popup.

What can i do?

Thank you in advance,

Roxani

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
889

Please try giving the printer name.



  data itcpo type itcpo.

    itcpo-tdimmed    = 'X'.
    itcpo-tdnewid    = 'X'.
    itcpo-tdprogram  = sy-repid.
    itcpo-tddest = 'PRINTER_NAME'.

    call function 'OPEN_FORM'
         exporting
              device   = 'PRINTER'
              language = sy-langu
              options  = itcpo
              dialog   = ' '
         exceptions
              others   = 1.

Regards,

Rich Heilman

Message was edited by:

Rich Heilman

Read only

888

Dear Rich,

Thanks for your reply,

I have added this to my code but it still doesn't work.

In the close form function, it outputs subrc = 2.

But with the same parameters, when i use DIALOG = X in open_form, its prints OK.

Pease help.

Thank you,

Roxani

-


OK i found it: I need to make parameter TDPREVIEW of the OPEN_FORM OPTIONS = space, in order to immediatelly send output to the printer.

Thank you,

Roxani

Message was edited by:

Roxani Athousaki