PDF File with the Output screen shot

Hello experts,
In my custom program, i want to generate the PDF file for the output List screen. i.e. when i run program, generated Output list screen itself  is to be captured into a PDF file and PDF file should be saved at  predefined Local system.
Is it possible? and if yes then please give me some suggestion.
Thanks in advance
Regards
Jagesh

hii jagesh,
first take all the field you are displaying in an internal table and den call FM GUI_DOWNLOAD.
ALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = 'D:\salesdata.txt'/.xls----
>  path where u want to download o/p on your desktop
      filetype                = 'ASC'
      append                  = 'X'
      write_field_separator   = 'X'
    TABLES
      data_tab                = gi_sales_order_display------- internal table you r fetching the data
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21
      OTHERS                  = 22.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.
regards,
Shweta

Similar Messages

  • Writing a java program for generating .pdf file with the data of MS-Excel .

    Hi all,
    My object is write a java program so tht...it'll generate the .pdf file after retriving the data from MS-Excel file.
    I used POI HSSF to read the data from MS-Excel and used iText to generate .pdf file:
    My Program is:
    * Created on Apr 13, 2005
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    package forums;
    import java.io.*;
    import java.awt.Color;
    import com.lowagie.text.*;
    import com.lowagie.text.pdf.*;
    import com.lowagie.text.Font.*;
    import com.lowagie.text.pdf.MultiColumnText;
    import com.lowagie.text.Phrase.*;
    import net.sf.hibernate.mapping.Array;
    import org.apache.poi.hssf.*;
    import org.apache.poi.poifs.filesystem.*;
    import org.apache.poi.hssf.usermodel.*;
    import com.lowagie.text.Phrase.*;
    import java.util.Iterator;
    * Generates a simple 'Hello World' PDF file.
    * @author blowagie
    public class pdfgenerator {
         * Generates a PDF file with the text 'Hello World'
         * @param args no arguments needed here
         public static void main(String[] args) {
              System.out.println("Hello World");
              Rectangle pageSize = new Rectangle(916, 1592);
                        pageSize.setBackgroundColor(new java.awt.Color(0xFF, 0xFF, 0xDE));
              // step 1: creation of a document-object
              //Document document = new Document(pageSize);
              Document document = new Document(pageSize, 132, 164, 108, 108);
              try {
                   // step 2:
                   // we create a writer that listens to the document
                   // and directs a PDF-stream to a file
                   PdfWriter writer =PdfWriter.getInstance(document,new FileOutputStream("c:\\weeklystatus.pdf"));
                   writer.setEncryption(PdfWriter.STRENGTH128BITS, "Hello", "World", PdfWriter.AllowCopy | PdfWriter.AllowPrinting);
    //               step 3: we open the document
                             document.open();
                   Paragraph paragraph = new Paragraph("",new Font(Font.TIMES_ROMAN, 13, Font.BOLDITALIC, new Color(0, 0, 255)));
                   POIFSFileSystem pofilesystem=new POIFSFileSystem(new FileInputStream("D:\\ESM\\plans\\weekly report(31-01..04-02).xls"));
                   HSSFWorkbook hbook=new HSSFWorkbook(pofilesystem);
                   HSSFSheet hsheet=hbook.getSheetAt(0);//.createSheet();
                   Iterator rows = hsheet.rowIterator();
                                  while( rows.hasNext() ) {
                                       Phrase phrase=new Phrase();
                                       HSSFRow row = (HSSFRow) rows.next();
                                       //System.out.println( "Row #" + row.getRowNum());
                                       // Iterate over each cell in the row and print out the cell's content
                                       Iterator cells = row.cellIterator();
                                       while( cells.hasNext() ) {
                                            HSSFCell cell = (HSSFCell) cells.next();
                                            //System.out.println( "Cell #" + cell.getCellNum() );
                                            switch ( cell.getCellType() ) {
                                                 case HSSFCell.CELL_TYPE_STRING:
                                                 String stringcell=cell.getStringCellValue ()+" ";
                                                 writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
                                                 phrase.add(stringcell);
                                            // document.add(new Phrase(string));
                                                      System.out.print( cell.getStringCellValue () );
                                                      break;
                                                 case HSSFCell.CELL_TYPE_FORMULA:
                                                           String stringdate=cell.getCellFormula()+" ";
                                                           writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
                                                           phrase.add(stringdate);
                                                 System.out.print( cell.getCellFormula() );
                                                           break;
                                                 case HSSFCell.CELL_TYPE_NUMERIC:
                                                 String string=String.valueOf(cell.getNumericCellValue())+" ";
                                                      writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
                                                      phrase.add(string);
                                                      System.out.print( cell.getNumericCellValue() );
                                                      break;
                                                 default:
                                                      //System.out.println( "unsuported sell type" );
                                                      break;
                                       document.add(new Paragraph(phrase));
                                       document.add(new Paragraph("\n \n \n"));
                   // step 4: we add a paragraph to the document
              } catch (DocumentException de) {
                   System.err.println(de.getMessage());
              } catch (IOException ioe) {
                   System.err.println(ioe.getMessage());
              // step 5: we close the document
              document.close();
    My Input from MS-Excel file is:
         Planning and Tracking Template for Interns                                                                 
         Name of the Intern     N.Kesavulu Reddy                                                            
         Project Name     Enterprise Sales and Marketing                                                            
         Description     Estimated Effort in Hrs     Planned/Replanned          Actual          Actual Effort in Hrs     Complexity     Priority     LOC written new & modified     % work completion     Status     Rework     Remarks
    S.No               Start Date     End Date     Start Date     End Date                                        
    1     setup the configuration          31/01/2005     1/2/2005     31/01/2005     1/2/2005                                        
    2     Deploying an application through Tapestry, Spring, Hibernate          2/2/2005     2/2/2005     2/2/2005     2/2/2005                                        
    3     Gone through Componentization and Cxprice application          3/2/2005     3/2/2005     3/2/2005     3/2/2005                                        
    4     Attend the sessions(tapestry,spring, hibernate), QBA          4/2/2005     4/2/2005     4/2/2005     4/2/2005                                        
         The o/p I'm gettint in .pdf file is:
    Planning and Tracking Template for Interns
    N.Kesavulu Reddy Name of the Intern
    Enterprise Sales and Marketing Project Name
    Remarks Rework Status % work completion LOC written new & modified Priority
    Complexity Actual Effort in Hrs Actual Planned/Replanned Estimated Effort in Hrs Description
    End Date Start Date End Date Start Date S.No
    38354.0 31/01/2005 38354.0 31/01/2005 setup the configuration 1.0
    38385.0 38385.0 38385.0 38385.0 Deploying an application through Tapestry, Spring, Hibernate
    2.0
    38413.0 38413.0 38413.0 38413.0 Gone through Componentization and Cxprice application
    3.0
    38444.0 38444.0 38444.0 38444.0 Attend the sessions(tapestry,spring, hibernate), QBA 4.0
                                       The issues i'm facing are:
    When it is reading a row from MS-Excel it is writing to the .pdf file from last cell to first cell.( 2 cell in 1 place, 1 cell in 2 place like if the row has two cells with data as : Name of the Intern: Kesavulu Reddy then it is writing to the .pdf file as Kesavulu Reddy Name of Intern)
    and the second issue is:
    It is not recognizing the date format..it is recognizing the date in first row only......
    Plz Tell me wht is the solution for this...
    Regards
    [email protected]

    Don't double post your question:
    http://forum.java.sun.com/thread.jspa?threadID=617605&messageID=3450899#3450899
    /Kaj

  • I have a pdf file with the added sounds, so I can not run the sound in adobe reader XI on my tablet samsung galaxi pro (android)

    I have a pdf file with the added sounds, so I can not run the sound in adobe reader XI on my tablet samsung galaxi pro (android)

    Thanks for writing to us. Unfortunately, such advanced javascript support is currently not provided by Adobe Reader for Android.
    Thanks,
    Adobe Reader Team

  • Automating the process of comparing two PDF file with the help of QTP(Automation Testing Tool)

    Can anybody help me with comparing the two pdf files with the help of QTP.I have Adobe Acrobat installed on my system and i have access to the API.
    Thanks,
    Varun Saini

    I want to find out more about QTP and API. Maybe that is what I want to compare two mechanical drawings for differences between them. (see “More than one pdf file in one window”. Is that what you are looking to do? 9Not necessarily mechanical drawings but some other pdf).

  • How to generate the SAP config guide with the customization screen shots?

    Hello there, is there any way to generate a SAP Config Guide but with the customization screen shots?. I´m customizing using solman and I also generating the config guide but I have notice those congif guide comes out with no screen shot. How can I integrate them?.
    Thanks in advance.

    Hi Yasmin,
    Sorry but to inform that you're in wrong forum. Solution manager (Solman) used in SAP R/3, this forum is for SAP Business One only.
    Best Regards,
    Hendry Wijaya

  • Can't open PDF-Files with the 64Bit Photoshop-Version but with 32Bit Version

    Hello,
    our company use Photoshop in combination with PDF-Files. Normally we can open every of our PDFs with Photoshop.
    But now we have some PDFs that we can't open with the 64Bit version. If we try it the application crashes.
    But we are able to open the same files with the 32Bit version of Photoshop. We assume a bug in the 64Bit Version.
    Please contact me to get the a PDF-Sample-File because i am not allowed to append the file to a public space.
    Regards
    Carsten Evers
    PS: email: [email protected]

    Hi Carsten,
    I'll move this to the PS forums on your behalf for further assistance. 
    Cheers!
    -Sidney

  • Upload new pdf file with the same name

    We are trying to upload a pdf file with a specific name (i.e
    file.pdf) that has links to it on many pages of a website. We need
    the pdf file to keep the same name but when we try to upload it,
    Contribute is being 'smart' and changing the name so as to not
    overwrite the file on the server. But we WANT to overwrite the file
    on the server. Any ideas on how we can achieve this in Contribute?
    Thanks so much (in advance) for your help!

    Actually, we have the same problem and I believe the answer
    lies in the abilities that your role has assigned to it. The
    solution that ThinkInk gave works *if you are allowed to delete
    files*. If your role doesn't have that permission, then it will
    just upload another copy of the file and rename it.
    It's rather irritating that there isn't more control over
    this...our server is littered with *thousands and thousands* of
    duplicate files that originate from this situation.
    If your administrator wants you to be able to delete files as
    well, then you could get him/her to give you that permission, and I
    believe this will allow you to overwrite the file by using the
    "Publish file from my computer" option described above.

  • Is there a way to "stamp" PDF files with the purchaser's email address?

    I would like to sell PDF reports and/or eBooks via BC, but I would like to be able to stamp each such PDF/eBook with the purchaser's email address.
    There are certainly stand-alone PDF stamper programs and some providers like gumroad.com already offer that feature.
    Anyone actually done it with BC, please?
    Thanks in advance
    Andy

    Thanks for the rapid response, Liam -- even if it's not the response I was hoping for.

  • Print PDF file with the lay out created in the BEx web application designer

    Got the following questions (problems) when print a web report created in BEx Web Application Designer to a PDF file:
    1. The tile (which has a company logo and report name in it) was not printed, is it possible to print a title (with company logo) on each page of the PDF file?
    2. Want print the filters that have value specified on the PDF file, is it possible to do this?
    Any help is appreciated, thanks.

    Hi Simon,
    you can achieve this requirement i.e. using this way of implementation:
    1. Create a new template which contains the required fields (company logo etc) and set the visibility of the top container to "hidden". Add a empty data provider to this template and add the filter values (variable names) you want to display on the PDF. However be aware that the name for the (empty) data provider must match the name of the data provider within the original template you want to print.
    2. Open your original template and include the template you created in step 1 (Advanced: Web Templates). Choose the appropriate location (above/below the analysis item.
    3. Check the settings of your export command: do not set a special web item to be printed.
    If you export the template within web the second template should be printed correctly.
    Brgds,
    Marcel

  • Open pdf file with the client's Reader, not in a browser, HOW ?

    Hi All,
    I have a web application written in VB in wich  an user can request to open a pdf file stored on the server.
    I'm looking for a script that will force the requested pdf to be opened in client's Reader and not in a browser's Reader plugin,
    Thanks, Yan

    This is not a problem that can be addressed with LiveCycle Designer script. Designer or Acrobat script has context once the PDF is open, which does not help you. Perhaps a solution can be found in Windows Script Host. I have not touched WSH in a long time but I recall that is possible to do something like...
    ' Get a Reader instance by ProgID
    Set obj = GetObject(,"AcroExch.Document")
    ' Check if an instance of Reader is not already running. If an instance is running, create a new instance.
    If TypeName(obj) <> "Document" Then
        Set obj = CreateObject("AcroExch.Document")
    End If
    or
    ' Start the application (Reader) associated with the file type
    Set obj = GetObject("c:\foobar.pdf")
    Steve

  • I cannot download .pdf files with the new version of Firefox

    Using Firefox 1.5, .pdf files automatically download to my desktop. With Firefox 3.6.13 a new tab/window opens and a box where the document should appear remains blank. When I attempt to 'right' click on the link, it doesn't allow me to download the linked file, only the linked address. I am able to open the .pdf files using another web browser such as Sarfari

    The Google Toolbar "will not be supported on Firefox 5 and future versions." <br />
    http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
    http://www.google.com/support/toolbar/bin/answer.py?answer=1342452&topic=15356%29
    The Google Toolbar '''7.1.20110512W''' version does work pretty good in Firefox 5.0 by using the Compatibility Reporter extension. But not every feature works 100%.<br />
    https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    http://googlesystem.blogspot.com/2011/06/enable-google-toolbar-in-firefox-5.html

  • How do I encript (password) a pdf file with the latest update

    I really want to know how these geeks do these, a PDF file you can't copy or edit and another one you need a password to open.
    Can I use the latest adobe update to add these features to my existing pdf files.
    Thanks
    Buchi

    Sorry, I don't know what you mean by Adobe update.
    Adobe Reader (free) cannot set security, never could.
    Adobe Acrobat ($$) can do so.

  • HT1750 unable to download pdf files with the new lion instillation

    I am unable to download pdf files after installing lion.

    I have an imac purchased 4/2010 and same thing happened to me but can't find anyone to address it. The real tragedy here is that I paid for the full adobe creative suite, web premium back in 2010 and Adobe Pro can't open them, although it worked just fine before. Then I installed the latest version of Adobe reader and tried changing that to my default and that doesn't work either.
    It's pretty lame that I have to go on my boyfriends windows pc to open and print a .pdf as the only alternative. I did not read about this when researching whether or not to upgrade to lion from snow leopard otherwise I would not have kept the old operating system.
    Why isn't apple addressing this???

  • I cannot view a PDF file with the script in Adobe Garamond Pro on my iPad.  Can anyone help?

    I cannot view a PDF file written using Adobe Garamond Pro font on an iPad.  Can anyone help?

    Thanks for writing to us. Unfortunately, such advanced javascript support is currently not provided by Adobe Reader for Android.
    Thanks,
    Adobe Reader Team

  • How to open PDF file with the view I wish without many clicks

    I am getting many many scanned files daily and I'd like to able to skim thru each file as fast as possible.
    Since the way each file scanned is consistent, when I open it, I am clicking a button to rotate it counterclock, then click zoom-in a few times to be able to read the top portion to see if the file is of my interest.
    Can we customize the way the files are opened?  I wish that once I open it, it will be rotated (so that I don't have to tilt head to read it), and zoom in big enough for me to read it.
    I did try (I am new to this) "accessabitly settup assistant", but couldn't achieve my desired effect.
    Any suggestions?
    thanks.
    JQ

    Thank you for the suggestions. Appreciated it.
    Actually when I asked whether they could scan it differently, I was told "no" for that type of scanner they have, and they have been reading it the same way as I just start to do, for years.
    Maybe someone knows about what scanners have the feature to do these tricks?
    I tried the preference setting. It's still less manageable. However, I manage to be able to click 3 buttons to get to the top portion to be readable.
    First, I rotate it counterclock (which mess up the view zoom in setting preference).
    Then I click to "show one page" button;
    Then I clcik to make the document to fill the width. (at this point, the zoom in is about 79%).

Maybe you are looking for

  • External hard drive not spinning up

    Hi, I have a 160GB Freecom FHD-3 external hard drive connected to my iBook with USB 2.0 that I use to store all my music / movies etc. I have a slight problem with this drive and i was wondering if anyone could help me. Firstly when i turn the iBook

  • How do I add Segments of Time in Numbers '09?

    Aloha: I am trying to wean myself off of Microsoft... so I'm trying to set up a TV Show Rundown sheet in Numbers.  I can do it easily in Excel but can't figure it out in Numbers.  Help.... After a Description Column, I have two columns displaying Tim

  • Uninstalling OS X Mavericks Server

    I am a registered iOS Dev and got access to OS X Mavericks Server for free. I decided to take advantage of it, but after realizing how much extra space it was taking on my iMac, I have decided I want to delete it. What is the best way to do so? I wou

  • Can't identify which email address returns as bounced

    I have a large group of addresses to which I send email.  I send the group via Bcc in order to protect their privacy.  I get back the following messages: Any idea on how to identify the offending addresses in my group without broadcasting all the add

  • Open tab in the tab bar from a folio

    Hi, is it possible to have a button inside a folio that close the folio and than open a tab in the iPad custom viewer tab bar? Thx