on 07-01-2010 6:05 AM
Hi all:
When I run the program to dispaly pdf transformed from smartform,
the IE explorer is busy dead, have you ever met the same problem?
thank you very much
Do a trace and find out which part of the code is taking too much time. Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys:
thank you very much for reply, there is an exception indeed, when calling the following function SSFCOMP_PDF_PREVIEW,
there is an exception----
CNTL_ERROR = 2 -
" Control Framework: Fatal error - GUI cannot be reached ". I can see the preview but soon IE would busy dead, could you please tell me how to solve it ?
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
EXPORTING
I_OTF = LT_OTFDATA
EXCEPTIONS
CONVERT_OTF_TO_PDF_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
You are using a GUI specific method - SSFCOMP_PDF_PREVIEW - which you cannot do in WDA!
Have a quick search please - there have been many many posts on how to serve a PDF to a user from WDA. (even some dating back from 2006!)
but in general - to output to the user a PDF that you have created the easiest method is to use the:
cl_wd_runtime_services=>attach_file_to_response method
to send the PDF to the user.
thank you very much ,actually I am following the below link to do this.
Interesting!
the article would appear to be wrong!
You don't need to call this FM at all - indeed - as it is only called with exporting parameters it is not going to change your form at all!
in the code:
lt_otfdata[] = lv_ssf_output-otfdata[].
call function 'SSFCOMP_PDF_PREVIEW'
exporting
i_otf = lt_otfdata
exceptions
convert_otf_to_pdf_error = 1
cntl_error = 2
others = 3.
.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
data: l_dummy type standard table of tline,
pdf_data type xstring,
pdf_size type i.
remove the section:
call function 'SSFCOMP_PDF_PREVIEW'
exporting
i_otf = lt_otfdata
exceptions
convert_otf_to_pdf_error = 1
cntl_error = 2
others = 3.
.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
hopefully you can now generate your PDF.
Let us know if you have any further problems.
Chris
Hi,
What is the size of the pdf getting generated out of the smartform? You may face this issue when the size of pdf is large and
takes time to get downloaded. This should not be an issue with the code. Try waiting for sometime and check if it gets loaded.
Regards,
Sagar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry for not explaining it clearly, the data to be diplayed is an internal table with only four lines, I think maybe PDF's size is big even data transfered to it is not so much. how to concol the size of the file of PDF. for example, the picture of BMP type is big,
but jpg type of the same picture is much less big. I am not sure the comparision here is plausible.
***********************
You may face this issue when the size of pdf is large and takes time to get downloaded
************************
Edited by: jingying Sony on Jul 1, 2010 4:20 PM
sorry for not explaining it clearly, the data to be diplayed is an internal table with only four lines, I think maybe PDF's size is big even data transfered to it is not so much. how to concol the size of the file of PDF. for example, the picture of BMP type is big,
but jpg type of the same picture is much less big. I am not sure the comparision here is plausible.
***********************
You may face this issue when the size of pdf is large and takes time to get downloaded
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.