on 03-09-2011 6:22 AM
Hi All,
I am calling SF from WD, i created IF ui element and in wddoinit method use some coding to call SF..
using CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' and
CALL FUNCTION 'CONVERT_OTF' .
Now my doubt is... Original smartform contains some selection screen for inputing values.
In wd i have to create this input screen or any other way is there to pass input values? Please help.
Thanks,
venkat.
Hi all,
I am using below code getting error..Incorrect parameter with CALL FUNCTION.
error is coming at.. CALL FUNCTION fm_name
My code is:
DATA: node_pdf_data TYPE REF TO if_wd_context_node,
fm_name TYPE rs38l_fnam,
outop TYPE ssfcompop,
cparam TYPE ssfctrlop,
tab_otf_data TYPE ssfcrescl,
tab_otf_final TYPE TABLE OF itcoo,
bin_filesize TYPE i,
bin_file TYPE xstring,
pdf_tab TYPE TABLE OF tline.
" Get function module name for smart form
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFSD_WTY_PICKLIST'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
" Get Report Format With Data From Smart Form
outop-tdprinter = 'LP01'.
outop-tddest = 'LP01'.
cparam-no_dialog = 'X' .
cparam-preview = 'X'.
cparam-getotf = 'X'.
CALL FUNCTION fm_name
EXPORTING
control_parameters = cparam
output_options = outop
user_settings = space
IMPORTING
job_output_info = tab_otf_data
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
" Get all data of Smartform
tab_otf_final[] = tab_otf_data-otfdata[].
" Convert OTF data into PDF data
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = bin_filesize
bin_file = bin_file
TABLES
otf = tab_otf_final
lines = pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
" Set PDF Data to context attribute
node_pdf_data = wd_context->get_child_node( name = 'PDF_SOURCE' ).
CALL METHOD node_pdf_data->set_attribute
EXPORTING
value = bin_file
name = 'SOURCE'.
Thanks,
Venkat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My proposition would be to use generated by smartform function module instead of this general approach. So delete calling SSF_FUNCTION_MODULE_NAME along with this dynamic CALL FUNCTION fm_name and then call generated function module directly. You can find its name under Environment->Function Module Name. Here you can pass all parameters for your smartforms.
[http://pokazywarka.pl/29t6nz/]
Best regards
Marcin Cholewczuk
Hi venkat,
What do you mean by "Original smartform contains some selection screen for inputing values"? I'm not smartform expert, but I don't recall any selection screens for smartforms or do you mean Form interface in Global settings (for which you input data directly when you call smartform function module)?
Best regards
Marcin Cholewczuk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.