Problem in multiple PDF downloads in BSP.

Hi,
         My BSP application downloads the outputs of three smartforms as PDF files. The BSP contains three checkboxes and a button. Each checkbox is the option to download the output of a smartform. I have declared three Page Attributes - w_chk1, w_chk2 and w_chk3 which stores the value of the checkboxes (i.e. whether they are checked or not) and I have checked their "Auto" values. My requirement is, if the user selects one or more checkboxes, then the corresponding PDF files will be downloaded. And problem that I am facing is, if the user checks more than one checkbox, then the PDF file of only the last checked checkbox is getting downloaded and the first ones are getting ignored.  Please suggest what could possibly be the problem.  I have used the following code to implement the download functionality -
Code in the OnInputProcessing method -
****Some codes go here here.*********
if not w_chk1 is initial.
**** Some codes go here to get the pdf output of the smartform 1 ***
         CALL METHOD cl_bsp_utility=>download
               EXPORTING
                  object_s            = w_pdfdata1
                  content_type        = 'application/download'
                 content_disposition = 'attachment;filename=smartform1.pdf'
                 res ponse            = is_m_response
                 navigation          = is_navigation.
endif.
if not w_chk2 is initial.
**** Some codes go here to get the pdf output of the smartform 2 ******
         CALL METHOD cl_bsp_utility=>download
               EXPORTING
                  object_s            = w_pdfdata2
                  content_type        = 'application/download'
                 content_disposition = 'attachment;filename=smartform2.pdf'
                 res ponse            = is_m_response
                 navigation          = is_navigation.
endif.
if not w_chk2  is initial.
**** Some codes go here to get the pdf output of the smartform 3 ******
         CALL METHOD cl_bsp_utility=>download
               EXPORTING
                  object_s            = w_pdfdata3
                  content_type        = 'application/download'
                 content_disposition = 'attachment;filename=smartform3.pdf'
                 res ponse            = is_m_response
                 navigation          = is_navigation.
endif.

Hi,
Declare a internal table and try to append the checkbox values..and run once..
check the last conditon once agian
if not w_chk2  is initial.
Hope this is helpful.let me know if you still have any problem
Thanks
kalyan

Similar Messages

  • Adobe Reader XI and Firefox 17.0.1 problems saving multiple PDFs

    Hello,
    I am running Adobe Reader XI (the most recent version as of my writing this), Firefox 17.0.1, and Windows 7 SP1.  I am trying to save multiple PDFs but I am only able to save one at a time before having to restart firefox.  Here is the chain of events:
    I open a PDF in a new browser window
    I click "Save" on the toolbar
    I select the location and save my new PDF
    I close the window and return to open an additional PDF
    The PDF opens in a new window
    I click the save button (see step 2)
    The button is present and animates when I click
    Nothing else happens (i.e., no prompt to select the save file location)
    I get upset
    I restart firefox
    Repeat steps 1-10 for additional PDFs
    I have a whole bunch of class lectures in PDF that I would like to save so I can study offline.  Please Help!
    Thanks,
    T

    I just tried this (Reader XI & Firefox 17.0.1), opening PDFs
    in the same tab as the link
    in a new tab
    in a new window
    all had no problem with saving; the explorer windows opened each time in My Documents folder.  I do not know why this does not work for you.
    Suggestion: if you have links to these online PDFs, right-click on the link, then select 'Save link as...'; that is anyway quicker than opening and saving the files.

  • PDF download from BSP application

    hi all,
    With the bellow code i am able to download to PDF from BSP application
    Issue is when i click on the download button waiting popup window is not disappearing even after PDF displayed.
    Please help me to resolve how to stop this waiting popup window.
    response->delete_header_field( name = 'Cache-Control' ).  "#EC NOTEXT
      response->delete_header_field( name = 'Expires' ).        "#EC NOTEXT
      response->delete_header_field( name = 'Pragma' ).         "#EC NOTEXT
    Deactivated because of Note 904314 and Kompression in Kernel
      response->set_compression( options = '4' ).
      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=candidate.pdf' ).
      l_pdf_len = XSTRLEN( l_pdf_xstring ).
      response->set_data( data   = l_pdf_xstring
                          length = l_pdf_len ).
      navigation->response_complete( ).
    Any help on this is highly appreciated.
    Thanks,
    Ravi

    May be you can navigate to another page AFTER the response_complete() method and show the message that 'PDF is downloaded successfully'
    or something meanful message. so that it will get a response back from server and 'wait...Processing' message might disappear.
    I'm not sure and didnt try..may be you can give it a try and let us know..
    navigation->response_complete( ).
    navigation->goto_page(....)

  • Problem with multiple files download (OD 6.0)

    Please, help me :(
    I have a proble with installation of Developer 6.0 after I
    downloaded multiple files and joined them.
    At command prompt it says "The program is too big to fit in
    memory" or something like it. (623K of conventional memory at
    that time).
    Do you know how to solve this problem. I will appreciate your
    help very much.
    Thank you.
    Leonid Roodnitsky
    null

    Please, help me :(
    I have a proble with installation of Developer 6.0 after I
    downloaded multiple files and joined them.
    At command prompt it says "The program is too big to fit in
    memory" or something like it. (623K of conventional memory at
    that time).
    Do you know how to solve this problem. I will appreciate your
    help very much.
    Thank you.
    Leonid Roodnitsky
    null

  • 3 Problems with Firefox: PDFs, Downloads, and Drop Menus

    Three problems.
    1) When I open a PDF in Firefox, where ever the cursor is becomes a kind of anchor from which the PDF file is highlighted. There is no way to deselect this (its like when you click-hold to select text), and it also renders all interface options with Firefox ineffective, requiring a CTRL-ALT-DEL to close Firefox and regain functionality.
    2) When downloading a file, the sub widow asking if you wish to save file or cancel appears, clicking save file greys out that option, and the sub window freezes on top of all other windows. Firefox, however, remains operational. The download never actually starts.
    3) Once a drop down menu has been opened, one can usually find the option they desire and click on it. But I cant, when I try to click on an option in a drop menu, it closes the menu and clicks whatever was behind the menu at the point where I clicked.
    More Info: I am running Firefox 8 (I had this problem with 7 as well) on two different laptops. One laptop encounters NONE of these problems, the other does. The one that does have these problems is an ASUS U56E-BBL6 running Windows 7, my other is a Sony VAIO also running 7. Additionally, my roommate also has a ASUS, and he uses Firefox just fine.
    Since encountering this problem on the ASUS, I have used IE (which I hate), Chrome and Opera. All three other browsers work perfectly and encounter none of these issues, but I miss the customization of Firefox.
    Please help.

    I can't help you much with BlackBerry link, but if you want to get your files on device memory right now then you can either copy to SD card and move them with file manager. Or..... enable wifi access on the phone if you have wireless, that way you can access both device and SD Memory as shared folders on the network.

  • Problem with multiple file download

    Good day.
    I have a code that downloads multiple files from the database and then saves it to a specified directory. I work fine but when I check the contents of the file, some of them are not complete. Lets, say I have downloaded 16 files and only file # 4,5,6,7 have the correct contents as compared to the original.
    Why is that so?
    my code snippet:
    DiskFileUpload fu = new DiskFileUpload();
              fu.setSizeMax(1000000000);
              List fileItems = fu.parseRequest(request);
             Iterator itr = fileItems.iterator();
              while(itr.hasNext())
              FileItem fi = (FileItem)itr.next();
              if(!fi.isFormField())
                     String filen = fi.getName();
                     String fname = filen.substring(filen.lastIndexOf(java.io.File.separator)+1);
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
                   connection = DriverManager.getConnection(connectionURL, "", "");
                   statement = connection.createStatement();
                   String sql = "INSERT INTO tblTestFiles("
                                    + "strFileName,"
                                    + "imgFile) "
                                    + "VALUES(?,?)";
                 PreparedStatement pstmt = connection.prepareStatement(sql);
                   //Set the values for strFileName and imgFile
                   pstmt.setString(1,fname);
                   // Set the blob
                   //File file = new File(fnew);
                 FileInputStream is = new FileInputStream(filen);
                 pstmt.setBinaryStream(2, is, (int)filen.length());
                     // Insert the row
                 pstmt.executeUpdate();I am using eclipse 5.5.23, eclipse 3.2 with myeclipse SDK, MS SQL, Ant.

    sorry I posted the wrong code. here's the correct one:
    statement = connection.createStatement();
            rs = statement.executeQuery("SELECT strFileName,imgFile FROM tblTestFiles ORDER BY strFileName");
            while (rs.next())
                   String filename = rs.getString(1);
                Blob blob = rs.getBlob(2);
                   InputStream is = null;
                   is = blob.getBinaryStream();
                   int i;
                   String dir = "C:\\DownloadedFiles";
                   File path = new File(dir, filename);
                   FileOutputStream fos = null;
                   fos = new FileOutputStream(path, true);
                   PrintWriter pout = null;
                   pout = new PrintWriter(new FileOutputStream(path,true));
                   while ((i = is.read()) != -1)
                      pout.write(i);
                   fos.close();
                   pout.close();
             }// end of if construct
        }// end of try
         catch (IOException e)
             e.getMessage (); e.printStackTrace();
              System.out.println(e);
        catch (SQLException e)
             e.getMessage (); e.printStackTrace();
              System.out.println(e);
        }Thanks.

  • Problem with quick printing multiple .pdfs from Outlook 2010

    Hi there,
    I have a user who is having problems printing multiple .pdf's using the quick print function in Outlook. I have tried reader 9,10 and 11.
    11 errors when printing (nothing specific in the error message) and only 1 or 2 documents are printed.
    9 and 10 error and report that a file is missing. Yet again, often prints 1 or two of the files.
    I have reproduced the problem on my own PC.
    Is there some type of bug with Adobe Acrobat printing multiple files using the quick print function within Outlook?
    Any help would be very much appreciated.
    Kind regards,
    Will

    I am not very skilled in Adobe by any means, but I was having the same issue.  When I did the Control P to print, I went into Print Options, then into Properties.  Under Adobe PDF settings, I unchecked the box that said "Rely on system fonts only; do not use document fonts." and that worked for me.
    Hope it helps.

  • Issue with PDF download

    Hi Guys,
    I am facing problem with the PDF download option. In the answers request I have to use Pivot tables to display data and since these pivot tables do not provide the option of Table Headings, I resorted to HTML to get a similar output. The issue I am facing right now is when I print it through PDF or Powerpoint, the HTML code I have written comes up instead of the result. In the case of excel or answers, I am getting the proper output. Is there some setting I am missing?? I am using the column with the HTML coding in the Columns section of the pivot table.
    Thnx!

    Hi,
    This is a known issue with HTML code embedded in your request, when you try to download the same in PDF, PowerPoint it will show the code.
    You can the following bugs regarding this in metalink.
    Bug 7187501: PDF SHOWS HTML TAGS WHILE PRINTING REPORT WITH BOLD LETTERS -HTML Tags Shown When Print or Export to PDF (Doc ID 1064060.1)
    Bug 9372634: HTML TAGS SHOWN WHEN PRINT/EXPORT TO PDF
    Bug 8899783: HTML TAGS APPEAR IN PDF REPORT
    Thanks,
    Vino

  • I bought a pdf book last year and had no problem reading it for a few months then all of a sudden I could no longer open it and to this day. Any other pdf download off internet I can still open and read, except for that particular book. Operating system i

    I bought a pdf book last year and had no problem reading it for a few months then all of a sudden I could no longer open it and to this day. Any other pdf download off internet I can still open and read, except for that particular book. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07.  When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help..

    Thank you for your reply. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07.  When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help.

  • Multiple invoices(spool jobs) download to multiple PDF files or 1 PDF file

    Hello techies:
    Has anyone written a program that takes the spool jobs of multiple Invoices from table TSP01 and then download these multiple invoices to multiple PDF files or to
    One PDF file depending on selection screen?
    This is an urgent request from client for archiving.  Any help is highly appreciated !
    Thanks so much
    SilviaB

    Hi Chris
    Try printing from another browser, such as Firefox. There have been issues between eBay's coding practices and how Safari interprets them.

  • PDF Download Problems

    Hi, this is a repeat post but maybe no-one noticed it when I posted it several months ago:
    I have problems with filenames of downloaded pdfs. I download pdfs from the internet, and my computer corrupts the filenames. For example, it replaces all the spaces with the string "%20" and sometimes, instead of the name of the file, it is just all numbers and "#" signs. Of course, I can re-type the correct filename, but why on earth aren't the correct ones just coming down with the file?
    Very frustrating because I deal with a lot of academic docs.

    Try the Internet Explorer or disable the PDF Viewer of Chrome.

  • Pdf download problem in lion

    Safari can download most files ok. But, pdf downloads result in a dark blank screen and no download.  There is no problem downloading in Chrome. Repairing permissions hasn't worked

    If you use Adobe Acrobat to view PDF files...
    Apple Safari 5.1 and Adobe Reader/Acrobat Advisory

  • I have a problem with opening PDF files downloaded from anywhere!

    I can view them ok in Safari, but when I save and download them, they are displayed with the Preview image and will not open.
    When I click them, a message says that 'the file may be damaged or not recognised by Preview'.
    I have cleaned up my computer (apple help ) but still, the problem remains. I downloaded the same file to my MacBook pro, and it saved it in the usual PDF format, (completely different image from above), and opened perfectly well.
    I have checked the settings in Preview and they seem to be set correctly so that Preview will open PDF files.
    What next?
    I am desperate!
    Jennifer

    See if you can delete any Adobe PDF plugins from /Library/Internet Plug-Ins/. Then quit and re-open your web browser and try again.

  • Problems with PDF downloads

    I was ready to blame the latest update from Apple, but perhaps not. Here are the symptoms:
    Our church publishes a newsletter in PDF format which can be downloaded from their web site every month. This month, after the latest Apple update, the downloaded document has problems. General format is OK (boxes around text, images) but all text is simply grey bars that seem shaded from one side of the page to the other.
    If I save the document and try to open it in Preview the same problem.
    HOWEVER, if I open the document in the Adobe reader the document is fine!
    I thought this might be a problem with my iMac (first of the aluminium iMacs), so I tried this on my Apple laptop (recent vintage). Both machines run 10.6.8 with the latest updates from Apple applied. I have no funny "helper" programs; i.e. the software is pretty clean and all updated.
    Same issue on the laptop.
    HOWEVER I looked for a generic pdf download on the web and downloaded a PDF instruction sheet from the Moen (plumbing) web site - no problem!
    So now my suspicion is that the PDF document has the problem. But I would have thought that PDF is PDF and if the Adobe reader can handle the document that Safari and Preview should be able to? Is there some format switch in the program used to generate the PDF document that would cause the Apple programs to fail but Adobe to succeed?
    Any thoughts welcomed! I'd like to figure out if it's me or them.
    PS - I've not yet tried this on that "other" operating system. I could do that with a trip to the library

    Thanks guys. I think I'll just rely on Acrobat as suggested. Sounds like somehting has changed on their end as the previous month's file loads fine.
    I'll check with teh secretary ans see what has happened.
    Thanks

  • Strange problem of Pdf downloading  with Web Dynpro

    Hi, experts, I have to setup a project to realize pdf downloading with web dynpro. But unluckily, I have tried all the methods in this froum ,there's really strange problem .Because when I click the link of Download UI link, there's no reaction at all, I really don't know why.Below is the codes I used , can anyone help me ? thank you very much!
    public void wdDoInit()
        //@@begin wdDoInit()
              IWDAttributeInfo attInfo =
                   wdContext
                        .currentContextElement()
                        .node()
                        .getNodeInfo()
                        .getAttribute(
                        "Pdfsource");
              ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
              IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;
              binaryType.setFileName("test.pdf");
              binaryType.setMimeType(WDWebResourceType.PDF);
              try {
                   int length =
                        (int) wdContext.currentPdfdownloadElement().getBin_Filesize();
                   byte b[] = new byte[length];
                   b = wdContext.currentPdfdownloadElement().getBin_File();
                   wdContext.currentContextElement().setPdfsource(b);
              } catch (Exception ex) {
    "Pdfsource" is the context value attribute of type binary.And Bin_File is the xstring type parameter from my RFC contains pdf content.
    I used two views and one customer-controller . I put some value in the first view to set search condition.and the second then appears and have the download UI element. Are there any additional codes I should use? pls help!

    Hi Hao,
    Try this out
    Suppose the file name is test.doc in c drive in server
    create a context attribute filedata of binary type
    bind it to data property
    write the following code
    try
       File input = new File("C:
    test.doc");
       int length =(int)input.length();
       //Create a byte array b to hold the file
       byte b[] = new byte[length];
       FileInputStream in = new FileInputStream(input);
       //Reading the file to a byte array b
       in.read(b);            
       in.close();
       //Setting the data from the byte array to the context element.
       wdContext.currentContextElement().setfiledata(b);
    catch(Exception ex)
      wdComponentAPI.getMessageManager().reportSuccess("Error in File 
      IO"+ex.toString());
    // Structure information of the context attribute
    IWDAttributeInfo attinfo = wdContext.getNodeInfo().getAttribute("filedata");
    IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attinfo.getModifiableSimpleType();
    // Default File name which appears when opened on client machine
    binaryType.setFileName("testing.doc");
    //Explicitly setting the file type
    binaryType.setMimeType(WDWebResourceType.DOC);

Maybe you are looking for