on 01-09-2007 12:32 PM
Hi everyone,
I need to sign a receipt that will be sent by e-mail. The form is non-interactive, it´s only a simple receipt. This form may be printed or sent by e-mail; in case of being sent it must be signed before sending it. The receiver should be able to open it using Adobe Reader.
I´ve read other posts/help about singatures in Adobe Forms, but none of them of non-interactive forms; I need to know if it is possible to do this if the form is not interactive, and how it can be done.
Thanks!
Pablo
Hi Pablo,
if you want to sign the PDF before sending it (an action called certification of a form, which would be on done the server), you will essentially turn your non-interactive form into an interactive one. Every signature to be applied, whether by an end user on the frontend or by the server, requires a signature field, which by definition is an interactive field. In the case of a server-side signature, it would usually be an invisible field.
Using an interactive field on a form would have an effect on the licensing of the solution (in custom scenarios, the Adobe-based forms solution requires a separate license to be purchased through SAP).
Best regards,
Markus Meisl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Markus...
Now, in that case, is it possible to sign the document automatically without any action from the user?
In my case, when the user decides to send the receipt by e-mail, how can I make the system to sign the document automatically? I need the document to be signed without any action from the user.
Best Regards,
Pablo
Yes, you can, if you create the necessary application logic (there is no standard NetWeaver mechanism to do this). Read the section in the documentation: <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/18/ecb69017ad4765855425b97f666470/frameset.htm">Digital Signatures and Certification in Forms</a>
Best.
Markus
Yes, I´ve read that already... but it doesn´t explain how to sign the document; there is no clear explanation of the technical way to do so.
Should I call a function inside my program before sending the document? Or just by inserting a signature field the document will be signed automatically? I know that there must be something missing... but I just can´t find it in the HELP from ADS.
Do you know how to do this? Con you send me an example or a link with a more detailed description?
I have also read the way to do it with SSF, but I understand that I don´t have to use SSF for ADS... is this correct?
Thank you very much!
Pablo
Hi Pablo
the link I provided is the only documentation available on the topic. I am not aware of any comprehensive examples apart from the corresponding FP* program, which is a NetWeaver program, not an application one. No SAP application ships processes using this technology at this point.
You do not need SSF for signing with the Adobe-based solution.
On a high level (and I have no more details): You need to place a signature field on the form. You need to set up a Public Key Infrastructure with certificates (see general Security documentation). You need to write a program that generates the form, then calls the server, which signs the form with its default certificate on the generated form, then attaches the signed PDF to a mail (sent through, for example, the Business Communcation Services of SAP NetWeaver AS.
Best
Markus
Hi Jinal,
Here it goes:
report fp_pdf_test_07.
* set signature
class cl_fp definition load.
selection-screen begin of block s_files with frame title text-100.
parameters: p_pdf(64) type c lower case obligatory,
p_out(64) type c lower case obligatory.
selection-screen end of block s_files.
selection-screen begin of block s_conn with frame title text-101.
parameters: p_dest type rfcdest default 'ADS' obligatory.
selection-screen end of block s_conn.
selection-screen begin of block s_sig with frame title text-102.
parameters: s_key(64) type c lower case,
s_field(64) type c lower case,
s_reason(64) type c lower case,
s_loc(64) type c lower case,
s_cinfo(64) type c lower case.
selection-screen end of block s_sig.
types: ty_raw(255) type x,
ty_tab type standard table of ty_raw.
data: l_filename_pdf type string,
l_filename_out type string,
l_fp type ref to if_fp,
l_pdfobj type ref to if_fp_pdf_object,
l_pdf type xstring,
l_out type xstring,
l_fpex type ref to cx_fp_runtime.
l_filename_pdf = p_pdf.
l_filename_out = p_out.
perform load_file using l_filename_pdf
changing l_pdf.
* get FP reference
l_fp = cl_fp=>get_reference( ).
try.
* create PDF Object
l_pdfobj = l_fp->create_pdf_object( connection = p_dest ).
* set document
call method l_pdfobj->set_document
exporting
pdfdata = l_pdf.
* set signature
call method l_pdfobj->set_signature
exporting
keyname = s_key
fieldname = s_field
reason = s_reason
location = s_loc
contactinfo = s_cinfo.
* execute, call ADS
call method l_pdfobj->execute( ).
* get result -> l_out
call method l_pdfobj->get_document
importing
pdfdata = l_out.
catch cx_fp_runtime_internal into l_fpex.
perform error using l_fpex 'INTERNAL ERROR'.
catch cx_fp_runtime_system into l_fpex.
perform error using l_fpex 'SYSTEM ERROR'.
catch cx_fp_runtime_usage into l_fpex.
perform error using l_fpex 'USAGE ERROR'.
endtry.
check l_fpex is initial.
* download PDF
data: l_len type i,
l_tab type tsfixml.
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = l_out
importing
output_length = l_len
tables
binary_tab = l_tab.
call method cl_gui_frontend_services=>gui_download
exporting
bin_filesize = l_len
filename = l_filename_out
filetype = 'BIN'
changing
data_tab = l_tab
exceptions
others = 1.
if sy-subrc = 0.
write:/ 'Datei erfolgreich geschrieben'(001).
else.
write:/ 'Fehler beim Schreiben der Datei'(002).
endif.
form error using p_fpex type ref to cx_fp_runtime
p_str type string.
data: l_errcode type i,
l_errmsg type string,
l_string type string.
write:/ '***************************************************'.
write:/ '***', p_str.
write:/ '***************************************************'.
skip 2.
call method p_fpex->get_errall
importing
errcode = l_errcode
errmsg = l_errmsg.
write:/ 'ERROR CODE : ', l_errcode.
write:/ 'ERROR MESSAGE : ', l_errmsg.
l_string = p_fpex->get_text( ).
write:/ l_string.
endform.
form load_file using p_filename type string
changing p_content type xstring.
data: l_rawtab type ty_tab,
l_len type i.
call method cl_gui_frontend_services=>gui_upload
exporting
filename = p_filename
filetype = 'BIN'
importing
filelength = l_len
changing
data_tab = l_rawtab
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
others = 19.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
perform convert_tab_to_x using l_rawtab l_len
changing p_content.
endform.
form convert_tab_to_x using p_rawtab type ty_tab
p_len type i
changing p_xstr type xstring.
data: l_line type ty_raw,
l_count type i,
l_len type i,
l_rest type i.
describe table p_rawtab lines l_count.
loop at p_rawtab into l_line.
if sy-tabix = l_count.
l_rest = p_len - l_len.
concatenate p_xstr l_line(l_rest) into p_xstr in byte mode.
else.
concatenate p_xstr l_line into p_xstr in byte mode.
add 255 to l_len.
endif.
endloop.
endform.
Good Luck!
Pablo
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Pablo,
I know that this is an old post. But I have to do the same thing that you did.
Do you remember the solution that you applied?
thank you,
Pasquale.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please anyone can help me include automatically (in the server-side) digital signature in pdf Forms (using the Adobe Document Service). I know this is possible but I cant find any documentation about the system configuration.
thanks
Nuno Abrantes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.