Email PDF smart form Support Desk
Hi SDN,
I'm working on support desk - solution manager, and i need to send the solution of the support message by email to the final user.
There is an standard action (SLF1 -SMSD_SERVICE_ORDER_DNO_OUTPUT) that sends the solution in pdf format by email, but we couldn't set the receivers online.
So, I'm using an "z" action that executes an smart form, and i would like to send the smart form in pdf format by the internet.
I'd like to use fm SO_DYNP_OBJECT_SEND, because the user must fill the receivers on-line
So far i have de OTF, and i know that i can make a conversion to pdf format, but i've the following problem
- the pdf in attach is empty, it may be because of the format, or may be i'm not using correctly this function.
Thanks in advance,
Maria João Rocha
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = w_pdf_size
tables
otf = es_job_output_info-otfdata[]
lines = t_pdf[]
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5.
* header
wa_head-objnam = 'EMAIL'.
wa_head-objdes = ls_output_options-tdtitle.
wa_head-objnam = ls_output_options-tdtitle.
wa_head-objla = sy-langu.
wa_head-objsns = 'O'.
wa_head-file_ext = 'TXT'.
append wa_head to t_head.
wa_packing_list-transf_bin = 'X'.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
wa_packing_list-objtp = 'RAW'.
* wa_packing_list-objtp = 'EXT'.
wa_packing_list-objdes = ls_output_options-tdtitle.
wa_packing_list-objla = sy-langu.
wa_packing_list-objlen = w_pdf_size.
wa_packing_list-file_ext = 'PDF'.
append wa_packing_list to t_packing_list.
*---------- enviar o mail
call function 'SO_DYNP_OBJECT_SEND'
exporting
* object_hd_change = ls_output_options-tdtitle
object_type = 'RAW'
* originator_type = 'B'
* originator = sy-uname
outbox_flag = 'S'
tables
* objcont = t_text
* receivers = t_receivers
packing_list = t_packing_list
att_cont = t_cont
att_head = t_head
exceptions
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
x_error = 20
others = 21.
endif.
Thanks for your reply.
I'm working on it, and Ive seen the SCOT documentation, so I've change my strategy.
Right now I'm using some of the methods of the BOR.
I think I've to code because I want a popup to introduce the list of the receivers and the mail body, and of course I want to attach a smart form on pdf format.
But I cant send the mail because of the error: Erro interno: SO_OBJECT_MIME_GET Exceção: 2
Can you help me on this? What Im doing wrong? What document class I need to use on the AttachmentType?
Thanks in advance.
Best regards,
Maria João Rocha
FUNCTION Z_MAIL_DIALOGO.
*"*"Interface local:
*" IMPORTING
*" REFERENCE(TITULO) TYPE SOOD1-OBJDES OPTIONAL
*" REFERENCE(FILE_SIZE) TYPE SOOD1-OBJLEN OPTIONAL
*" TABLES
*" OTF TYPE TSFOTF OPTIONAL
*" PDF STRUCTURE TLINE OPTIONAL
*" CONTEXT TYPE SOLI_TAB OPTIONAL
* Makros für Zugriff aufs BOR
include <cntn01>.
*parameters: dialog like sonv-flag.
data: dialog like sonv-flag.
* Datendeklaration
data: message type swc_object.
data: recipient type swc_object.
data: recip_tab type swc_object occurs 1 with header line.
data: objkey like swotobjid-objkey.
data: content like soli-line occurs 0 with header line.
data: title(80).
data: persnumber like adcp-persnumber.
data: sent_to_all like sonv-flag,
object_list like sosndinf occurs 1 with header line.
data: t_otf type standard table of ITCOO.
data: itab like soli occurs 0.
* Deklaration eines Containers
swc_container container.
* Message-Objekt anlegen
* * Neues Message-Objekt generieren
swc_create_object message 'Message' space.
swc_clear_container container.
if dialog = space.
* * Create w/o dialog
concatenate 'Mensagem Support Desk' sy-datum sy-uzeit into title
separated by '/'.
swc_set_element container 'DOCUMENTTITLE' title.
swc_set_element container 'DOCUMENTNAME' 'Support Desk'.
* swc_set_element container 'DOCUMENTTYPE' 'INT'.
* swc_set_element container 'DOCUMENTTYPE' 'SCR'.
swc_set_element container 'DOCUMENTTYPE' 'OTF'.
swc_set_element container 'NO_DIALOG' 'X'.
else.
* * Create with dialog
swc_set_element container 'NO_DIALOG' ' '.
endif.
swc_call_method message 'Create' container.
perform error_handling(rssobcitest11).
* Create attachment (RAW document from internal table)
SWC_CLEAR_CONTAINER CONTAINER.
*att_bor_obj-objtype = 'MESSAGE'.
*swc_set_element container 'ATTACHMENT' pdf.
*swc_set_element container 'ATTACHMENT' otf.
swc_set_element container 'ATTACHMENT' context.
swc_set_element container 'ATTACHMENTTITLE' 'Anexo'.
swc_set_element container 'AttachmentType' 'OTF'.
*swc_set_element container 'DocumentSize' 0.
swc_set_element container 'DocumentSize' file_size.
*swc_set_table container 'DocumentContent' itab.
SWC_CALL_METHOD MESSAGE 'Attach' CONTAINER.
PERFORM ERROR_HANDLING(RSSOBCITEST11).
*SWC_CLEAR_CONTAINER CONTAINER.
*SWC_SET_ELEMENT CONTAINER 'EditorSettings' 'D'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_X' '5'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_Y' '5'.
*SWC_SET_ELEMENT CONTAINER 'EnableApplObjAttachments' 'X'.
*SWC_CALL_METHOD MESSAGE 'EditRecipientList' CONTAINER.
*PERFORM ERROR_HANDLING(RSSOBCITEST11).
* Einen Empfänger (interner Benutzer) automatisch hinzufügen
* Recipient-Objekt anlegen
swc_clear_container container.
swc_create_object recipient 'Recipient' space.
swc_set_element container 'AddressString' sy-uname.
swc_set_element container 'TypeId' 'B'.
swc_call_method recipient 'CreateAddress' container.
perform error_handling(rssobcitest11).
* Kopie des Recipient-Objekts anfügen
swc_clear_container container.
swc_set_element container 'NewRecipient' recipient.
swc_call_method message 'AddCopyOfRecipient' container.
perform error_handling(rssobcitest11).
* Outbox-Flag setzen
swc_clear_container container.
swc_set_element container 'OutboxFlag' 'X'.
swc_call_method message 'SetOutboxFlag' container.
perform error_handling(rssobcitest11).
* Empfängerliste editieren
swc_clear_container container.
swc_call_method message 'EditRecipientList' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
if sy-subrc = 8.
* Kopiertes Message-Objekt versenden
swc_clear_container container.
swc_call_method message 'Submit' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
endif.
swc_get_element container 'SentToAll' sent_to_all.
* Kopiertes Message-Objekt sichern
swc_clear_container container.
swc_call_method message 'Save' container.
perform error_handling(rssobcitest11).
* Protokollausgabe:
* Key des Message-Objekts ermitteln
*SWC_GET_OBJECT_KEY MESSAGE OBJKEY.
*WRITE: / 'Key des Messageobjekts', OBJKEY.
* Protokollausgabe:
perform write_recipient_info(rssobcitest11) tables object_list
using sent_to_all.
* Freigeben der Referenzen
* MESSAGE-Objekt
swc_free_object message.
* RECIPIENT-Objekt
swc_free_object recipient.
commit work.
ENDFUNCTION.
Similar Messages
-
Compress pdf (smart forms)
i am trying to get the output of a smart form as PDF
but cause of extra spaces in the smart form print out
the size of pdf is very big about 6-9 mb .
can you please help me out
thanks in advance
Navalhi,
Maybe the function module CONVERT_OTFSPOOLJOB_2_PDF (or CONVERT_ABAPSPOOLJOB_2_PDF) is the right choice for you. It converts the OTF-File in the Spool to PDF-Format.
Mario -
Email PDF fillable form as attachment using php?
Please help me this is our problem.
We have created a simple PDF form for our clients to book in a job. Currently they fill it in manually and we receive it by fax. We have created this form with editable fields now, and would like to host this special PDF so it is 'browsable to' on our website. When filled in we would like to submit it to a PHP script which would process and then email the complete PDF to our production department, and another copy to the user. Is this possible? If so, how?Thanks Paul for your message, but i have already did that, my real problem is in PHP how to I grab that PDF file and attach it to an email. I know the name of the pdf file i am sending but will it be referenced in the files as $_FILES["test.pdf"] that is my problem i try that and it doesn't work so I am wounder what variable is sent in the $_POST that is the file. Does that make sense?
-
How to publish Smart form of PDF in r/3 through WD
Hi,
We have a PDF smart form in the r/3.we want to call the PDF from WD View without using PDF interactive form.
Could any one give me soln for this??
ThanksHi ,
Insert IFrame UI Element and bind the Resource property to the value attribute PdfUrl of type String .
Define a Output parameter of type Binary in RFC .
Insert the following code to dispaly the smart form.
byte[] pdfContent = wdContext.currentOutput<node>().get<Binary>();
IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);
try
wdContext.currentContextElement().setPdfUrl(pdfResource.getURL());
catch(Exception e)
wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
Regards,
Sunitha Hari -
Smart Form as PDF within iframe
Hi all,
the problem i'm facing today is that i can't display a SMART FORM as a PDF in an <iframe> Tag.
If i call a simple PDF (which is stored on my PC as a local file) everything works fine and the PDF is
shown within the iframe Tag.
<html>
<head>
</head>
<body>
Test<p>
<iframe src="C:Test.pdf" width="90%" height="400" name="test"></iframe>
</body>
</html>
If i try to do the same with my test BSP the PDF is not shown within iframe Tag. Instead the iframe Tag
stays empty and the PDF is called directly by the Adobe Reader and not by my Browser (IE7).
<html>
<head>
</head>
<body>
Test<p>
<iframe src="https://vsapex2ci.daksap.de:44320/sap/bc/bsp/sap/zpdf_test/test.htm"
width="90%" height="400" name="test"></iframe>
</body>
</html>
On my test.htm only OnInitialization is implemented. Here's the Code:
DATA: lv_pdf TYPE xstring,
ls_output_data TYPE ssfcrescl,
ls_ctrl_param TYPE ssfctrlop,
lv_fm_name TYPE rs38l_fnam,
lt_lines TYPE TABLE OF tline,
lv_pdf_len TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZTESTPDF'
IMPORTING
fm_name = lv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
ls_ctrl_param-no_dialog = 'X'.
ls_ctrl_param-getotf = 'X'.
CALL FUNCTION lv_fm_name
EXPORTING
CONTROL_PARAMETERS = ls_ctrl_param
USER_SETTINGS = space
IMPORTING
JOB_OUTPUT_INFO = ls_output_data
* Conversion of output format OTF into PDF format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_pdf_len
bin_file = lv_pdf
TABLES
otf = ls_output_data-otfdata
lines = lt_lines.
response->set_header_field( name = 'content-type'
value = 'application/pdf' ).
response->set_header_field( name = 'cache-control'
value = 'max-age=0' ).
response->set_header_field( name = 'content-disposition'
value = 'attachment; filename=test.pdf' ).
lv_pdf_len = XSTRLEN( lv_pdf ).
response->set_data( data = lv_pdf
length = lv_pdf_len ).
navigation->response_complete( ).
How can i display my generated PDF (SMART FORM) within an iframe Tag?
Regards
Mark-Andréhere is the code
data: cached_response type ref to if_http_response.
create object cached_response type cl_http_response exporting add_c_msg = 1.
cached_response->set_data( file_content ).
cached_response->set_header_field( name = if_http_header_fields=>content_type
value = file_mime_type ).
cached_response->set_status( code = 200 reason = 'OK' ).
cached_response->server_cache_expire_rel( expires_rel = 180 ).
call function 'GUID_CREATE'
importing
ev_guid_32 = guid.
concatenate runtime->application_url '/' guid into display_url.
cl_http_server=>server_cache_upload( url = display_url
response = cached_response ).
return.
now in the layout use display_url as the src for iframe
Raja -
Hi All,
Does Smart form support Warehouse Management Module in ECC 6.0.
Please let me know its urgent.
Thanks.
KhanHi All,
Does Smart form support Warehouse Management Module in ECC 6.0.
Please let me know its urgent.
Thanks.
Khan -
To convert Smart Form output to PDF format and send it via email.
Hi Friends,
Could any one please tell me, how to convert the Smart Forms output to PDF format and send it via email to customer. If any one have the code, kindly mail me to [email protected]
Thanks & Regards,
JohnRefer the links -
how to convert smartform into pdf and send through mail
Smartform as PDF attachment to a mail.
smartform pdf and mail
smartform to pdf to mail
Regrads,
Amit
Reward all helpful replies. -
Smart Form convert to Pdf and send to email
hi,
ive dev the smart for me21n. its working fine. Standard programme is SAPLMEGUI.
now new requirement is , convert the smart form to pdf and then sending the pdf through email to customer.
Can any plz tell me is there any stadard programme or else need to custmise the print programme?
RegardsKirans belong to convert the smart form to pdf.
there is standard programme RSTXPDFT4
but after convert the form to pdf. i need to send it thorough mail.
iam checking other link one which is send by mr.naresh..
thank you
Regards -
Sending emails in PDF & TXT format generated by SAP script/Smart forms
Hi
We have a requirement to configure SMTP node to send emails in PDF & TXT format. Currently, Output format for SAP Documents generated by SAP Script/Smart Forms configured in PDF. (Tx - SCOT - SMTP Node - Intetnet - Output Forms for SAP Documents). But, We also like to send emails in TXT format for other application in the same system. I see that you can send emails generated by SAP Script/Smart Forms either in PDF or TXT format not both.
Is it possible to send the emails in both the formats by configuring in Tx SCOT?
Your inputs will be appreciated.
Regards
ChanduHi chandu,
1. emails in both the formats by configuring in Tx SCOT ?
Scot will allow only ONE AT A TIME.
2. The other workaround is,
that using some FM
convert the OTF (sapscript/smartform)
data to TEXT,
and send it as RAW
3. Configure RAW = TEXT in scot.
regards,
amit m. -
Smart Form not going as attachment with Email
Hi,
I am configuring actions for support message and email has to be automatically sent to a particular partner based on status of support message.
I am using standard actions and standard smart forms.
The email is also going but without attachment.The mail body is also blank. The subject appears as the name of smart form
When I preview from Actions in transaction, I am able to view the complete smartform.
Is there any settings I have missed out.
In SCOT we have configured SAP Script/ Smart Forms as PDF.
Useful answers will be rewarded.
Regards,
J.PrabananthHi
Check for the Processing Type
Form name : CRM_REMINDER_MAIL_01
Processing class : CL_SAMPLE_PROCESSING_CLASS_PPF
Processing Method : COPY_1_OF_EXEC_SMART_FORM
Archive mode : Mail only
Regards
Raj
Please reward if helps! -
Send Smart Forms within emails (html) Problems with format
Dear all,
the ABAP report SF_XSF_DEMO1 is a demo report which converts a certain smart form into HTML and then sends it as an email in html format.
Sending the email is possible without any problems but I am wondering about the email format.
<a href="http://www.imgbox.de/show/img/e4QvgzsS4L.jpg" title="Bilder hochladen">This screenshot shows how the email looks like.</a>
I am not happy with the email layout as the Smart Form "SF_XSF_DEMO1" is designed in a different way.
What do I have to adapt within the report in order to send an email that really looks like the Smart Form? Or is it a customizing issue?
(I would like to avoid having to send the Smart Form as PDF attachment...)
Thanks for you help!
Kristian KindlerHi Kristian,
When ever you send a smartform output as an HTML email, the system generates automatic style sheets which are not supported in many email clients such as Outlook 2007, hence you will face a formatting issue. We faced the same issue and had do it it like this:
Build a BSP page similar to the output which you want to send as an email. Now you can use the BSP URL to send the html email using cl_bcs class.
I have documented this in my article below-
http://divulgesap.com/blog.php?p=NDA=
Hope it helps.
Regards,
Ravikiran -
Hey All
I have a pretty simple question to ask to anyone who has configured Service Desk. Actually i want to send the End User an email whenever the status of the message he created is changed to User Feedback. Am doing it currently with the help of an action. What I am not sure of is which Smart Form is best for this purpose. Currently I am using this :
Form Name: CRM_SLFN_ORDER_SERVICE_01
Processing Class: CL_DOC_PROCESSING_CRM_ORDER
Processing Method: CRM_SRVORDER_EXEC_SMART_FORM
The problem is that the form usually only contains the first description entered in the message. I want it to have complete correspondence ie all the descriptions, reply and solutions that are there in the message.
Regards
Bilal NazirHi Bilal,
We copied the standard Form: CRM_SLFN_ORDER_SERVICE_01 and made some modifications to it to fit our needs. We wanted to display all text types in the description field and to display it in descending order by date and time.
Here's the code that we created:
Create Structure and Table type below:
1. Structure: ZTEXT_HEADER_01
Description: Text header for ZRMD_ORDER
Component Component Type Data type Length Decimal Short text
TDOBJECT TDOBJECT CHAR 10 0 Texts: application object
TDID TDID CHAR 4 0 Text ID
TDTEXT TDTEXT CHAR 30 0 Short text
TDLINE TDLINE CHAR 132 0 Text line
TDFDATE TDFDATE DATS 8 0 Date creat
TDFTIME TDFTIME TIMS 6 0 Time Created
2. Table Type: ZTEXT_HEADER_01_TAB
Short text : Table of Text header for ZRMD_ORDER
Line type: ZTEXT_HEADER_01.
At Global definition:
- Add Variables: (table below)
Variable name Type assignment Associated type Default value
ZGT_TEXT TYPE CRMT_TEXT_WRKT
ZGS_TEXT TYPE CRMT_TEXT_WRK
ZGT_TEXT_HEADER TYPE ZTEXT_HEADER_01_TAB
ZGS_TEXT_HEADER TYPE ZTEXT_HEADER_01
ZTDLINE TYPE TLINE
ZGV_DISABLE_TEXT TYPE C Y
- At the Initialization routine: Add the logics to get the long text right after saved the support message. Store long text into buffer (internal table - GT_TEXT_HEADER) and format it, sort the internal table descending by date and time.
Build the Long text for out put
data: ZLT_ttxit TYPE TTXIT.
Spread out the text line for this
refresh: ZGT_TEXT,
ZGT_TEXT_HEADER.
ZGT_TEXT[] = gt_text[].
Delete ZGT_TEXT where ( STXH-TDID = 'SUZZ' OR STXH-TDID = 'ZZ'
OR STXH-TDID = 'SUSD' OR STXH-TDID = 'SD').
Sort descending by date and time
sort ZGT_TEXT descending by STXH-TDFDATE
STXH-TDFTIME.
Build the Text header table
loop at ZGT_TEXT into ZGS_TEXT.
clear ZGS_TEXT_HEADER.
Text ID
ZGS_TEXT_HEADER-TDID = ZGS_TEXT-STXH-TDID.
Text Title
READ TABLE gt_textid INTO ZLT_ttxit
WITH KEY TDID = ZGS_TEXT-STXH-TDID.
IF SY-SUBRC = 0.
ZGS_TEXT_HEADER-TDTEXT = ZLT_ttxit-TDTEXT.
ENDIF.
Time and date
ZGS_TEXT_HEADER-TDFDATE = ZGS_TEXT-STXH-TDFDATE.
ZGS_TEXT_HEADER-TDFTIME = ZGS_TEXT-STXH-TDFTIME.
append ZGS_TEXT_HEADER to ZGT_TEXT_HEADER.
clear ZGS_TEXT_HEADER.
Detail:
loop at ZGS_TEXT-LINES into ZTDLINE.
ZGS_TEXT_HEADER-TDLINE = ZTDLINE-TDLINE.
append ZGS_TEXT_HEADER TO ZGT_TEXT_HEADER.
endloop.
Make separated line
clear ZGS_TEXT_HEADER.
append ZGS_TEXT_HEADER to ZGT_TEXT_HEADER.
endloop.
1.Add component under Main Main Window named NEW_TEXT (New Text for Text Header) to display title: Long texts
2.Add under Main Main Window new loop named NEW_TEXT_HEADER_LOOP (Transaction Header Long Texts) to display long text details for each of difference text ID.
This loop is using the internal table GT_TEXT_HEADER:
- Print out the Text ID, Date, time changed at the Text:
NEW_TEXT_HEADER_TEXTID_DESC
- Print out the Details of long text at text NEW_TEXT_HEADER_TEXTID_DATA.
3.Skip the old logics of printout of long text by set condition ZGV_DISABLE_TEXT <> Y. At the following component under Main Main Window :
- TEXT_HEADER_LOOP - Transaction Header Long Texts.
- GET_TEXTID_TEXT - Text ID Description.
- TEXT_HEADER_TEXTID_DESC - Text ID Description, Date.
- TEXT_HEADER_TEXTID_DATA - Long Text
- TEXT_HEADER_EMPTY_LINE - Blank Line.
The formatting didn't work properly for the tables in this reply section, it's removing the spaces.
Let me know if it was helpful.
Regards,
Salpi
<b>Note: This documentation/code is delivered as is, and Bombardier Aerospace makes no warranty as to its accuracy or use. Any use of this documentation/code is at the risk of the user.</b> -
I have an iPad 1. I filled out a PDF questionaire in adobe reader. When I send it to Dropbox, iBooks,mercury browser the form shows up without the answers . My objective is to email the completed form. Please advise as to how to do thisThanks.
Big JakeIf the PDF is a form fillable PDF, which I assume that it is, email it to yourself or send it to DropBox and open it on your computer. You should see the fields filled in there. It works for me if I do it that way.
Adobe Reader supports it, but the other apps don't. I assume that if you email the PDF to a computer user it would be readable in Adode Reader. -
Linking a PDF document to URL in Smart forms
Hi All,
Please anyone let me know how i can link a PDF document to a link in the smart form output.
I'm outputting Purchase order details on a smartform and I'm supposed to give an URL link for the user to click on it for Terms and Conditions.
Please note that I'm not using interactive forms in web dynpros nor developing with BSP.
I simply developed a smart form in SRM system and I'm able to display an URL but don't know how to link a PDF to that link.
Please some one let me know your ideas how i can attach a PDF to an URL in smart form.
Thanks in Advance,
SowjanyaHi,
Follow the below blog and it is very useful achiving your requirement.
in the blog:
in the below point,
Code to send the email
Following code will transform the html content into displayable format and send email to all the recipients. Note: This form also handles the images (static) defined in the smartform, as well as the images defined with html IMG tag (eg: URL link to image on the network).
you have to convert your pDF output into displayable format. then add that link to your smartform.
Thanks,
Sree.
Edited by: t sree on Nov 4, 2008 11:30 AM -
Need to send Smart form via email through Driver program
Hi All,
We need to send smart form via email through a new driver program (z program). Can you please guide me on this.
I have used the following code to achieve this. We are getting message saying 'Mail request has created' when executed, but the mail is not sent.
lvs_comm_type = 'INT'.
lvs_comm_values-adsmtp-SMTP_ADDR = e_mail.
lvs_comm_values-adsmtp-R3_USER = 'X'.
lvs_comm_values-adsmtp-ENCODE = '0'.
call function 'CONVERT_COMM_TYPE_DATA'
exporting
pi_comm_type = lvs_comm_type
pi_comm_values = lvs_comm_values
pi_screen = ' '
pi_newid = 'X'
importing
pe_itcpo = lvs_itcpo
pe_device = lvf_device
pe_mail_recipient = p_mail_recipient
pe_mail_sender = p_mail_sender
exceptions
comm_type_not_supported = 1
recipient_creation_failed = 2
sender_creation_failed = 3
others = 4.
if sy-subrc ne 0.
raise COMMUNICATION_ERROR.
endif.
control_parameters-device = 'MAIL'.
output_options-TDIMMED = 'X'.
output_options-TDDELETE = 'X'.
CALL FUNCTION fm_name
exporting
CONTROL_PARAMETERS = control_parameters
MAIL_RECIPIENT = mail_recipient
MAIL_SENDER = mail_sender
OUTPUT_OPTIONS = output_options
USER_SETTINGS = space
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
Thank youHi,
For sending smartform output into mail you first have to generate spool request and convert it into PDF and then
only it can be sended into mail, please find the sample code in the mail below:
http://wiki.sdn.sap.com/wiki/display/sandbox/ConversionofSpoolRequestDataintoPDFandExcelFormatandSenditintoMail
Mansi
Edited by: Matt on Jan 29, 2010 8:25 AM - removed code, instead point to wiki that Mansi authored.
Maybe you are looking for
-
Sql * plus 9 is not able to connect oracle 7 database
Today I have installed oracle 9i release 2 and found that the sql * plus provided with is unable to connect oracle database version 7. But before that we were able to connect the oracle 7 database well. Any one having a clue on that...? Is it a produ
-
Automatic Post Goods Receipt on TO confirmation
Hi Hopefully someone can help with my issue. Issue: Unable to automatically do a PGR for an Inbound Delivery (IBD) which has an Warehouse managed material and a IM managed material. Scenario: We use warehouse management and Handling Unit Management.
-
Error -1426 : Solid Apple logo on Iphone after update
Here's a new one. I went through and downloaded the 2.0 update about an hour ago. The update backed up the Iphone, then restored/updated it to 2.0. So far, so good! Then it got to the part where it looked like it was going to put back my own settings
-
Font not being recognised by add-on
We have a customer who uses a specific font for their reports. It is present in control panel -> fonts on both the client machine and server. When they run the report straight from Crystal, the font shows as it should but when running it through th
-
Windows 7 Partition on MacBook wireless abilities?
So I recently partitioned my harddrive to be able to run my windows 7 on my macbook (for the obvious purposes.) It all went through smoothly. My mac partitioned fine, and windows 7 installed properly. Now I can't connect to my wireless Airport Extrem