Skip to Content
avatar image
Former Member

Doubt reg Open_form

Hi all,

I have this piece of code .

when i click cancel win the pop window which shows me print,print preview and cancel with all other printer and print parametrs.

If i click cancel i get a message saying

output was cancelled by the user

call function 'OPEN_FORM'

exporting

device = 'PRINTER'

dialog = 'X'

form = space

language = sy-langu

options = itCTT

.

call function 'START_FORM'

exporting

  • ARCHIVE_INDEX =

form = 'ZFORM '

  • LANGUAGE = ' '

  • STARTPAGE = ' '

  • PROGRAM = ' '

  • MAIL_APPL_OBJECT =

  • IMPORTING

  • LANGUAGE =

  • EXCEPTIONS

  • FORM = 1

  • FORMAT = 2

  • UNENDED = 3

  • UNOPENED = 4

For this piece of code the iam getting a mess

START_FORM is invalid, OPEN_FORM is missing

call function 'OPEN_FORM'

exporting

device = 'PRINTER'

dialog = 'X'

form = space

language = sy-langu

options = itcTT

  • MAIL_SENDER =

  • MAIL_RECIPIENT =

  • MAIL_APPL_OBJECT =

  • RAW_DATA_INTERFACE = '*'

  • IMPORTING

  • LANGUAGE =

  • NEW_ARCHIVE_PARAMS =

  • RESULT =

exceptions

canceled = 1

device = 2

form = 3

options = 4

unclosed = 5

mail_options = 6

archive_error = 7

invalid_fax_number = 8

more_params_needed_in_batch = 9

spool_error = 10

others = 11

.

if sy-subrc <> 0.

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

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

endif.

call function 'START_FORM'

exporting

  • ARCHIVE_INDEX =

form = 'ZFORM '

  • LANGUAGE = ' '

  • STARTPAGE = ' '

  • PROGRAM = ' '

  • MAIL_APPL_OBJECT =

  • IMPORTING

  • LANGUAGE =

  • EXCEPTIONS

  • FORM = 1

  • FORMAT = 2

  • UNENDED = 3

  • UNOPENED = 4

For the second case the sy-subrc is 1

Thanks

David

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Aug 15, 2007 at 03:21 PM

    Please comment form option in open_form and see the results since you are using start_form ,here you are passing form name,so no need to use form option in open_form.

    if it is not working the pass form name into open_form and see the results

    Thanks

    Seshu

    Add comment
    10|10000 characters needed characters exceeded