Smartform how to send invoice as pdf to the spool

I have a relatively standard invoice smartform. I want to place the output (in case of a certain output type) as a PDF in the spool as a spoolrequest.
How can i arrange that.
and second i want to email this request to the emailadress mentioned in the own data of the user whose printing this.
Can someone help me??
Regards, Frankl

Hi,
Please check below one
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/smartform%2bto%2bmail%2bas%2bpdf%2battachment
Regards
Jana

Similar Messages

  • Send Invoice as PDF Attachment with variable Filename

    Hello!
    We got a requirement from one customer. We should send our invoices as PDF-Attachment via E-Mail but the attachment must have a variable filename. At the Moment we can send invoice as PDF-Attachment but only with a fix filename.
    How can we change the filename in our Adobe Forms?
    Best Regards
    Markus

    Hi Florian!
    Answer 1:
        The original Name is Druckdaten.pdf
    Answer 2:
         Our entry in NAST-NACHA = 1
    Answer 3:
         I can implement some ABAP-Code
    Here some Screenshots:
    Configuration  of printer E-MAIL:
    Best regards
    Markus

  • How to send a mail by ckicking the button using java

    hi,
    how to send a mail by clicking the button (like payroll silp in that contain one button if we click that it autometically go through the mail as a attachment) pls frd to me my gmail is [email protected]

    Hi,
    It seems we are doing the homework for you; to make you start with something; look at the sample code below and try to understand it first then put the right values
    to send an email with an attachement.
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    public class Main {
          * @param args
         public static void main(String[] args) {
              // Create the frame
              String title = "Frame Title";
              JFrame frame = new JFrame(title);
              // Create a component to add to the frame
              JComponent comp = new JTextField();
              Action action = new AbstractAction("Button Label") {
                   // This method is called when the button is pressed
                   public void actionPerformed(ActionEvent evt) {
                        System.out.println("sending email with attachment");
                        sendEmail();
              // Create the button
              JButton button = new JButton(action);
              // Add the component to the frame's content pane;
              // by default, the content pane has a border layout
              frame.getContentPane().add(comp, BorderLayout.SOUTH);
              frame.getContentPane().add(button, BorderLayout.NORTH);
              // Show the frame
              int width = 300;
              int height = 300;
              frame.setSize(width, height);
              frame.setVisible(true);
         protected static void sendEmail() {
              String from = "me@localhost";
              String to = "me@localhost";
              String subject = "Important Message";
              String bodyText = "This is a important message with attachment";
              String filename = "c:\\tmp\\message.pdf";
              Properties properties = new Properties();
              properties.put("mail.stmp.host", "localhost");
              properties.put("mail.smtp.port", "25");
              Session session = Session.getDefaultInstance(properties, null);
              try {
                   MimeMessage message = new MimeMessage(session);
                   message.setFrom(new InternetAddress(from));
                   message.setRecipient(Message.RecipientType.TO, new InternetAddress(
                             to));
                   message.setSubject(subject);
                   message.setSentDate(new Date());
                   // Set the email message text.
                   MimeBodyPart messagePart = new MimeBodyPart();
                   messagePart.setText(bodyText);
                   // Set the email attachment file
                   MimeBodyPart attachmentPart = new MimeBodyPart();
                   FileDataSource fileDataSource = new FileDataSource(filename) {
                        @Override
                        public String getContentType() {
                             return "application/octet-stream";
                   attachmentPart.setDataHandler(new DataHandler(fileDataSource));
                   attachmentPart.setFileName(filename);
                   Multipart multipart = new MimeMultipart();
                   multipart.addBodyPart(messagePart);
                   multipart.addBodyPart(attachmentPart);
                   message.setContent(multipart);
                   Transport.send(message);
              } catch (MessagingException e) {
                   e.printStackTrace();
    }The sample above is not ideal so you need to go through it and start to ask me some questions if you have
    Let me know if you miss something
    Regards,
    Alan Mehio
    London,UK

  • How can I print a pdf in the actual size with a page border?

    How can I print a pdf in the actual size with a page border? (2 pages per sheet preferred)
    I usually print pdfs of books at a copy shop and they turn out fine.
    The problem comes when I try to print the same books at home.
    I use Adobe Acrobat X with the same settings: "multiple pages per sheet" (2x1) and page border. But the pages are slightly shrunken when printed. I think this is because my printer can't print as closely to the margins. Still, two pages should be able to fit on one sheet in actual size. Are there any layout settings that I can play with to find a better fit, besides portrait and landscape?
    If I select page scaling "none," I'm able to print the pdf in actual size, one page per sheet. But there's no option to add a page border.

    I have a test with some questions (multiple choice, FIB, matching, etc). I have just one button to submit all the answers, and after submiting the student can see his score and review the test to know where he failed. He can't answer again. However, he can change the answer multiple times before submiting.
    "if i turn on success/failure captions the student will see them while answering" - before submitting
    "if i turn them off he wont know what's the right answer" - after submitting
    My results page is the default. I didn't use any variable. When i go to the results page after reviewing the test all the entry boxes are "wrong".

  • How to send a modulate signal by the NI PXI-5441?

    How to send a modulate signal by the NI PXI-5441?
    I am using NI PXI-8108 / PXI-5441.
    I want to send a binary signal modulated (FSK) by the 5441. I tried to use, without success, the modulation VIs with the Fgen VI.
    Thanks

    Hi Mauro,
    the code structure is similar to any structure of I/O. You need open the communication channel with the hardware (using VI Open), use VI Write/Read to send/receive data and close the reference (VI Close). You can look the structure in LV examples.
    Nevertheless, if you cannot, post your code that I analize to you.
    Regards,
    Ricardo Ramos
    Engenheiro de Vendas - Sul
    National Instruments Brasil

  • 'Send Invoice to' address in the PO printout

    Hi Experts,
    Could you please help me with an issue I am working on. We have one Co.Code and POrg creating PO's for vendors in US and UK. Our Co. Code and Plant address is of Middle East and we want 'Send invoice to' address on the PO printout to be based on the vendor selection. I-e if vendor is a US one, 'send invoice address' should appear as a 'US PO Box' and if vendor is a UK one, 'send invoice to' address should appear as 'UK PO Box'. Is it some thing that can be controlled by ABAP and Smart fomrs or any other functional way around is available?
    Many thanks,
    Syd.

    Hi SAP MM1,
    You can very well achieve this using SMART FORMS. You have to give logic to your ABAPer if plant number is X it should pick address of US & if plant address is Y it should pick address of UK.
    Regards
    Subbu.

  • Email PDF in the spool

    How can I send a PDF in the spool as email attachment?

    Hello,
    Check this,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
    This is provided by SAP
    Vasanth

  • How to mail invoice as pdf to customer

    hi all,
    i have to send a copy of the invoice as a pdf to the customer through mail, request you to kindly guide me how to configure this in the system.
    thanks & regards,
    padmanabhan

    Hi,
    SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
    Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.
    Please note that it is not restricted to sapsciprts spool only. Any reports in the spool can be converted using the program 'RSTXPDFT4'.
    1.Run the program RSTXPDFT4 in se38
    2. Give the spool number and mention the directory and filename where to want to store the pdf file
    3. press execute
    MAIL: to Configure the Mail settings in the Tcode SCOT with the help of a basis person
    and use the Medium as MAIL (7) instead of 1(printout)
    and see that the receipient mail id (customer) are maintained properly and it should fired in the driver program..
    Just we have to check the Output from the fun module
    ADDR_GET_NEXT_COMM_TYPE which is there in driver program
    Reward points if useful
    Regards,
    Govind.

  • Sending Invoice as PDF in email

    Hello,
    I have a requirement where I have to send Proforma Invoice as PDF in email.
    Now, the Proforma Invoice is already using output type to Print and when I see the routines in Tcode NACE
    It uses RVADAUS1 Program where it calls RV_EXPORT_DOCUMENT_PRINT function module to generate the Print document.
    This works fine.
    So, I created a new output type, copied the  RVADAUS1 to ZRVADAUS1 and modified the code where I am capturing the Spool generated through the original code and pass it to CONVERT_ABAPSPOOLJOB_2_PDF to convert it to PDF and then send it as an email.
    Now, the problem I am facing is that, I am not able to generate a Spool when I am using the medium ( '5' External Send ). So the further code of capturing Spool and convert to PDF and send as email fails.
    Any guidance is appreciated.
    Regards,
    DNP

    Hi Sudhanshu,
    Just before calling the function module RV_EXPORT_DOCUMENT_PRINT.
    I forced TNAPR-NACHA = '1'. and NAST-NACHA = '1'.
    which means I forced Transmission medium as 1(Print) instead of 5(External Send)
    This created a SPOOL.
    Regards,
    DNP
    Edited by: DNP on Aug 14, 2009 11:45 AM

  • Print normal invoice and send invoice as pdf to creator of invoice

    Hello to all,
    this is my first post in this big, special and great community. 
    Many thanks to all people in background for realizing and customizing !
    I have a request to print the normal invoice and to send the invoice as pdf copy to the creator of the invoice at the same time.
    Using include RVADOPFO and medium 5 would be the correct solution, if I could use the email field in customer master data entering the mail adress of the creator.
    But it is not possible, the field is used otherwise.
    Can anybody help me to solve the problem ?
    Thanks in advance and regards
    Claus

    Hi,
    One Print Program is sufficient to generate the Print invoice and send the Invoices as PDF to  customer.
    In the NACE transaction code , In the OUTPUT TYPE define a output with the  Transaction medium as 1 & 5
    In the CONDITION RECORDS in VV33 also maintain the MEDIUM as 1 and 5
    Alternatively you can you one program to generate the PDF and save to your LOCAL file and send to customer
    The PROGRAM to generate the PDF is  RSTXPDFT4
    Please check them and let us know your feedback
    regards,
    santosh

  • Forms 10g, how to send ReportServer generated PDF directly to client printr

    Hi
    We are implementing Forms 10g now, at we are facing quite a big problem - we haven't found a way how to send Report Server generated PDF directly to printer installed in clients computer.
    Forms 10g and ReportServer are installed in the same machine and clients are accessing Forms10g through IE. Installing all the printers to the Forms10g server is not an option!
    Is there any way of doing it?
    Probably we could write a java bean that can read in the byte array and directly somehow send it to clients printer(java can read client printer list) but at this moment I have no idea how to accomplish it - haven't investigated it yet.
    So if anyone has working software, please let me know how you achieved it.
    Thanks!

    may be this will help
    Re: Printing Reports directly from to a printer via 10g forms (Linux)
    DirectPrint Javabean and barcode fonts

  • How to send invoice through email with output type RD00?

    What are the configuration settings to send invoices through email with output type RD00?

    Hi,
    Please go through the following links:
    [E-mail|Email Configuration Settings]
    [e-mail|Re: EMAIL BILLING DOCUMENT TO CUSTOMER THROUGH SEND MAIL OPTION IN VF02]
    After triggering the output,goto T.Code SOST and process it.
    So that e-mail will be triggered immediately.
    You can use External send/EDI/simple mail for this.
    Regards,
    Krishna.

  • How to send invoice to external  email

    Hi All,
    Can anyone help me with the detail steps to configure settings so i can send invoice to the customer in their mail id.
    Message was edited by: Monosij Bagchi

    Hai Monosij Bagchi
    Go through the following Link
    http://www.sapgenie.com/its/email.htm
    Thanks & Regards
    Sreenivasulu P

  • How to send a report DIRECTLY to the printer (Linux App. Svr.)?

    Here is the problem:
    -- We have Windows clients / Linux App Server / Forms 10g R2.
    -- Printers are attached to the Windows clients.
    -- When we want to send DIRECTLY to the printer, we have to write data into a text file (using TEXT_IO) &
    -- print the same using command HOST('lp -d '||<printer IP of logged in user>t||' '||<file name>,NO_SCREEN).
    -- Our normal reports are displayed as PDFs.
    Is there a way to directly send the PDF to the printer without having to re-write the report to a text file?? Then we can just use the PDF output and don't have to do any code changes (i.e. redo every report).
    Edited by: user12240205 on May 16, 2011 5:59 AM
    Edited by: user12240205 on May 16, 2011 5:59 AM

    InoL wrote:
    Use destype=printer.
    The printer on the Windows client has to be defined as a network printer and be known on the Linux server.
    Other options:
    - use the orarrp utility
    - if you call your Reports from Forms, you can use a Java bean
    http://forms.pjc.bean.over-blog.com/article-6621538.html
    Thank you for the quick response. Can u please tell us how to make the printer "known" as a Linux server?? Will a normal network admin know how to do this or is it an Oracle developer's task?

  • PAGES: Sending an exported .pdf in the body of email and NOT as attachment

    Hello to all you MAC geniuses out there. I am using Pages to design flyers for my business. Then exporting them to a pdf file and trying to figure out how to send them in the BODY of an email and not an attachemnt that they have to open. Not really sure if this is a mail or pages question. It is probably a very simple step I am missing, but never the less can't seem to fiugre it out. Thanks in advance!
    Genn

    Ok, so what do I do then? My Question is this. I am using Pages to create email flyers for my business. I have been Exporting them into a PDF File, but they as you say, send as attachements. I need to know how to send them in an email, as an email and not as an attachement.
    What do I do to save and send them differently. I know it can be done since I get craploads of Junk mail everyday that look like that. Please help, I have a deadline to meet approaching very soon. Thanks!!!!!!!!!!!!!!!

Maybe you are looking for