on 04-19-2010 1:02 PM
Hi ,
To display smart form as PDF , I am following the SDN article :
In my component , I have created the view VIEW_PDF, for this . I have created Adobe interactive UI element, and bind the property source to the attribute (XSTRING) where I will get PDF (after OTF conversion).
First of all I am using the FM SSF_FUNCTION_MODULE_NAME and usingf the import parameter fm_name .
Then using this FM
CALL FUNCTION lv_fm_name
EXPORTING
OUTPUT_OPTIONS = lwa_output_options
GW_VENREQDAT = lwa_venreqdat
GW_REQHEADER = lwa_venreqhdr
IMPORTING
JOB_OUTPUT_INFO = lv_ssf_output.
from smart form ZVM_SFM_SUMMARY,I want to get the data in OTF format using the importing parameter JOB_OUTPUT_INFO of the above FM.
But I am not able to retrieve the data .Please direct me , where am I missing?
For converting it to PDF , I am using the FM CONVERT_OTF .
regards,
amit
You may continue like this there after...
call function w_fmodule
exporting
control_parameters = w_cparam
output_options = w_outoptions ":lv_output_options
user_settings = ' '
importing
job_output_info = t_otf_from_fm
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.
t_otf[] = t_otf_from_fm-otfdata[].
call function 'SSFCOMP_PDF_PREVIEW'
exporting
i_otf = t_otf
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.
clear: pdf_data, pdf_size.
call function 'CONVERT_OTF'
exporting
format = 'PDF'
* max_linewidth = 132
importing
bin_filesize = pdf_size
bin_file = pdf_data
tables
otf = t_otf[]
lines = l_dummy
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 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.
data lv_source like ls_pdf-source.
* navigate from <CONTEXT> to <PDF> via lead selection
lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
* get element via lead selection
lo_el_pdf = lo_nd_pdf->get_element( ).
* get single attribute
lo_el_pdf->set_attribute(
exporting
name = `SOURCE`
value = pdf_data ).
Regards
Gopi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I may misunderstand, (edit - yes I did! - read the article - previous comment not valid).
Hmmm - will think more....
Chris
Edited by: Chris Paine on Apr 20, 2010 12:14 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.