Wednesday, December 29, 2010
TABLES ITCPO.
DATA: T_OTF TYPE TABLE OF ITCOO.
ITCPO-TDGETOTF = 'X'.

CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE                      = 'PRINTER'
DIALOG                      = 'X'
FORM                        = 'ZTEST'
OPTIONS                     = ITCPO
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.
ELSE.
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA                  = T_OTF
EXCEPTIONS
UNOPENED                 = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR               = 3
SPOOL_ERROR              = 4
OTHERS                   = 5.
ENDIF.

1 comment:

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.