2009 Feb 10 6:47 AM
Hello Experts,
I have created a smartform object, inwhich if I press print, It should save it as pdf file and if I press preview button, it should get print preview. I execute it through VF31. If I press preview preview comes, but when I come back and press print, pdf save as window doesn't come. The reason is the previous job(preview) is not getting committed and If I go in debug and if I delay the execution, it works properly.
For that after preview I wrote 'commit work' statement which gives proper result. But I should not use commit work, as it may update some other data while executing in background and all. Can u sujjest any other solution for this. Should the process commitment be indicated in any of the printing form function module parameter.
my FM call is
CALL FUNCTION lf_fm_name
EXPORTING
ARCHIVE_INDEX = toa_dara
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS = arc_params
control_parameters = l_ctrl
MAIL_APPL_OBJ =
MAIL_RECIPIENT = ls_recipient
MAIL_SENDER = ls_sender
output_options = l_device
user_settings = space
is_bil_invoice = ls_bil_invoice
IS_NAST = nast
is_repeat = repeat
w_total1 = l_total
IMPORTING
document_output_info = l_document_output_info
job_output_info = l_job_output_info
job_output_options = l_job_output_options
TABLES
t_rebate = t_rebate
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.
error handling
cf_retcode = sy-subrc.
PERFORM protocol_update.
get SmartForm protocoll and store it in the NAST protocoll
PERFORM add_smfrm_prot.
ENDIF.
Should I change any exporting parameter in this smartform call and can I get it?
Regards,
Venkat
Hi
you need to check if the previous job has commited or not before printing new one
check for options like savepoint timeout value
check this link
http://www.sapdb.org/7.4/htmhelp/79/f47a4b66e3004ea5049ecca129a813/frameset.htm
2009 Feb 10 7:00 AM
Hi
you need to check if the previous job has commited or not before printing new one
check for options like savepoint timeout value
check this link
http://www.sapdb.org/7.4/htmhelp/79/f47a4b66e3004ea5049ecca129a813/frameset.htm
2009 Feb 23 9:10 AM
I tried with "wait up to 0 seconds" and the database fot committed without using "commit work"
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |