Email Report List as an attachment
Hello Experts,
I need to write a new program which will run in background and should be able to send its list as an attachement in an email. (I really appreciate if that can send the report's spool (if PDF format) as an attachment). I know that there are some sample programs which I can find in SDN. I have been searching for those in vain. Can anybody please let me know if you find a link? I really appriciate your help.
Thanks.
PS: We use SAP R/3 4.6c version.
Hi SAM
check this code.. a part of it will be useful to you..
WWW_LIST_TO_HTML need to replaced with ur PDF FM
data: list type table of abaplist with header line.
data: htmllines type table of w3html with header line.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
start-of-selection.
* Produce a list
do 100 times.
write:/ sy-index, at 30 sy-index, at 50 sy-index.
enddo.
* Save the list
call function 'SAVE_LIST'
tables
listobject = list
exceptions
list_index_invalid = 1
others = 2.
* Convert the list
call function 'WWW_LIST_TO_HTML'
tables
html = htmllines.
* Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Similar Messages
-
Basics of Email Report Output as an Attachment
I need to have a report emailed as an attachement upon completion.
I have seen the many messages on the topic but they discuss topics beyond where I need them to start in the developement process.
Is anyone aware of documentation on how to do this from Oracle Applications 11i with reports 6i?
I know that DESNAME and DESTYPE are parameters but I have never changed them. Is it as simple as setting those PARMs and enabling something on the server?
A push in the right direction would be appreciated.
Dan
nullFrom the applications:
Set them in the after parm form trigger?
Can the destination be a comma delimited list of email addresses?
Isn't there something to configure on the server?
Thanks a bunch for replying. -
Email report output as an attachment
hi all,
i am trying to send the output of a report to an external email as an attachment using the FM SO_NEW_DOCUMENT_ATT_SEND_API1.
when i use the document type as RAW it is working fine.
now my requirement is to send it as an excel attachment.
i tried using the document type as both XLS and XXL separately.though i am getting the mail with an excel attachment, all the data appears in a single column whereas it should appear fieldwise in each column.
is this possible?
any help would be appreciated.
thanks in advance
sandeepHi Ravi/Anurag
i tried the FM SO_NEW_DOCUMENT_ATT_SEND_API1 and it is working fine when i send the mail(with an excel attachment) to SAP inbox.when i open the attachemnt with excel the data format is correct.but when i send it as an external mail and open the attachement in excel,all the data appears in one row only.
what could be the problem?
Can anyone of you please help me out in this regard?
Reward points guaranteed.
thanks
Sandeep -
How to email report ouput as attachment
Hi,
Can anybody tell me how to email report ouput as attachment.
Regards,
Soumya.Hi
check this
Refer this link:
FORM send_mail_2 USING msgid msgno msgv1.
mailuser oder Gruppe like sy-uname default 'Ruckerk'.
DATA: express_hold_time LIKE sovaltime.
DATA: text LIKE sotxtinfo.
DATA: receiver LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
MESSAGE ZF100 (FTP an UDB fehlgeschlagen)
text-msgid = msgid.
text-msgno = msgno.
text-msgv1 = msgv1.
text-msgv2 = ' '.
text-msgv3 = ' '.
text-msgv4 = ' '.
express_hold_time
express_hold_time-days = 01.
express_hold_time-h_min_sec = 240000.
receiver
receiver-receiver = mreceivr.
Gruppe von Empfängern
receiver-rec_type = 'C'.
und Expressmeldung ausgeben
receiver-express = 'X'.
APPEND receiver.
CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
EXPORTING
msgid = text-msgid
msgno = text-msgno
msgv1 = text-msgv1
msgv2 = text-msgv2
msgv3 = text-msgv3
TABLES
receivers = receiver.
IF sy-subrc <> 0.
WRITE:/ 'hat nicht geklappt', 'SY-SUBRC =', sy-subrc.
ENDIF.
PERFORM print_error_report.
Fehlermeldung zum Abbrechen des Report's ausgeben.
MESSAGE e398 WITH 'Jobabbruch' msgv1.
ENDFORM. " SEND_MAIL_2
Another Program:
*& Report ZSENDEMAIL *
*& Example of sending external email via SAPCONNECT *
REPORT zsendemail .
PARAMETERS: psubject(40) type c default 'Hello',
p_email(40) type c default '[email protected]' .
data: it_packing_list like sopcklsti1 occurs 0 with header line,
it_contents like solisti1 occurs 0 with header line,
it_receivers like somlreci1 occurs 0 with header line,
it_attachment like solisti1 occurs 0 with header line,
gd_cnt type i,
gd_sent_all(1) type c,
gd_doc_data like sodocchgi1,
gd_error type sy-subrc.
data: it_message type standard table of SOLISTI1 initial size 0
with header line.
*START-OF-SELECTION.
START-OF-SELECTION.
Perform populate_message_table.
*Send email message, although is not sent from SAP until mail send
*program has been executed(rsconn01)
PERFORM send_email_message.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.
*& Form POPULATE_MESSAGE_TABLE
Adds text to email text table
form populate_message_table.
Append 'Email line 1' to it_message.
Append 'Email line 2' to it_message.
Append 'Email line 3' to it_message.
Append 'Email line 4' to it_message.
endform. " POPULATE_MESSAGE_TABLE
*& Form SEND_EMAIL_MESSAGE
Send email message
form send_email_message.
Fill the document data.
gd_doc_data-doc_size = 1.
Populate the subject/generic message attributes
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
Describe the body of the message
clear it_packing_list.
refresh it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
describe table it_message lines it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
append it_packing_list.
Add the recipients email address
clear it_receivers.
refresh it_receivers.
it_receivers-receiver = p_email.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = 'X'.
it_receivers-notif_ndel = 'X'.
append it_receivers.
Call the FM to post the message to SAPMAIL
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_txt = it_message
receivers = it_receivers
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.
Store function module return code
gd_error = sy-subrc.
Get it_receivers return code
loop at it_receivers.
endloop.
endform. " SEND_EMAIL_MESSAGE
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
form initiate_mail_execute_program.
wait up to 2 seconds.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
endif.
endform. " INITIATE_MAIL_EXECUTE_PROGRAM
Regards
Anji -
How do you send pdf attachment using email address listed on pdf
I pdf'd mail merge document and now want to send these out. I click on the email address at the top of the document and it creates a new email but it does not attach the pdf. How do I do this?
How to Attach Photos and Videos to Emails on an iPhone or iPad
http://www.wikihow.com/Attach-Photos-and-Videos-to-Emails-on-an-iPhone-or-iPad
iPad Basics: Sending an Email With An Attachment
http://ipadacademy.com/2012/03/ipad-basics-sending-an-email-with-an-attachment
How to add, send and open iPad email attachments
http://www.iskysoft.com/apple-ipad/ipad-email-attachments.html
How to Send Multiple email Attachments from your iPad or iPhone
http://ipadacademy.com/2014/03/how-to-send-multiple-email-attachments-from-your- ipad-or-iphone
Cheers, Tom -
How to email reports via SMTP server FORMS AND REPORTS 6i and databse 8i
Dear All,
through reports builder reports are build but i need to email reports via SMTP server is it possible in 6i are not?if yes the how please rep asapIf it will be a scheduled report, you can create a batch file to run report with reqd parameters and generate it's pdf in a oracle directory.
Then schedule the batch file on oracle database pc, (thru task scheduler if OS is windows),
Then a email procedure will be required which will pick up the pdf from oracle directory, attach it and send mail.
Even the email procedure can be scheduled thru oracle job, but the OS batch schedule time and Oracle Job time should be handled as some gap will be needed between the two.
As for the email smtp procedure with attachments, you can find one in this forum or try googling it.
Regards,
Amol -
Report to view the attachment in PO/OA
Dear all,
Would like to check if there is SAP Standard report to list out the attachment that attched to Purchase order or Outline agreement?
Please comment.Hi,
If it is DMS attachment then you can get a report but if it is an header attachment then there is no standard report to display a list of POs with attachment.
Cheers,
Satish Purandare -
Mail Adapter :: eMail Reporting
Hi
I am creating one scenario using following weblog :
/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
But in my mail I am getting the Headings but not the values which I am providing through my XML file.
I even deleted all the fomatting elements but still the same thing.
My XSLT file is like this now ...
?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<Subject>Deliveries from XI</Subject>
<From><i>MY EMAIL ID</i></From>
<To><i>My EMAIL ID</i></To>
<Content_Type>text/html</Content_Type>
<Content>
<xsl:text xsl:space="preserve">Catalog of CDs available:</xsl:text>
<xsl:text xsl:space="preserve">Title</xsl:text>
<xsl:text xsl:space="preserve">Artist</xsl:text>
<xsl:text xsl:space="preserve">Country</xsl:text>
<xsl:text xsl:space="preserve">Company</xsl:text>
<xsl:text xsl:space="preserve">Price</xsl:text>
<xsl:text xsl:space="preserve">Year</xsl:text>
<xsl:for-each select="Catalog_MT/cd">
<xsl:value-of select="title"/>
<xsl:value-of select="artist"/>
<xsl:value-of select="country"/>
<xsl:value-of select="company"/>
<xsl:value-of select="price"/>
<xsl:value-of select="year"/>
</xsl:for-each>
</Content>
</ns1:Mail>
</xsl:template>
</xsl:stylesheet>
My XML file is this
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <ns0:Catalog_MT xmlns:ns0="urn:Reporting">
- <cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
- <cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</ns0:Catalog_MT>
I am getting the output like this in my Mail Body -->
<i><b>Catalog of CDs available:TitleArtistCountryCompanyPriceYear</b></i>
I am not so good in XSLT. Can you pls. suggest what am I missing.
Regards
- Lalit -Hi,
You did not consider namespace in your XSLT
try this
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <b>xmlns:ns2="urn:Reporting"</b>>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<Subject>Deliveries from XI</Subject>
<From>MY EMAIL ID</From>
<To>My EMAIL ID</To>
<Content_Type>text/html</Content_Type>
<Content>
<xsl:text xsl:space="preserve">Catalog of CDs available:</xsl:text>
<xsl:text xsl:space="preserve">Title</xsl:text>
<xsl:text xsl:space="preserve">Artist</xsl:text>
<xsl:text xsl:space="preserve">Country</xsl:text>
<xsl:text xsl:space="preserve">Company</xsl:text>
<xsl:text xsl:space="preserve">Price</xsl:text>
<xsl:text xsl:space="preserve">Year</xsl:text>
<xsl:for-each select<b>="ns2:Catalog_MT/cd"</b>>
<xsl:value-of select="title"/>
<xsl:value-of select="artist"/>
<xsl:value-of select="country"/>
<xsl:value-of select="company"/>
<xsl:value-of select="price"/>
<xsl:value-of select="year"/>
</xsl:for-each>
</Content>
</ns1:Mail>
</xsl:template>
</xsl:stylesheet>
Regards,
Prakash -
Hi,
Using the email reporting feature in the Quiz Manager, is
there anyway to have the report sent via email automatically. I
would prefer very much not to have to rely on the user clicking a
submit button to activate this feature.
I also am having trouble with the data contained in the
report sent via email, or a lack thereof. I read previous posts in
this forum that suggested the email feature only works when using
the .html file. Even when using the .html file, my mail program (MS
Outlook) opens a new blank message when using Firefox, and sends a
report as an attachment in .ATT (?) file format when using IE.
Thanks,
PaulWelcome to our community
Captivate 5 offers an alternate reporting feature that uses Acrobat.com or your internal file server. Nothing changes with Captivate 5 as far as E-Mail reporting goes. And frankly, I'd be surprised if it did because the issue isn't really Captivate related. Instead, it's related to different ways that different E-mail clients work.
Incidentally, there is no Captivate CS5. But I do see many folks confusing the name with the Adobe Creative Suite 5. Captivate isn't part of the Creative Suite of products.
Cheers... Rick
Helpful and Handy Links
Begin learning Captivate 5 moments from now! $29.95
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcererStone Blog
Captivate eBooks -
How does everyone manage Email Distribution Lists in E-Business Suite
We have heaps of email distribution lists stored in Oracle Ebusiness Suite, excel, access ..you name it!
I would like to use a standard method for tagging contacts in the CRM Sales and Marketing Online so our employees can run reports to create external mailing lists.
Today we use classification codes to do this. Have also thought about using a descriptive flex field and report on that to create a contact list with name and email addresses.
Anybody have a better idea for how to achieve this in Oracle Marketing/Sales Online?
Ideally, we would like to create a customer facing website so people could subscribe/unsubscribe from email lists and have it fully integrated 'plugged in' to the above solution.Thanks Ravi for your response.
No, no such kind of reasons.
Indeed I can send successfully to a simple email address but not to the distribution list ...
The problem is right there, in the fact that there is a ditribution list but I really don't know what's the problem ...
Have you ever use a distribution list? Any special thing to do with it?
A'll appreciate any help.
Regards -
Emailing report through CMS (ScheduleToSMTP) - Need Multi-format support
Hi All,
I have implemented the ScheduleToSMTP method for sending my crystal report as an email attachment to the users. This has been done as described in the below link(s):
http://devlibrary.businessobjects.com/businessobjectsxi/en/en/BOE_SDK/boesdk_dotNet_doc/doc/boesdk_net_doc/html/NETHowTos92.html
http://devlibrary.businessobjects.com/businessobjectsxi/en/en/BOE_SDK/boesdk_dotNet_doc/doc/boesdk_net_doc/html/NETHowTos95.html
Now, I would like to know if it is possible to have the report attached in two formats (PDF and Excel) in a single email while emailing it by the above method.
Also, I would like to understand if I can add any additional attachments (an image maybe) to this email that goes out through the CMS.
I am new to the Crystal SDK and will appreciate if the response is a little descriptive.
Thanks in advance for the help!
Regards
AnkitI'm not sure if the below approach will work for you, but in a nut shell, you'd export the report to disk, then mail the exported report as an attachment. I have done this with a single attachment when I was fooling around with this couple of years ago, not sure if it will work with multiple attachments... Some think to keep in mind too; the reports can get quite large. A report larger then 5 megs is nothing out of the ordinary, so emailing the rpt may be an issue from that perspective. Anyhow, here is the code to attach a file to email:
Visual Basic Example (C## is also provided below)
'Add the following namespaces
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.IO
' Code for exporting the report to PDF and
' attaching the exported file to an email.
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As
DiskFileDestinationOptions
Dim ExportPath As String
' Create an instance of the Report
Dim oRpt As New NameOfYourReport()
' Or open a report file
Dim oRpt1 As New ReportDocument()
oRpt1.Load(Request.PhysicalApplicationPath +
"\YourReport.rpt";,
OpenReportMethod.OpenReportByTempCopy)
' Create the directory path if it does not already
' exist
ExportPath = Request.PhysicalApplicationPath +
"Exported\"
If Directory.Exists(ExportPath) = False Then
Directory.CreateDirectory(Request.PhysicalApplicatio
nPath + "Exported\")
End If
Dim fname As String
fname = ExportPath + "Portabledoc.pdf";
' Set the path for the exported report
crDiskFileDestinationOptions = New
DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = fname
' Set the options to export the report to PDF format
crExportOptions = oRpt.ExportOptions
With crExportOptions
.DestinationOptions =
crDiskFileDestinationOptions
.ExportDestinationType =
ExportDestinationType.DiskFile
.ExportFormatType =
ExportFormatType.PortableDocFormat
End With
' Export the report
oRpt.Export()
Response.Write("report exported to: " & fname)
' Create a new mail attachment and add the
' exported report
Dim att As New Mail.MailAttachment((fname))
Dim oMsg As New System.Web.Mail.MailMessage()
oMsg.Attachments.Add(att)
' Set the To, From, And subject for the email
oMsg.To = "someonesemail at email.com"; // the system will not let me use real email
oMsg.From = "myemail at mail.com "
oMsg.Subject = "You have been sent a Crystal Report"
' Connect to the server and send the message
' For example this is the Hotmail smtp Server("")
Mail.SmtpMail.SmtpServer =
"lyris01.hosting.innerhost.com";
System.Web.Mail.SmtpMail.Send(oMsg)
Response.Write("<br>")
Response.Write("Message sent to: " &
oMsg.To.ToString)
' Delete the exported report file
File.Delete(fname)
C# Example
// Add the following namespaces
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.IO;
// Code for exporting the report to PDF and
// attaching the exported file to an email
ExportOptions crExportOptions;
DiskFileDestinationOptions
crDiskFileDestinationOptions;
String ExportPath;
// Create an instance of the Report
NameOfYourReport oRpt = new NameOfYourReport();
// Or open a report file
ReportDocument oRpt1 = new ReportDocument();
oRpt1.Load(Request.PhysicalApplicationPath +
YourReport.rpt";,
OpenReportMethod.OpenReportByTempCopy);
// Create the directory path if it does not
// already exist
ExportPath = Request.PhysicalApplicationPath +
"Exported
if (Directory.Exists(ExportPath) == false)
Directory.CreateDirectory(Request.PhysicalApplicat
ionPath + "Exported
String fname;
fname = ExportPath + "Portabledoc.pdf";;
// Set the path for the exported report
crDiskFileDestinationOptions = new
DiskFileDestinationOptions();
crDiskFileDestinationOptions.DiskFileName = fname;
// Set the options to export the report to PDF
// format
crExportOptions = oRpt.ExportOptions;
crExportOptions.DestinationOptions =
crDiskFileDestinationOptions;
crExportOptions.ExportDestinationType =
ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType =
ExportFormatType.PortableDocFormat;
// Export the report
oRpt.Export();
Response.Write("report exported to: " + fname);
// Create a new mail attachment and add the
// exported report
System.Web.Mail.MailAttachment att = new
System.Web.Mail.MailAttachment((fname));
System.Web.Mail.MailMessage oMsg = new
System.Web.Mail.MailMessage();
oMsg.Attachments.Add(att);
// Set the To, From, And subject for the email
oMsg.To = "someonesemail at email.com";;
oMsg.From = "myemail at email.com ";
oMsg.Subject = "You have been sent a Crystal
Report";
// Connect to the server and send the message
// For example this is the Hotmail smtp Server("")
System.Web.Mail.SmtpMail.SmtpServer =
"lyris01.hosting.innerhost.com";;
System.Web.Mail.SmtpMail.Send(oMsg);
Response.Write("<br>");
Response.Write("Message sent to: " +
oMsg.To.ToString());
// Delete the exported report file
File.Delete(fname);
Ludek
Edited by: Ludek Uher on Nov 4, 2008 8:11 AM -
Emailing IR results as CSV attachment
Hello All,
I have a requirement to email IR results as a CSV attachment.
I can get the SQL for the IR by querying APEX_APPLICATION_PAGE_IR.SQL_QUERY but that is just the "base" query and doesn't include computed column. It also includes columns I may have have chosen to suppress. How can I reference the "current" IR filter??
I think once I can construct the SQL statement to match the current IR display, I can save it as a blob and the construct and send the email and attachment using APEX_MAIL.SEND and APEX_MAIL.ADD_ATTACHMENT.
So, is this the desired approach? Or is there an easier way to email the results of an IR in CSV format?
Thanks,
MontyHi Monty,
In Apex 4.1 (not sure about earlier versions) if you go to "Download" under the "Actions" drop down you will get an option for email. Obviously you will have to have the email service set up in Apex for it to work. This sends the report as an HTML attachment, I'm not sure if this can be tweaked to send as CSV. Obviously you could down load the results as a csv and then mail them manually.
Regards
Andre -
Email Reports - Hyperion Web Analysis.
Hi All,
My client wants to view the reports in their black berry's.
can we email reports as attachment in Hyperion Web Analysis.
would appreciated prompt response.
thank you in advance.It's not possible to email a WA report. An option is to recreate your report in IR and have it scheduled to email the result to the users.
-
I have a scheduled job that generates a report in csv format. Is there any way i can mail this report to certain ids?
Yes i believe you can do this.You need to edit that particular report and you will find a check box to email reports.Enable this checkbox and provide the list of the emails ids in the textbox.When the scheduled task runs it will mail the report to all the receipent ids.
Hope this helps,
pdeep -
Reg : Converting a report list to OTF format.
Hi Folks,
Is there any function module which converts spool of (report) list type to OTF type? As we need to merge multiple spools (list types) into single PDF file. We have
1) RSPO_RETURN_SPOOLJOB,
2) CONVERT_OTF_2_PDF
which can merge multiple spools into single PDF file, but these function modules accepts only spools of OTF format.
Any help will be rewarded.....Hi ,
See this code , this gets smartform output pages into the jobinfo document "ls_job_info' , then converts it into OTF format and then PDF. See if this can give u some idea.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = repeat
IMPORTING
job_output_info = ls_job_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
LOOP AT i_tline.
TRANSLATE i_tline USING '~'.
CONCATENATE wa_buffer i_tline INTO wa_buffer.
ENDLOOP.
TRANSLATE wa_buffer USING '~'.
DO.
i_record = wa_buffer.
APPEND i_record.
SHIFT wa_buffer LEFT BY 255 PLACES.
IF wa_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR wa_objhead.
i_objbin[] = i_record[].
Create Message Body Title and Description
i_objtxt = 'Invoice output Attached!'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
READ TABLE i_objtxt INDEX v_lines_txt.
wa_doc_chng-obj_name = 'Invoice'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'Invoice'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
Main Text
CLEAR i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Attachment (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
DESCRIBE TABLE i_objbin LINES v_lines_bin.
READ TABLE i_objbin INDEX v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'Invoice'.
APPEND i_objpack.
Regards,
Uma
Maybe you are looking for
-
Changed my apple ID email address which seemed to work but now cannot sign into iCloud account it still comes up with my old email address and I cannot access it also the message pops up all the time when just using ipad HELP
-
CSM 3.3.1 and 6500
Hello, We are facing a problem with CSM 3.3.1 and 6500 switch with FWSM. We have 2x 6500 switches with 2 supervisors in each + 2 FWSM cards one in each chassis. The problem is that we have CSM 3.3.1 that manages the switch and FWSM. The problem is th
-
Folks, Hello. I have been installing HCM and Campus Solution 9.0 with PeopleTools8.53. Server machine is Oracle Linux 5.10 and client machine is Windows XP. My internet architecture is WebLogic11g/Tuxedo11g/OracleDatabase 11gR1. Peopletools 8.53 run
-
Hello All, I want to get a substring (using script logic) from an ID which exists in my CLIENT dimension, for example My ID Client is FR3345 y want to get the substring 3345 from the ID, Is this possible using the select statement or somethig else? T
-
I have CS6 but can't type the serial number in
I have CS6 and trying to load it on my new computer