Adobe form Through Email
Hello Gurus,
My requirement is to send the Adobe form via Email as attachment.
Am using FM "FP_JOB_OPEN", Generated Adobe Form FM and FP_JOB_CLOSE.
Here, am getting PDF format in "FPFORMOUTPUT-PDF".
As "FPFORMOUTPUT-PDF" is in format of xstring, We need to convert it to Binary and for this am using FM "SCMS_XSTRING_TO_BINARY".
Code:
data: li_att_content_hex type standard table of x.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = FPFORMOUTPUT-pdf
TABLES
BINARY_TAB = li_att_content_hex.
Later, am using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" to send a mail.
As a result am getting the mail with attachment as PDF but when I try to open the attachment it gives me an error as "It wasn't correctly decoded".
Please, Let me know about this issue.
Thanks in advance.
Regards,
Usha
hi,
Refer to this link..
Re: Attachment in ADOBE form
Similar Messages
-
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 -
Sending the adobe interactive form as non-interactive form through email
Hi ,
I am trying to send the interactive adobe form as non-interactive form through email.The interactive form size is very large because of the interactivity.
Can anybody suggest how to do this.
Regards,
DebasisDear Antony,
Thanks for the reply.
I got you but can you pls guide me how to go about it.
I need to send the email while submiting the form.So when and how i will be mapping each data node /attibutes of the main form with the intermediate form.My interactive form is of 30 pages and it may grow upto 40 pages.My response is with the to the main form where i am showing the success message.
Regards,
Debasis Nayak -
Sending email by attaching adobe form through BSP
Hi All,
I'm working on the e-recruitement project.
I have requirement that on the publication page there is table view where all the publication and there posting channels are displayed.
Now i have to create a button " Send Email". by selecting the the required posting channel when i click on the button send email.
It should pick the data overview form and this form should be attached to email and should be send to the respective posting channel.
Can you please guide me to solve this issue.
Your commnets will highly appreciated.
Regards,
Nikita.Look at this [document|https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/e0bba346-cb84-2910-2aa9-ba1f8a1c8617&overridelayout=true] to create & send adobe form via email.
You can use the same code for BSP too.
Raja -
Displaying Adobe Form through CRM WEB UI
Hi Experts,
Currently I am working on CRM Technical which is very new to me. I've got a requirement to display the Adobe form through CRM WEB UI. The requirement is like this.
In a screen of WEB UI there is a option of OUTPUT preview. When i select the specific billing document and when i click on OUTPUT Preview tab it should display the Adobe Form which was developed in SAP GUI using txn SFP. I have done some R&D on it and i found that an ACTION Profile need to be created for this kind of requirements. But in my research i found only Smartforms can be displayed using the ACTION point.. Could anyone help me out how to display the Adobe Form using the Action......
Regards,
Aarthi.
Moderator message: please have a look in the dedicated forum for "Adobe Interactive Forms".
Edited by: Thomas Zloch on Jan 11, 2011 1:51 PMHi Robert,
I came across this post after implementing the same solution. It works fine for me in SAPgui, i.e. it creates an entry in the spool which I can priview or print, but when I use the webUI it just opens a new window with a white background and the message 'Error in smartform'.
Nitin, did you manage to come up with any solution? Or did this work for you?
Regards,
Simon -
Add Button to Display Adobe Form through SPRO
Hello All,
I am trying to add a button to display Online Interactive Adobe Form through SPRO but its not working.
So please suggest me how can i add a button for it ASAP.
Thanks and Regards:
Anugrahmethod ONACTIONCLICK .
wd_this->fire_o1_plg(
endmethod. -
VERY URGENT - Adobe forms with email problems
I THERE - I AM A ADOBE FORMCENTRAL CLIENT I HAVE MY PAYEMENTS ON DAY BUT FOR SOME REASON THE ADOBE STOP RESENDING TO MY EMAUIL ACOUNT AND TO MY CLIENTS EMAIL ACCOUNT THE SUMARY OF THE FORM THAT IS SUBMITED. THIS IS VERY URGENT THAT BE FIXED FROM YOU SIDE PLS LET ME KNOW WHAT IS HAPENING.
PLS FIX THIS URGENT AS I HAVE MY CLIENTS SCREEMING ON ME
PLS ANSWER TO
[email protected]Now is working
after 2 hours is working now. but this have never hapen before. now I am
woried with this ADOBE FORM system!!!! it can hapen and I never know.
br
henrique
2014-04-25 21:29 GMT+01:00 Josh_Corey <[email protected]>:
Re: VERY URGENT - Adobe forms with email problems
created by Josh_Corey <http://forums.adobe.com/people/Josh_Corey> in
FormsCentral - View the full discussion<http://forums.adobe.com/message/6331228#6331228 -
Add a button to display Adobe Form through SPRO on T-code IQS22
Hello All,
I am trying to add a button to display Online Interactive Adobe Form through SPRO on T-code IQS22 but its not working.
So please suggest me how can i add a button for it ASAP.
Thanks and Regards:
AnugrahI asked my question in hopes that somebody has maybe had a similar question or has dealtwith something similar to what I am trying to do
But you said you already know how to do this. You said you know how to create a JFrame and display it. So what is your problem?
You said you know where to add the code. So again what is your problem?
All you posted is code that was generated by the IDE. You have not make any effort to add your own code. Why do you think the code to show a frame here, is any different than the code you used to show a frame in the past?
You learn by trying, not by asking people to spoon feed the answer to you.
If you would even make the slightest effort at filling in the code where the IDE has told you to add the code I would be more willing to help. But apparently you have no desire to make the effort. -
Submitting PDF form through email
I created an order form PDF a year ago (with Acrobat Pro 8) for a client's website with a button to submit the form through email. The customers can fill out the order form in Acrobat Reader 8 and email the PDF to my client's email. Now that doesn't seem to work anymore - an illegal operation message comes up. I've changed the action for the button to submit the order form as a FDF file but the form data is not found once the email is sent. I've found the FDF Toolkit but have no idea what to do with it. Is there a simpler way for customers to fill out the form and email it to my client?
zorro248 wrote:
Is there a simpler way for customers to fill out the form and email it to my client?
Sure. Just enable the form so Reader users can save it when it's finished then instruct them to do so and attach it to an email. -
Sending a pdf form through email
Hi,
I want to send a pdf form through mail for this i have to write code(given below) but my problem is that
it send a xml file to vendor. i want to send its pdf form. how it is possible.........................
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = fp_outputparams
APPEND_TO_TABLE = ' '
IMPORTING
OUTPUT_LENGTH =
TABLES
binary_tab = lt_att_content_hex.
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
*--Create persistent send request
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 Vendor,' 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 = 'Vendor Payment 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 = 'A Test Adobe Form').
i_attachment_size =
i_attachment_language = space
i_att_content_text =
i_attachment_header =
i_att_content_hex = lt_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 '.............'.
lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
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 ).
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 payment form has been emailed to the Vendor' TYPE 'I'.
Thanks in advance
ShriTry below logic.
DATA : it_objpack TYPE STANDARD TABLE OF sopcklsti1 ,
it_objtxt TYPE STANDARD TABLE OF solisti1 ,
it_objbin TYPE STANDARD TABLE OF solisti1 ,
it_reclist TYPE STANDARD TABLE OF somlreci1 ,
wa_doc_chng TYPE sodocchgi1,
wa_objhead TYPE soli_tab,
l_attachment TYPE i,
l_testo TYPE i.
DATA: wa_objpack TYPE sopcklsti1,
wa_objtxt TYPE solisti1 ,
wa_objbin TYPE solisti1 ,
wa_reclist TYPE somlreci1 .
CLEAR: wa_reclist,
wa_objhead,
wa_objtxt, it_objtxt[],
wa_objbin, it_objbin[],
wa_objpack, it_objpack[].
Object with PDF.
CLEAR wa_objbin.
REFRESH it_objbin.
it_objbin[] = gt_mess_att[].
DESCRIBE TABLE it_objbin LINES l_attachment.
Object with main text of the mail.
LOOP AT it_message INTO wa_message.
wa_objtxt = wa_message. APPEND wa_objtxt TO it_objtxt.
ENDLOOP.
DESCRIBE TABLE it_objtxt LINES l_testo.
Document information.
wa_doc_chng-obj_name = 'test'.
wa_doc_chng-expiry_dat = sy-datum + 10.
CONCATENATE 'Amex Settlement' ' '
INTO wa_doc_chng-obj_descr .
doc_chng-sensitivty = 'F'.
wa_doc_chng-sensitivty = 'P'.
wa_doc_chng-obj_prio = '1'.
wa_doc_chng-doc_size = l_testo * 255.
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = l_testo.
wa_objpack-doc_type = 'RAW'.
APPEND wa_objpack TO it_objpack.
CLEAR wa_reclist.
wa_reclist-copy = 'X'.
IF wa_email IS NOT INITIAL.
wa_reclist-receiver = wa_email-value1.
wa_reclist-express = 'X'.
wa_reclist-rec_type = 'U'.
wa_reclist-notif_del = 'X'.
wa_reclist-notif_ndel = 'X'.
APPEND wa_reclist TO it_reclist.
ENDLOOP.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_objpack
object_header = wa_objhead
contents_bin = it_objbin
contents_txt = it_objtxt
receivers = it_reclist
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.
IF sy-subrc <> 0.
WRITE 'Cannot send email'.
ENDIF.
ENDIF. -
Send Adobe form by email on save of PO
Hi All
I want to send PO output as abode form to vendors as soon as the PO is created and saved. I have created new output message type, new adode form for PO output. Do I have to create new program as well? So that I can put in new output type along with new form (NACE). Can any one take me through the procedure?
Thanks in advance
SunnyHi
Thanks for your reply it was helpful.
I am now able to call Adobe form in PO print preview.
But unable to send email on SAVE action of PO in ME22N. In the same output message type NEU I have added Transaciton medium as External Send. On save it is showing status as successful in Message buttion but email is not send. Can you tell me where I am wrong?
Regards
Sunny -
Submit a form through email multiple times
I have a form, where a number of people can digitally sign the form and email it to the next person. Designed in LiveCycle and reader extended.
On the first sign and email, everything works great. However when the next person gets the form signs it and tries to email it, the body and subject is replaced by:
The attached file contains data that was entered into a form. It is not the form itself.
The recipient of this data file should save it locally with a unique name. Adobe Acrobat Professional 7 or later can process this data by importing it back into the blank form or creating a spreadsheet from several data files. See Help in Adobe Acrobat Professional 7 or later for more details.
Whats all the hocus pocus?Yes, in javascript. Specifically: (Sorry I couldnt find any code tags)
var requestType = ' ';
var rush = ' ';
var bodyBuild = "Requestor Information\n" +
"\nRequestor: " + form1.Table1.Row1.nameTable.Row2.requestorName.rawValue + "\nDate Submitted: " + form1.Table1.Row1.DateSubmittedTable.Row2.DateSubmitted.rawValue +
"\nDate Needed: " + form1.Table1.Row1.DateNeededTable.Row2.DateNeeded.rawValue +
"\nDivision: " + form1.Table1.Row2.DivisionTable.Row2.Division.rawValue +
"\nPhone: " + form1.Table1.Row2.PhoneNumberTable.Row2.PhoneNum.rawValue +
"\nSupervisor: " + form1.Table1.Row2.SupervisorNameTable.Row2.S1SupName.rawValue;
if(form1.CheckBoxO1.rawValue == 1){
requestType = "New Employee";
if(form1.CheckBoxO2.rawValue == 1){
requestType += ",Relocation";
if(form1.CheckBoxO3.rawValue == 1){
requestType += ",Departure";
if(form1.CheckBoxO4.rawValue == 1){
requestType += ",Telework";
if(form1.CheckBoxO5.rawValue == 1){
requestType += ",Software Access";
if(form1.CheckBoxO6.rawValue == 1){
requestType += ",Telecommunication";
// Set Rush if Date Needed is less then 5 days
var DateNeeded = form1.Table1.Row1.DateNeededTable.Row2.DateNeeded.rawValue;
var d = new Date();
var CurrentDate = new Date();
d.setFullYear(DateNeeded.substring(0,4), DateNeeded.substring(5,7), DateNeeded.substring(8));
d.setMonth(d.getMonth() - 1); // Javascript months go from 0 - 11
d.setDate(d.getDate() - 3);
if(d < CurrentDate){
rush = "RUSH ";
emailSubmit.event__click.submit.target = "mailto:[email protected]?subject=" + rush + "Service Request[" + requestType +
"] From: " + form1.Table1.Row1.nameTable.Row2.requestorName.rawValue + "&body=" + bodyBuild;
emailSubmit.execEvent("click"); -
Submit a form through email with multiple signatures
I have a form, where a number of people can digitally sign the form and email it to the next person. Designed in LiveCycle, with javascript and reader extended.
On the first sign and email, everything works great. However when the next person gets the form signs it and tries to email it, the body and subject is replaced by:
The attached file contains data that was entered into a form. It is not the form itself.
The recipient of this data file should save it locally with a unique name. Adobe Acrobat Professional 7 or later can process this data by importing it back into the blank form or creating a spreadsheet from several data files. See Help in Adobe Acrobat Professional 7 or later for more details.
Whats all the hocus pocus?
edit: Something I noticed is that, with some digital signatures, I disable a good majority of the form to read only "lock fields", then when I email I get the above text replaced in the body of the email.I have a form, where a number of people can digitally sign the form and email it to the next person. Designed in LiveCycle, with javascript and reader extended.
On the first sign and email, everything works great. However when the next person gets the form signs it and tries to email it, the body and subject is replaced by:
The attached file contains data that was entered into a form. It is not the form itself.
The recipient of this data file should save it locally with a unique name. Adobe Acrobat Professional 7 or later can process this data by importing it back into the blank form or creating a spreadsheet from several data files. See Help in Adobe Acrobat Professional 7 or later for more details.
Whats all the hocus pocus?
edit: Something I noticed is that, with some digital signatures, I disable a good majority of the form to read only "lock fields", then when I email I get the above text replaced in the body of the email. -
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
Maybe you are looking for
-
Installing Windows 7 on a late 2009 iMac running Mavericks
I'm running a perfectly good late-2009 iMac running Mavericks and had a bootcamp partition that worked until I needed to replace my hard drive. Now I want to install Windows 7 (via bootcamp) for gaming. Bootcamp 5 won't download the software or allo
-
Constant script errors and non-responsive
I receive constant script errors and non-responsive errors using Firefox, as do many of my friends. I am using Facebook and Mafia Wars by Zynga Here is an example of one: A script on this page may be busy, or it may have stopped responding. You can s
-
Slow Solid State hard drive startup
I just installed a 256gb ssd drive (from OWC) into my 2007 Santa Rosa 2.4 core 2 duo 17" macbook pro. I had done a clone from my old hard drive (7200rpm 320gb) while it was still in the mbp to the ssd drive in an external enclosure using Superduper.
-
WLS, WLP 8.1 sp5 : XHTML compliance
Hi, I'm working on a portal application, coded with Workshop and Portal Frameworks. A migration of presentation layer is needed. That implies a full XHTML 1.0 strict compliance. It looks that generated code by BEA tags is not compliant at all : - URL
-
Anyone old enough to remember the click syndrome in the mid 90's that the Iomega Jaz drives had? I think it's back in the G-RAID's The syndrome was a click, hang, click, hang the system. If you then took that drive or media to another system, you wou