‎2007 Aug 06 6:34 AM
Urgent !
I have 5 pages of Smartforms.But i want to print 3 and 5 pages only out of 5 pages.
while printing in page selection i m writing 3 ,5.
but its showing error
No output request open. End not possible.
points sure!
Rahul
Message was edited by:
rahul deshmukh
‎2007 Aug 06 6:40 AM
‎2007 Aug 06 6:43 AM
hi karthikeyan,
that was my question only. its not working
plz help me
‎2007 Aug 06 6:46 AM
‎2007 Aug 06 6:54 AM
Hi Rajashekhar!
i checked that links but its not helpful for my solution.
Regards,
Rahul
Message was edited by:
rahul deshmukh
‎2007 Aug 06 11:04 AM
Hello Rahul just check keeping page selection blank
all pages is getting printed if yes
then check ur line <b>while printing in page selection i m writing 3 ,5.</b>
remove the full stop from end it should work if working when page selection is blank, if not then problem is in your smartform(mostly driver program where you are calling it. check that check open form/close form for spool request if you are calling smart form inside a loop you may be passing some parameters).
reward points if helpful
‎2007 Aug 06 11:34 AM
hi Pranesh,
this is my prog code.when i execute without page no , its displays all pages (eg. - 4 pages). but user checks all pages and prints only selected pages. for eg. 3rd or
4th. just as we print in word , we type page no which we want , in page selection option.
but when i type page no in page selection.
its giving this error also -
handle not valid for open spool request in 'SSF_FUNCTION_MODULE_NAME'.
then in 'SSF_CLOSE' , it shows error - No ouptut request open. End not possible.
while printing.
=========================
DATA: fm_name TYPE rs38l_fnam,
control TYPE ssfctrlop,
errtab TYPE tsferror,
p_form TYPE tdsfname,
pageno TYPE tdpageslct.
control-no_dialog = 'X'.
control-preview = 'X'.
control-no_open = 'X'.
control-no_close = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
ARCHIVE_PARAMETERS =
user_settings = 'X'
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJ =
OUTPUT_OPTIONS = pageno
control_parameters = control
IMPORTING
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT irej INTO temp.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZREJECTNOTE'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = control
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = pageno
USER_SETTINGS = 'X'
itab = temp
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
JOB_OUTPUT_INFO =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*
analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = errtab.
IF NOT errtab IS INITIAL.
add your handling
ENDIF.
======================================