Problem in Downloading PDF file in ITS

Hi,
We are using SSFCOMP_PDF_PREVIEW function module , in ITS only blank screen appearing. There after we made Z function module  where we called the ALEWB_DOWNLOAD function module of the screen PBO module. Now file is getting displayed in a full screen mode. We want that file should come within screen as it is normal R/3 scenario.Please help in this. Is there any other download function module which works in ITS(Internet Transaction Service)

First create the Samrtform for the preview and then convert the same using the FM below:
call function 'CONVERT_OTF'
       exporting
            format                = 'PDF'
       importing
            bin_filesize          = v_binfilesize
       tables
            otf                   = gt_otf[]
            lines                 = gt_pdf[]
       exceptions
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            others                = 4.
  if sy-subrc <> 0.
    raise no_pdf_written.
  endif.

Similar Messages

  • Spool to PDF - Problems with downloading PDF file when converting with job

    Hi all!
    I've got a problem. I've got a program that writes a smartform into the spool. After that, I am using the function modules RSTS_GET_ATTRIBUTES and CONVERT_OTFSPOOLJOB_2_PDF to convert it into PDF. I retrieve a internal table with the binary content for the PDF file. Now i can download the file to the desktop by using the method cl_gui_frontend_services=>gui_download.
    But there is a problem: when the spool excesses 99 pages, the function module CONVERT_OTFSPOOLJOB_2_PDF asks the user via popup if the PDF should be created in background. If the user commits, the internal tables that should contain the binary PDF data is emtpy. A background job writes the binary data into the spool. The user has got an empty file that will be generated by cl_gui_frontend_services=>gui_download.
    So, is it possible to suppress the popup to create the PDF allways online? Or how can I write the PDF file if there will be create any spool id in background? You'll find my current code below.
    * Prüfen ob es die übergebene Spoolnummer überhaupt gibt
      SELECT SINGLE * FROM tsp01 INTO ls_tsp01 WHERE rqident = id_spoolid.
      IF ( sy-subrc <> 0 ).
        cf_error = 'X'.
        EXIT.
      ENDIF.
    * TemSe-Objekte speichern sequentielle Daten. Ein TemSe-Objekt kann aus
    * mehreren Teilen bestehen. Dieser FB ermittelt die wichtigsten Attribute
    * eines TemSe-Objekts. Falls das Objekt aus mehreren Teilen besteht, werden
    * die Attribute entsprechend zusammengefaßt.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
        EXPORTING
          client        = ls_tsp01-rqclient
          name          = ls_tsp01-rqo1name
          part          = 1
        IMPORTING
          objtype       = ld_objtype
        EXCEPTIONS
          fb_error      = 1
          fb_rsts_other = 2
          no_object     = 3
          no_permission = 4
          OTHERS        = 5.
      IF ( sy-subrc <> 0 ).
        cf_error = 'X'.
        EXIT.
      ENDIF.
      IF ld_objtype(3) = 'OTF'.
        lf_is_otf = 'X'.
      ELSE.
        lf_is_otf = ' '.
      ENDIF.
      IF ( lf_is_otf = 'X' ).
    *   Konvertiere OTF-Spoolauftrag nach PDF
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = id_spoolid
            no_dialog                = ' '
    *        pdf_destination          = 'T'
          IMPORTING
            pdf_bytecount            = ld_numbytes
            pdf_spoolid              = ld_pdfspoolid
            btc_jobname              = ld_jobname
            btc_jobcount             = ld_jobcount
          TABLES
            pdf                      = lt_pdf
          EXCEPTIONS
            err_no_otf_spooljob      = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_dstdevice        = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 10
            err_btcjob_close_failed  = 11.
        IF ( sy-subrc <> 0 ).
          cf_error = 'X'.
          EXIT.
        ENDIF.
      ELSE.
    *   Konvertiere ABAP-Liste-Spoolauftrag nach PDF
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = id_spoolid
            no_dialog                = ' '
          IMPORTING
            pdf_bytecount            = ld_numbytes
            pdf_spoolid              = ld_pdfspoolid
            btc_jobname              = ld_jobname
            btc_jobcount             = ld_jobcount
          TABLES
            pdf                      = lt_pdf
          EXCEPTIONS
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 10
            err_btcjob_close_failed  = 11.
        IF ( sy-subrc <> 0 ).
          cf_error = 'X'.
          EXIT.
        ENDIF.
      ENDIF.
      WHILE ( lf_file_ok = '' ).
    *   Die in der Tabelle lt_pdf enthaltenen Binärdaten werden nun in eine
    *   Datei geschrieben. Da alle übergebenen Tickets in die gleiche Datei
    *   geschrieben werden, kann der im Speicher gehaltente Protokolleintrag
    *   gelesen werden
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            bin_filesize              = ld_numbytes
            filename                  = cd_filename
            filetype                  = 'BIN'
    *    append                    = SPACE
    *    write_field_separator     = SPACE
    *    header                    = '00'
    *    trunc_trailing_blanks     = SPACE
    *    write_lf                  = 'X'
    *    col_select                = SPACE
    *    col_select_mask           = SPACE
    *    dat_mode                  = SPACE
          confirm_overwrite         = 'X'
    *    no_auth_check             = SPACE
    *    codepage                  = SPACE
    *    ignore_cerr               = ABAP_TRUE
    *    replacement               = '#'
    *    write_bom                 = SPACE
    *    trunc_trailing_blanks_eol = 'X'
    *    wk1_n_format              = SPACE
    *    wk1_n_size                = SPACE
    *    wk1_t_format              = SPACE
    *    wk1_t_size                = SPACE
    *  IMPORTING
    *    filelength                =
          CHANGING
            data_tab                  = lt_pdf
          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
            not_supported_by_gui      = 22
            error_no_gui              = 23
            OTHERS                    = 24.

    Creating a PDF file with over 99 pages through SAP seems rather unreasonable to me. What are you printing - Encyclopedia Britannica? For cripes sake... Have you thought about creating more than one spool request or using something completely different? Why do you have to do this through spool? You can get Smartform output directly into PDF, there are a lot of example out there.
    The only solution that comes to mind is rather brutal - create a copy of the function module and get rid of the popup. Although it just might time out after that...

  • Problem in download pdf files.

    I downloaded adobe reader but it shows invalid PDF file how can I read these files.

    To configure the browser to use Acrobat or Adobe Reader to open PDF files:
    1. Quit Internet Explorer(any other browser)
    2. Start Acrobat or Adobe Reader.
    3. Choose Edit > Preferences.
    4. Select Internet in the list on the left.
    5. Deselect(Uncheck) Display PDF in Browser, and click OK.
    6. Restart Internet Explorer

  • Has anyone experienced problems saving downloaded pdf files in Yosemite?

    In Mavericks, I could choose the pdf file destination folder using the save dialog box's "search" entry to select the folder to save a file in. Now the search feature seems to have been disabled. Yosemite appears to have implemented a new method to choose a destination folder. It sometimes allows me to navigate to a parent folder and get a list of sub folders that I can scroll through to choose the desired one. Problem is that the feature seems to be unstable - I can't reliably get this feature to work and wonder if I can downgrade to Mavericks.

    In Mavericks, I could choose the pdf file destination folder using the save dialog box's "search" entry to select the folder to save a file in. Now the search feature seems to have been disabled. Yosemite appears to have implemented a new method to choose a destination folder. It sometimes allows me to navigate to a parent folder and get a list of sub folders that I can scroll through to choose the desired one. Problem is that the feature seems to be unstable - I can't reliably get this feature to work and wonder if I can downgrade to Mavericks.

  • Problem opening downloaded PDF files

    When I click on a PDF link in Safari, I would normally expect the document to open with Acrobat 7.0.
    What is happening now, is that the screen changes to 'browse' option asking me to identify which application will open the PDF. When I click on Acrobat 7.0, the screen goes blank.
    So, basically, I can't open downloaded PDFs from Safari, (though it's Ok with Opera, Firefox etc)
    In the Acrobat prefs, in the internet settings, 'Display PDF in browser using: Adobe Acrobat 7.0 Professional (7.0.0)' is checked.
    Mac Power PC, 2G RAM, OSX 10.4.11; Safari 3.2.1, Acrobat 7.0.0

    Do you have more that one version of Acrobat or reader loaded?
    Only one is certified to work at a time.

  • Problems viewing downloaded PDF files with Adobe Download Assist.

    How can I start using Adobe Down Load Assist, I need to view some forms in PDF format? & How can I change the way I view my forms?

    Are you trying to view PDF forms?  If so then you may want to use Adobe Reader.  You can find the download for Adobe Reader at http://get.adobe.com/reader/.

  • Problem downloading pdf file in Safari

    My website has a link which downloads a pdf file, which opens in a new browser window. In OS X, this works properly using the latest Safari update (4.0.5), as well as in Firefox and several other browsers (the file opens in Preview). I also run Windows XP using Boot Camp. I updated Safari to 4.0.5 in Windows, and also installed the latest version of Adobe Reader. But when I link to the pdf file in Windows using Safari, the program freezes. Both Firefox and Internet Explorer download the pdf file properly in Windows (the file opens in Adobe Reader).
    I'm pretty sure that earlier Windows Safari versions correctly downloaded pdf files. Could this be a problem with Safari 4.0.5? Is there plugin in the new Safari that I'm missing, or something that needs to be set in either Safari or Adobe Reader?

    I went through the recommended uninstall/reinstall procedure, but unfortunately it didn't fix the problem. When I first ran the new Safari install and clicked on the link to download the pdf, it opened a new window with a message that it couldn't find the server on which the pdf file is located (but of course it's on the same server as the parent page). After churning (hourglass cursor) for a couple of minutes, the new page (now running Adobe Reader, I think) displayed a small cube with question marks (missing file). On subsequent tries, Windows shut down Safari as "not responding".
    I suspect that the problem is with Adobe Reader 9.3.1 and its interaction with Safari. (The other browsers continue to download the pdf properly.) I checked the Adobe site but didn't see an obvious way to install an earlier version of Reader, but willl investigate this further.
    Many thanks for your help. (I've been forced to learn more about Windows than I really wanted to know.)
    Charles Hearn

  • PDF PROBLEMS!  Not able to download PDF files into Safari anymore?!?

    I was always able to download PDF files into Adobe Reader from the internet. I can't download them anymore...My MacBook keeps trying to load and reload the page, but never does it. I downloaded the most recent Adobe Reader 9, but this did not fix the problem. I can open PDF files I have saved, but can' t download them in Safari. Any ideas? Thanks-

    Hi Jes,
    I get an error message saying
    "The page cannot be found"
    infact when i hover the mouse over the link i am able to see the correct path and the correct correct values as follows
    schema.procedure?V=04&C=001
    but when i click on it, i get the error as above.
    i am not sure whether it is any permissions issue in linux. or is the procedure not getting executed properly at all.
    but iam able to read those pdfs and insert them into an oracle table.
    but just not able to download them back again.
    but exactly the same code and same tables etc work in windows.
    Thanks,
    Philip.

  • I have installed Adobe Reader 11.0.07 for Mac OS 10.9.3. Have asked this question numerous time without results. The problems I am having are: I cannot scroll using the side slider on downloaded PDF files, nor can I fill in fillable files. Also, and this

    I have installed Adobe Reader 11.0.07 for Mac OS 10.9.3. Have asked this question numerous time without results. The problems I am having are: I cannot scroll using the side slider on downloaded PDF files, nor can I fill in fillable files. Also, and this is extremely irritating, I cannot re-initialize the same file or initialize and another PDF file after I have initialized the first file. If you cannot help please let me know if should use an earlier  version of Reader or find anther company that has the appropriate software.

    Perhaps you missed that you started a discussion at I have OS 10.9.2 and have downloaded latest version of Reader 11. I can no longer fill in form or scroll using the side bar. and you did not respond to the last post there.

  • When saving an downloaded pdf-fil, the saved file is corrupt (empty?) and can´t be opened. Happens all the time nowadays, never before. Its a mess. Please advice.

    When saving an downloaded pdf-fil, the saved file is corrupt (empty?) and can´t be opened. Happens all the time nowadays, never before. Its a mess. Please advice.

    Hi Melbus_SE,
    Are you downloading files from your Acrobat.com cloud storage? If so, what browser are you using, and are you on Mac OS or Windows? Has something changed on your system since you were able to download/open PDF files successfully? What version of Acrobat or Reader are you using to open these files?
    Sorry to ask so many questions, but your answers will help us get to the bottom of this issue.
    I look forward to hearing back from you.
    Best,
    Sara

  • I cannot download PDF files and have many other problems with updates since 3.6.18 are you guys going to fix or should I switch to IE?

    Hi Guys,
    I have had heaps of trouble with plugins and add on's since using upgrades after 3.6.18. Now I cannot download PDF files!
    Are you Guys going to fix what used to be a good browser or do I have to use IE?
    Please keep it simple.
    John Smith

    -> go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. Now do this:
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE any Unwanted/Suspicious Extensions (add-ons) -> Restart Firefox
    -> Update ALL your Firefox Plug-ins https://www.mozilla.com/en-US/plugincheck/
    -> go to View Menu -> Zoom -> click "Reset"
    -> go to View Menu -> Page Style -> select "Basic Page Style"
    -> go Tools Menu -> Clear Recent History -> '''''Time range to clear: select EVERYTHING''''' -> click Details (small arrow) button -> place Checkmarks on ALL Options -> click "Clear Now"
    -> go to Tools Menu -> Options -> General -> '''''When Firefox starts : select "Show My Home Page"''''' -> Type the address of the website which you want to be your HomePage e.g. http:www.google.com -> click OK
    You can enable the Trustworthy Add-ons later. Check and tell if its working.

  • Hi, since installing mountain lion on my macbook, it wont download pdf files from internet sites, the same problem does not exist on my mac mini, i am using firefox on both macs, please help!

    Hi, since installing mountain lion on my macbook, it wont download pdf files from internet sites, the same problem does not exist on my mac mini, i am using firefox on both macs, please help!

    Back up all data.
    Quit Safari. In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then launch Safari and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • With the new update: I click on .pdf to download and multiple new tabs open w/o downloading .pdf file

    Every time I click to download a .pdf file for a study on the following site
    http://www.regionschristiancenter.org/the-rabbis-son/rabbis-son-study-archives/archives-dvarim-deuteronomy/
    Firefox opens multiple new tabs and does not stop doing so until I close the browser and even then it opens up on its own and continues to open multiple new tabs. If I do not get to it quickly enough, I may have to do this more than twice.
    I have tried downloading a study on Internet Explorer and do not have this issue. There is also a Microsoft Word option that works on Firefox but it's the .pdf that is the problem.
    I have not attempted to download any other .pdf files from other sites so I do not know if it is a problem with all .pdf files. But as stated above, it is not an issue with .pdf on IE.

    Could you check your PDF viewer preference and try changing it to a different viewer to see whether that helps? This article describes how to access that setting: [[How to disable the built-in PDF viewer and use another viewer]].
    Unfortunately, the settings file that stores those application handling preferences sometimes contains crossed up settings or settings which Firefox cannot actually implement. In that case, you generally need to rename or remove that file and let Firefox rebuild it. The steps for that are in this article: [[Firefox repeatedly opens empty tabs or windows after you click on a link]] -- skip to the section "Reset actions for all content types".

  • Downloading PDF files

    Why all of a sudden, when I try to download PDF files, I just get a black screen?
    Never had this problem, before.
    I have trided downloading a pdf file, that Idownloaded some time ago with no problem, but now iget the black screen all the time.
    Help!!!

    Back up all data.
    If Adobe Reader or Acrobat is installed, there should be a setting in its preferences such as Display PDF in Browser. I don't use those applications myself, so I can't be more precise. Deselect that setting, if it's selected. Otherwise do as follows.
    Triple-click anywhere in the line of text below on this page to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have "Adobe" or “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present. The same goes for a plugin called "iGetter," and perhaps others.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Why do I get only a black screen when I try to download PDF files?

    Why do I get only a black screen when I try to download PDF files?  I have the latest version of Adobe Reader.
    This problem just started a few weeks ago.
    I am still using Snow Leopard.
    I have tried using Firefox instead of Safari, but still get the black screen.

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

Maybe you are looking for