Send Adobe form as PDF via E-mail
Hi,
I am doing one interacive adobe form where i need to send that filled form in PDF format via email.
I tried using below options but unfortunately its not working:
1.I used "Email Submit Button" but its sending attachment as XML which I dont want.
when reffred threads on this problem , they suggested to go to XML VIEW of this button and change SUBMIT FORMAT to "pdf" from "xml".... but in this case , that button is not working at all.
2.I used below solution
Use a regular form button: Place a regular form button on your form . Look on the Object Window for the button. On the Field tag, towards the bottom will be a set of "Control Type" radio buttons. Select the "submit" option. There should now be a "submit" tab in the Object window. Switch to the tab and on the "Submit As" pulldown select PDF. But this is also not working.
Your comments are helpful for me.
Hi,
Get your form data in XML format from Interface. There are some standard classes available to convert the XML to PDF and sending mail.
Thanks,
Revanth Naidu
Similar Messages
-
When I share a pages document as a PDF (via e-mail) all the pictures change from the original document, most are missing with just a few of them repeated in the spots where others had been. How do I do this without the document changing?
I need to be able to send it to a PC in order to print it.Hard to say what is happening without examining the file.
If you like click on my blue name and email me both the .pages file and the the .pdf you have made from it.
Peter
ps It would help to say what version of Pages you are using and on what you are running it. iOS or Mac and what version. -
hi Experts
I need send Adobe Form as attachment
this is part of my prog. ******************
TRY.
lr_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
CATCH cx_send_req_bcs INTO lr_send_req_bcs.
ENDTRY.
COMMIT WORK.
but after execute I get Error(Dump):
*Calling a COMMIT WORK in an update process is not allowed*
*because the function modules triggered in a Logical Unit*
*of Work cannot then be processed correctly.*
I tried to use UpdateFunction(call function in update task), but in this case I get Empty PDF File .
How can I solve this problem?
Thanks,
LarissaYou want to commit to send the email. But the commit is not allowed in the update task. That is not Adobe-related problem in my opinion. Maybe you should ask the question in ABAP general? And about that "blank" pdf... is that a problem with PDF printing? That means GETPDF = 'X' not working? Or what is your adobe related problem?
Regards Otto -
Acrobat Reader
Why can I no longer fill in additional information on my adobe forms on pdf. At one time you could insert an icon that would allow you to type in additional information. It will only allow me to put in limited information?Not a lot of information. Can you post a link to a sample of the form so others can see the how the form does not work.
-
Problem opening Form based PDF via Safari browser with Adobe Reader 9.3 on MAC
Hi,
I'm mentioning below the problem that we are facing when we open a form based PDF created using a licensed version of Adobe Livecycle Designer ES (Version 8.2.1.4029.1.523496) on a MAC machine through a Safari Browser.
We tested this PDF form on a windows machine and the PDF opens in an IE browser via the latest Adobe reader 9.3 without any problem. I then received complaints by our clients that they were unable to open the same PDF on their Safari browser on a MAC machine, I tried to resolve the problem by downloading the latest version of Adobe Reader 9.3 for MAC but noticed that the Safari browser window would just keep refreshing the page without displaying the PDF at all. I then uninstalled the Adobe Reader 9.3 version and downloaded and installed an older version i.e., Abobe Reader 8.2 version for MAC and noticed that the PDF document successfully opened in the Safari browser. My question is why does a form based PDF work with an older version of Adobe Reader for MAC and not with the latest version? Our clients are not comfortable with the fact that we are refraining them from upgrading to the latest version of Adobe Reader for MAC and that they would have to downgrade their existing Adobe Reader 9.3 to a lower version Adobe Reader 8.2 in order for the PDF forms to work when it should be the other way around.
Is there any fix or a patch that is currently being worked on that would resolve this issue in the latest Adobe Reader for MAC? If yes then when would it be ready? This issue is quite critical for our business and would appreciate it if this would be looked into with high priority.
Thanks and Regards,
Sheikh Huraiz Ahmed.That suggestion makes sense and likely works, but only if the user is on a machine that will allow them to use Reader. I'm sending this out to a lot of teachers, who are using machines either at school, or are school-issued machines, and they don't have the admin privileges to install software-- even Reader.
so my problem is, if they are stuck on a machine without Reader, and without the possibility of having Reader... it's just not going to work because Preview can't handle these functions.
And, since that is not an acceptable answer with what I'm trying to do... I will find another way to create/submit forms. I think there are some online possibilities I will have to make work.
very, very disappointing and frustrating.
Kristi -
How to send adobe form output in mail as a attachment
i am get the adobe form output
how to attach in a mail ....
Regards
Anbu Bmy program is like this.............
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'YHRIN_WELCOME'
IMPORTING
e_funcname = lv_funcname
gs_output-nodialog = 'X'.
gs_output-preview = 'X'.
gs_output-getpdl = 'X'.
gs_output-getpdf = 'X'.
gs_output-dest = 'LP01'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = gs_output
EXCEPTIONS
CANCEL = 1
USAGE_ERROR = 2
SYSTEM_ERROR = 3
INTERNAL_ERROR = 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 : gs_outputpara TYPE sfpdocparams.
DATA : ls_return TYPE fpformoutput .
gs_outputpara-langu = 'E'.
gs_outputpara-country = 'IN'.
CALL FUNCTION lv_funcname
EXPORTING
/1bcdwb/docparams = gs_outputpara
wa_data = wa_mail
IMPORTING
/1bcdwb/formoutput = ls_return
EXCEPTIONS
OTHERS = 1.
DATA lv_output TYPE sdokcntbins WITH HEADER LINE.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = ls_return-pdf "PDF file from function module
TABLES
binary_tab = lv_output .
*DATA : result TYPE sfpjoboutput WITH HEADER LINE .
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
e_result = result
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 : iv_len_in LIKE sood-objlen,
it_tline TYPE TABLE OF tline WITH HEADER LINE.
PERFORM pdf_file.
DATA: lt_imessage TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
lt_iattach TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
lt_ipacking_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
lt_ireceivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
lt_iattachment LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA : lt_record LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA : it_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: lv_email TYPE somlreci1-receiver
VALUE 'anbu.'.
PERFORM build_xls_data .
APPEND lt_iattach.
Populate message body text
CLEAR lt_imessage. REFRESH lt_imessage.
lt_imessage = 'Please find attached PDF file'.
APPEND lt_imessage.
Send file by email as .xls speadsheet
PERFORM send_email_with_xls TABLES lt_imessage
lt_iattach
USING lv_email
'PDF Attachment of an Employee'
'PDF'
'TestFileName'
'Employee Detail'.
Form BUILD_XLS_DATA
FORM build_xls_data .
DATA :lv_buffer TYPE string.
Convert PDF from 132 to 255.
LOOP AT it_tline.
Replacing space by ~
TRANSLATE it_tline USING ' ~'.
CONCATENATE lv_buffer it_tline INTO lv_buffer.
ENDLOOP.
replacing ~ by space
TRANSLATE lv_buffer USING '~'.
DO.
lt_record = lv_buffer.
Appending 255 characters as a record
APPEND lt_record.
SHIFT lv_buffer LEFT BY 255 PLACES.
IF lv_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
lt_iattach[] = lt_record[].
ENDFORM.
Form SEND_EMAIL_WITH_XLS
FORM send_email_with_xls TABLES pit_message
pit_attach
USING p_email
p_mtitle
p_format
p_filename
p_attdescription.
DATA: es_xdocdata LIKE sodocchgi1,
lv_xcnt TYPE i.
Fill the document data.
es_xdocdata-doc_size = 1.
Populate the subject/generic message attributes
es_xdocdata-obj_langu = sy-langu .
es_xdocdata-obj_name = 'SAPRPT' .
es_xdocdata-obj_descr = p_mtitle .
Fill the document data and get size of attachment
CLEAR es_xdocdata.
READ TABLE lt_iattach INDEX lv_xcnt.
es_xdocdata-doc_size =
( lv_xcnt - 1 ) * 255 + STRLEN( lt_iattach ).
es_xdocdata-obj_langu = sy-langu.
es_xdocdata-obj_name = 'SAPRPT'.
es_xdocdata-obj_descr = p_mtitle.
CLEAR lt_iattachment. REFRESH lt_iattachment.
lt_iattachment[] = pit_attach[].
Describe the body of the message
CLEAR lt_ipacking_list. REFRESH lt_ipacking_list.
lt_ipacking_list-transf_bin = space.
lt_ipacking_list-head_start = 1.
lt_ipacking_list-head_num = 0.
lt_ipacking_list-body_start = 1.
DESCRIBE TABLE lt_imessage LINES lt_ipacking_list-body_num.
lt_ipacking_list-doc_type = 'RAW'.
APPEND lt_ipacking_list.
Create attachment notification
lt_ipacking_list-transf_bin = 'X'.
lt_ipacking_list-head_start = 1.
lt_ipacking_list-head_num = 1.
lt_ipacking_list-body_start = 1.
DESCRIBE TABLE lt_iattachment LINES lt_ipacking_list-body_num.
lt_ipacking_list-doc_type = p_format.
lt_ipacking_list-obj_descr = p_attdescription.
lt_ipacking_list-obj_name = p_filename.
lt_ipacking_list-doc_size = lt_ipacking_list-body_num * 255.
APPEND lt_ipacking_list.
Add the recipients email address
CLEAR lt_ireceivers. REFRESH lt_ireceivers.
lt_ireceivers-receiver = p_email.
lt_ireceivers-rec_type = 'U'.
lt_ireceivers-com_type = 'INT'.
lt_ireceivers-notif_del = 'X'.
lt_ireceivers-notif_ndel = 'X'.
APPEND lt_ireceivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = es_xdocdata
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = lt_ipacking_list
contents_bin = lt_iattachment
CONTENTS_HEX = lv_output
contents_txt = lt_imessage
receivers = lt_ireceivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = '' AND RETURN.
ENDFORM. -
Sending Adobe form in perzonalized mail forms
Hi
I created a personalized mail form and I want to send the Adobe PDF form of the contract to the customer along with the personalized mail forms.
I know how to send a personalized mail form, but not sure how do we attach the generate the PDF and attach it to mail form through actions.
Regards,
Deepthi.Hi Bhargavi,
In your action method first get the FM name for your Adobe form using
fp_function_module_name.
Then you need to call Adobe form FM.Importing lv_formoutput.
Then you need to call bcs interface. sample logic
lcl_send_request - cl_bcs=>create_persistent( ).
lv_pdfsize = zstrlen( lv_formoutput-pdf ).
lt_pdfcontent = cl_document_bcs=>xstring_to_solix( ip_xstring = lv_formoutput-pdf ).
append the mail body to lt_text.
append mail subject to ls_subject.
then
lcl_document = cl_document_bcs=>create_document( i_type = 'RAW'
i_text = lt_text
i_length = '25'
i_subject = ls_subject ).
atach pdf to mail using
call method lcl_document->add_attachment
exporting
i_attachment_type = 'PDF'
i_attachment_subject = ls_mail_sub
i_attachment_size = lv_pdf_size
i_att_content_hex = lt_pdf_content.
lcl_send_request->set_documnt( lcl_document ).
lcl_receipient = cl_cam_address_bcs=>create_internet_address( i_address_string = email id ).
lcl_send_request->add_recipient( i_recipient = lcl_recipient ).
lcl_sender = cl_cam_address_bcs=>create_internet_address( i_address_string = sender email id ).
lcl_send_request->set_sender( i_sender = lcl_sender ).
lv_sent_to_all = lcl_send_request->send( i_with_error_screen = 'x' ).
commit work.
Regards,
Tejaswini P. -
Saving and sending Adobe Form pdf from WebDynpro
Hi,
I'm developing an application which receives data from a RFC to a R/3. The datas are displayed on a pdf-Document in a Webdynpro. This works fine.
Now I want to send this form as attachment in an email. Do I have to save it first as pdf or can I send it directly?
On SapHelp I found a tutorial how to save a form as pdf:
http://help.sap.com/saphelp_nw04/helpdata/en/dc/f1783fe3263042e10000000a114084/frameset.htm
I tried out the describtion but without success. I defined an action on the view where the form should be displayed and added the coding in the implementation of the event. In the form I added a button Submit to SAP from the Web Dynpro Library. When I press the button, nothing happens. Do I have to make any changes under Object->Field->Control Type?
Another question about the coding:
public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionsubmit(ServerEvent)
IPrivateResultView.IContextElement contextElement =
wdContext.currentContextElement();
byte[] bytes = contextElement.getPdfSource();
try {
File file = new File("C:
temp
example.pdf");
FileOutputStream os = new FileOutputStream(file);
os.write(bytes);
os.close();
} catch (IOException e) {
// do something
e.printStackTrace();
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"You have pressed Submit!");
//@@end
The path where the pdf shall be saved is "C:
temp
example.pdf", I expected something like "C:\temp\example.pdf" on a windows machine.
Where will the pdf be saved? On the machine i deployed the application (what about rights for saving) to or localy on the machine I start the app?
Does anyone knows how to send the pdf by email when saving the form or knows a helpful tutorial?
Many thanks for your help
Mathias LangeHi all,
doing Tutorial 31 from SDN (Interactive Forms using E-Mail) I have a problem with the entries for the smtp-host in the coding.
I always get the error message:
Sending failed; nested exception is: com.sap.engine.services.javamail.exception.JavaMailMessagingException: Cannot send message to host xxx:25 using the SMTP protocol.
//@@begin onActionSendForm(ServerEvent)
Properties props = new Properties();
String host = "xxx";
props.put("mail.smtp.host", host);
In host I entered the entrie for the smtp i use in Outlook, where it works fine. In the Tutorial i get the errormessage.
I have an smtp-server from our company with which it works too, but it is not the smtp used by Outlook.
And i can't use this smtp at my customers.
Could it be a problem with the used ports or a needed authentication? In the Tutorial is no coding for this.
Does anyone use a freemailer for this tutorial and have success with the smtp of this freemailer?
Kind Regards
Mathias
Message was edited by: Mathias Lange -
Send Adobe form as email attachment
Hello Experts,
Recently iu2019m facing a problem regarding Adobe form PDF attachment and sending an e-mail along with the PDF attachment to customer mail id.But when i execute the RFC Function module, in customer side no mail is comming. And when i check the transaction SBWP then i found that the PDF attachment hold only 1KB of data which is not right.For that iu2019m sending my code which i was declared in my program.Can anybody Please help me to overcome this problem?
FORM print_form USING p_disp TYPE char1
drb_mail TYPE char1
p_email LIKE itcpo-tdcovtitle
p_email1 LIKE itcpo-tdcovtitle.
DATA ds_recipient TYPE swotobjid.
CLEAR: dg_funcnam, dg_outputparams.
*--Call generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = c_form
IMPORTING
e_funcname = dg_funcnam.
dg_outputparams-nodialog = 'X'.
dg_outputparams-getpdf = 'X'.
Job Open for PDF
CALL FUNCTION 'FPCOMP_JOB_OPEN'
CHANGING
ie_outpar = dg_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
dg_docparams-langu = 'X'.
dg_docparams-country = 'US'.
dg_docparams-fillable = 'X'.
form CONVERT_PDF_BINARY .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = FP_FORMOUTPUT-PDF
APPEND_TO_TABLE = ' '
IMPORTING
OUTPUT_LENGTH =
TABLES
BINARY_TAB = t_att_content_hex .
endform. " CONVERT_PDF_BINARY
*& Form MAIL_ATTACHMENT
text
--> p1 text
<-- p2 text
form MAIL_ATTACHMENT USING p_email LIKE itcpo-tdcovtitle
p_email1 LIKE itcpo-tdcovtitle.
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
Message body and subject
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL,
lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear,' TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Please fill the attached form and send it back to us.'
TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Thank You,' TO lt_message_body. lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Personnel Information Form' ).
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL. TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'Personnel Information Form'
I_ATTACHMENT_SIZE =
I_ATTACHMENT_LANGUAGE = SPACE
I_ATT_CONTENT_TEXT =
I_ATTACHMENT_HEADER =
i_att_content_hex = t_att_content_hex ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
Add attachment
Pass the document to send request
lo_send_request->set_document( lo_document )."* Create sender
DATA:
lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
l_send type ADR6-SMTP_ADDR value ' here mail id '.
l_send = P_email.
l_send = P_email1.
lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_sender = cl_sapuser_bcs=>create( sy-uname ).
Set sender
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender )." Create recipient
DATA:
lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
Set recipient
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).* Send email
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
message 'The Personnel Information form has been emailed to the Employee' type 'I'.
endform. " MAIL_ATTACHMENT
*--Call Function module
CALL FUNCTION dg_funcnam
EXPORTING
/1bcdwb/docparams = dg_docparams
im_logo = dg_logo
im_user_address = dt_user_address
im_ship_to_addr = dt_imp_data
im_text = ds_text
im_sales_text = dt_sales_text
im_item_data = dt_item_data
IMPORTING
/1BCDWB/FORMOUTPUT = FP_FORMOUTPUT
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'FPCOMP_JOB_CLOSE'
IMPORTING
e_jobresult = l_result
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
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 : dl_msg TYPE string.
CONCATENATE 'Successfully mailed to' p_email p_email1 INTO dl_msg SEPARATED BY space.
IF drb_mail = 'X'.
COMMIT WORK.
MESSAGE dl_msg TYPE 'I' .
MESSAGE i000 WITH 'Successfully mailed to' p_email1.
ENDIF.
ENDFORM. "print_form
Could you please any body help me, it's very uregent issue.
Regards
Sandeep*& Report ZGB_ATTACHMENT
REPORT zgb_attachment.
DATA:
l_formname TYPE fpname VALUE 'ZGB_ATTACHMENT',
l_fm_name TYPE rs38l_fnam,
fp_outputparams TYPE sfpoutputparams,
fp_docparams TYPE sfpdocparams,
fp_formoutput TYPE fpformoutput.
DATA:
t_att_content_hex TYPE solix_tab.
PARAMETERS: p_pernr TYPE persno.
START-OF-SELECTION.
PERFORM get_function_module.
PERFORM create_document.
PERFORM convert_pdf_to_binary.
PERFORM mail_attachment.
*& Form GET_FUNCTION_MODULE
* text
* --> p1 text
* <-- p2 text
FORM get_function_module .
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = l_formname
IMPORTING
e_funcname = l_fm_name
* E_INTERFACE_TYPE =
* EV_FUNCNAME_INBOUND =
ENDFORM. " GET_FUNCTION_MODULE
*& Form CREATE_DOCUMENT
* text
* --> p1 text
* <-- p2 text
FORM create_document .
*JOB OPEN
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
fp_docparams-langu = 'X'.
fp_docparams-country = 'US'.
fp_docparams-fillable = 'X'.
CALL FUNCTION l_fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
pernr = p_pernr
IMPORTING
/1bcdwb/formoutput = fp_formoutput
* EXCEPTIONS
* USAGE_ERROR = 1
* SYSTEM_ERROR = 2
* INTERNAL_ERROR = 3
* OTHERS = 4
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
*JOB CLOSE
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* e_result =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDFORM. " CREATE_DOCUMENT
*& Form CONVERT_PDF_TO_BINARY
* text
* --> p1 text
* <-- p2 text
FORM convert_pdf_to_binary .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = fp_formoutput-pdf
* APPEND_TO_TABLE = ' '
* IMPORTING
* OUTPUT_LENGTH =
TABLES
binary_tab = t_att_content_hex
ENDFORM. " CONVERT_PDF_TO_BINARY
*& Form MAIL_ATTACHMENT
FORM mail_attachment .
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
* Message body and subject
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL,
lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear,' TO lt_message_body.
APPEND ' ' TO lt_message_body.
APPEND 'Please fill the attached form and send it back to us.'
TO lt_message_body.
APPEND ' ' TO lt_message_body.
APPEND 'Thank You,' TO lt_message_body.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Personnel Information Form' ).
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'Personnel Information Form'
* I_ATTACHMENT_SIZE =
* I_ATTACHMENT_LANGUAGE = SPACE
* I_ATT_CONTENT_TEXT =
* I_ATTACHMENT_HEADER =
i_att_content_hex = t_att_content_hex ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
* Add attachment
* Pass the document to send request
lo_send_request->set_document( lo_document ).
* Create sender
DATA:
lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
l_send TYPE adr6-smtp_addr VALUE '[email protected]'.
* lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_sender = cl_sapuser_bcs=>create( sy-uname ).
* Set sender
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
* Create recipient
DATA:
lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
* lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
** Set recipient
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
* lo_send_request->add_recipient(
* EXPORTING
* i_recipient = lo_recipient
* i_express = 'X' ).
* Send email
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
MESSAGE 'The Personnel Information form has been emailed to the Employee' TYPE 'I'.
ENDFORM. " MAIL_ATTACHMENT -
Send fillable form as PDF file
Hello,
I created a fillable PDF document using Adobe Acrobat XI Pro for MAC and at the bottom of the form, I added a button to send the form. This form is being filled out by employes using Adobe Acrobat Reader. They must fill out the form and click on send to have the form sent out to the proper email address.
As "Button properties", I went into the ACTION tab and set it up the following way:
SELECT TRIGGER: Mouse Up
SELECT ACTION: Submit a form
In the SUBMIT A FORM properties, I set everything up this way:
ENTER URL FOR THIS LINK: mailto:[email protected]
EXPORT FORMAT: PDF The complete document
The problem I am having is when the form is filled out by the employes, they get an error message saying it cannot be sent. I searched the web and found out that Acrobat Reader cannot send fillable PDF forms. I tried changing the EXPORT FORMAT option to FDF, HTML or XFDF but none of them worked...
I'm sure there is a way to setup my form to send it (once filled out) using acrobat reader but I can find how to do that. Any suggestions?
Thanks in advance for your time !When a user opens the file in Acrobat Reader, they can fill it out and print it no problems. However, if they wish to send it via email, this is not possible. I looked on Google and found out that I must save the fillable PDF using "File > Save As > Reader Extended PDF > Enable Adding Text In Documents" but this option doesn't seem to be available in the MAC version of Adobe Pro...
I'm a bit lost now... -
Adobe Forms - Page Break via a Conditional Break
Having read through the forum I am getting the impression that Page Breaks is a bit of a problem.
I can enforce a page break between datasets by setting "After:" to "Goto Next Page", on the Object->Pagination tab, however this results in a blank page at the end of the entire output which is just the Master Page with all the static elements.
The 'Conditional Breaks' sounds like the logical point to force a page break based on a combination of inequality or if a particular data element equals a known value.
However, I don't seem to be able to get the 'Conditional Break' to work.
So, the question I would like to ask, is how can you tell if the conditional break logic is correct and whether or not it is running? For example on an ABAP system is it possible to run it and debug it?
My attempts at getting the break to open a pop up or write to disk via JavaScript fails, which is leading me to think they are being ignored by the Adobe Form at both the server and client level.
Is it possible that I have missed another setting somewhere else in the Adobe form configuration?Hello Jason!
You are right that conditions (and all scripting) are bit tricky in this solution. Still they work.
Debugging of AIF at ABAP side is not possible due to the architecture of the solution - from the ABAP POV it is just a web-service call and receiving result (PDF) back. You can't stop it on midpoint or intercept it somehow.
At the same time there are other ways to check it.
First, you can enable trace and saving additional info in SFP transaction under Utilities -> Settings.
Details see [here|http://help.sap.com/saphelp_nw70/helpdata/EN/f7/a04aee0cb94978a011401311efe603/frameset.htm]
And the nice way to check if your condition block is taken into the account is simple check like 1 = 2.
If this works and you receive page break than all you need is find errors in your condition syntax, otherwise the problem is somewhere else.
Regards,
Petr Perstnev -
hi all,
Does anybody knows what all parameters to be passed to FM 'FP_JOB_OPEN' to send the adobe form as an email .Jay,
Have a look at this [thread|Re: Sending PDF forms (created using SFP) as Email Attachment;
Chintan -
Sending Adobe forms through Email and Fax
Hi ,
I have created an Adobe Form i.e. PO Form,
whose print/driver program is customised / based on SAPFM06P and routine used is ADOBE_ENTRY_NEU.
So , now I use the transaction ME22N and use the External Send option i.e sending Email , but the Email is getting sent to Spool instead of SOST.
So what changes do I need to make .
Can anyone tell me how do we send an Adobe Form through email * in which routine is based on Adobe_entry_neu .
Thanks in advance,
RohitHi,
Thanks for reply
The link u mentioned utilises Objects.. but can we send internet mail using this?
As we cannot change RECIPIENT TYPE in this case in the object.
I used this format in the program but the attachment is going to EXpress inbox. and goes to my SAP Inbox instead of Email .
So what changes we need to do for this.
Alternatively, can we use FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' for this purpose?
Edited by: Rohit Pareek on Feb 3, 2009 3:36 PM -
Unable send ADOBE form through email as attachment
Hello experts,
I was trying the [tutorial |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ee8a84ea-0c01-0010-5691-accfb0a172ed] on ADOBE interactive form through GP.
I am not able to send a form as an attachment as specifies in the document.
I have checked for all the required settings mentioned in the document and all seems to be ok.
Can anyone please provide a ray of help on how do I enable a ADOBE form to be passed as an attachment through email.
Thank you.
AshutoshHi,
just use a "Standard button", select it and go to the "Object" -> "Field" tab. Set the control type to "Submit". Go to the "Submit" tab. Set the submit format (e.g. PDF) and set the URL to "mailto:<receiver's email address>".
This will work fine without any JavaScript.
Take care,
Thomas -
Place the Adobe Form as PDF file in a URL
Hi Experts,
I have created an Adobe form and got the PDF data in the form of XSTRING now I need to place this as PDF file in the URL which I have generated programmatically. Not sure on how to do it. Any function modules or classes to place this as PDF file at a URL will be really helpful for me.
Tried with HTTP* function modules and seems they are not working.
Thanks for you help.
Regards,
SrinivasHi Sai,
Thanks for ur input.
My requirement is not exactly the string with XML data, but the string with PDF data.
I will try to explain my requirement here in detail.
I have the adobe form triggering from the webdynpro. This form has different objects like, text fields, dropdowns, check boxes, radio buttons...etc and one SUBMIT button for which webservice is attached in the properties.
User will fill all the fields and clicks on SUBMIT. When he clicks on the SUBMIT, the webservice should attach the filled PDF document at partner level.
For this purpose, i need the string with PDF data and not the XML.
WIth this PDF string again i should be able to re generate the PDF document which was filled by the user.
If string with PDF data is not possible, Please suggest me the possible way of achieving this?
Regards,
Ram.
Maybe you are looking for
-
Mail app won't stay open and keeps crashing
I use iPhone 7.1. Every time I open my Mail app, it crashes. I don't know why. I have maybe 700,000 unread emails, fourteen different email accounts (8 Gmails, 2 iClouds, 2 Gmx's, and 2 AOLs, all of which are linked together through my Mail app), ove
-
Error when installing with pacman
yesterday i update my arch and now i cant install anything this is the error error: giblib: key "7F2D434B9741E8AC" is unknown error: error al realizar la transacción (paquete no válido o dañado) Ocurrieron errores, no se actualizaron paquetes any ide
-
SDO_UTIL WKT functions appear to choke on multipoints
Hi folks, Ugh. Not having fun with this. It appears that on both 10.2.0.4 and 11.1.0.6 that the WKT parser doesn't do multipoints correctly. Could someone familar with WKT check these results and tell me if I am missing something critical? This works
-
Local static variable not unique between dylib, Xcode 4.4.1 bug?
I am wondering if this is a Xcode bug or it is the way the c++ standart is. I would expect to see 1 in the console but i see 0. Anybody know why? Here is the code In one dylib I have // Header file class Foo { int i_ = 0; Foo(const Foo&) = del
-
First iPod ever...charging on my Windows computer for 3 hours+. Apple/iTunes/Menu on computer showed all songs "synced". iPod says "connected - eject before disconnecting". IPod is non-responsive to touch. Is it frozen? How do I "eject"??? Th