How to get the output of the report in pdf format

how to get the output of the report in pdf format?
Thanks in advance,

Refer these links
CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

Similar Messages

  • Output of a report in PDF Format

    Hi all,
    I need to get the Output of a report in PDF format.
    Please suggest me hwo to do this requirement.
    If having please give me the sample code
    Thanks and Regards

    sample code for PDF conversion...
    tables : vbrk. "Billing Document: Header Data
         Type pool declaration
    type-pools slis.
         Selection screen
    selection-screen begin of block b1 with frame.
    select-options : p_date for vbrk-aedat.
    selection-screen end of block b1.
         Types declaration
    types : begin of t_vbrk,
            vbeln type vbrk-vbeln,  "Billing Document
            aedat type vbrk-aedat,  "Changed on(date)
            fksto type vbrk-fksto,  "Billing document is cancelled
            end of t_vbrk.
         Internal table declaration
    data : i_vbrk type table of t_vbrk,
           w_vbrk type t_vbrk.
         Field catalog declaration
    data : i_cat type slis_t_fieldcat_alv,
           w_cat like line of i_cat,
           t_print type  slis_print_alv.
    data :top type table of slis_listheader  with header line.
    data : event type table of slis_alv_event with header line.
         start of selection
      perform get_dat.
      if sy-subrc = 0.
        perform build_cat.
        perform alv_print_info.
        perform sub_create_spool_id.
        perform display_data.
        perform sub_send_mail.
         Subroutine GET_DAT
    form get_dat .
    *---To fetch canelled billing documents.
      select vbeln
      from   vbrk
      into table i_vbrk
      where aedat in p_date and fksto = 'X'.
    endform.                    " GET_DAT
       Subroutine DISPLAY_DATA
    form display_data .
    call function 'REUSE_ALV_EVENTS_GET'
       et_events             = event[]
    top-typ = 'H'.
    top-info = sy-title.
    append top.
    call function 'REUSE_ALV_GRID_DISPLAY'
       i_callback_program                = sy-repid
       i_callback_top_of_page            = 'NAN'
       i_grid_title                      = 'Alok Arun (Mr.A)'
       it_fieldcat                       = i_cat
       it_events                         = event[]
       is_print                          = t_print
        t_outtab                          = i_vbrk
    endform.                    " DISPLAY_DATA
    *&      Subroutine  BUILD_CAT
    form build_cat .
      w_cat-seltext_l = 'Billing Document'.
      w_cat-col_pos = '1'.
      w_cat-tabname = 'I_VBRK'.
      w_cat-fieldname = 'VBELN'.
      w_cat-ref_fieldname = 'VBELN'.
      w_cat-hotspot = 'X'.
      append w_cat to i_cat.
      clear w_cat.
      w_cat-seltext_l = 'Cancelled on'.
      w_cat-col_pos = '2'.
      w_cat-tabname = 'I_VBRK'.
      w_cat-fieldname = 'AEDAT'.
      w_cat-ref_fieldname = 'AEDAT'.
      w_cat-hotspot = 'X'.
      append w_cat to i_cat.
      clear w_cat.
    endform.                    " BUILD_CAT
    *&      Form  alv_print_info
    form alv_print_info .
      t_print-no_print_selinfos  = 'X'.
      t_print-no_coverpage       = 'X'.
      t_print-no_print_listinfos = 'X'.
    endform.                    " alv_print_info
    *&      Form  sub_create_spool_id
    form sub_create_spool_id .
    data: lv_text(50) type c.
      lv_text = sy-title.
      new-page line-size sy-linsz
      print on destination 'LP01'
      cover text lv_text
      list name 'LIST NAME SOL MANAGER'(002)
      list dataset 'LIST DATASET'(003)
      immediately ' '
      keep in spool 'X'
      new list identification 'X'
      no dialog.
    endform.                    " sub_create_spool_id
    *&      Form  sub_send_mail
    form sub_send_mail .
    data:     v_spono like  tsp01-rqident.
      v_spono = sy-spono.
              v_type         like  soodk-objtp,
              i_pdflist      like  tline  occurs 0,
             t_print        TYPE  slis_print_alv,
              jobname        like  tbtcjob-jobname,
              jobcount       like  tbtcjob-jobcount,
              numbytes       type  i,
              pdfspoolid     like  tsp01-rqident,
              jobname2       like  tbtcjob-jobname,
              jobcount2      like  tbtcjob-jobcount,
              i_compresslist like  soli   occurs 0.
    data: pdf like tline occurs 100 with header line,
          objbin like solisti1 occurs 10 with header line.
    *--convert into PDF
    call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
          src_spoolid              = v_spono
          no_dialog                = ' '
          pdf_bytecount            = numbytes
          pdf_spoolid              = pdfspoolid
          btc_jobname              = jobname2
          btc_jobcount             = jobcount2
          pdf                      = pdf
          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.
    *-- change the width of the pdf table --
      call function 'SX_TABLE_LINE_WIDTH_CHANGE'
          line_width_src              = 134
          line_width_dst              = 255
          content_in                  = pdf
          content_out                 = objbin
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          others                      = 4.
      if sy-subrc <> 0.

  • How to generate the output of BSP application in PDF format?

    I need to modify one BSP application, which generates its output in the form of PDF. I have checked all the methods in the bsp pages and its corresponding controller class's. I couldn't find any relevant method, which deals with generating the output in PDF.
    Could you please share your valuable thoughts on this?
    Again it would be helpful, If anyone of you share some knowledge on Interactive Adobe Forms.

    okay, awesome
    i'd use DOM or some high level API for this (don't write it by hand using plain File IO)
    okay, try this site, it goes through building a document, adding elements, writing to file, etc.

  • Unable to Check ADD Attachment Check Box. Thereby getting only email and not the attachment (which will contain the output of BO report , in Excel Format)

    Post Author: hteoh
    CA Forum: Publishing
    I have an BO related issue. I tried to schedule a smtp event in BO to email the report output as Excel. Since this report will go to different users, I unchecked the Use the Job Server's defaults (CHECK BOX). For some reason, I can't check the Add Attachment(CHECK BOX). I received the email but without attachement. Do you know why I can't use attachment. The SMTP event works perfectly if I check Use the Job Server's defaults.

    Use the below code to populate the Sender and receiver mail ids:
    reset data for CTCV
      Create sender using sender mail address from new table
        SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
        IF SY-SUBRC NE 0.
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
    Similarly you can create the recipient mail id. Pass the GV_SENDER_ID to OPEN_FORM.

  • How to convert report to PDF format

    Please let me know the procedure to convert reports into PDF format.
    Thanks in Advance
    Irfan Hussain

    Refer these links
    <b>CONVERT_ABAPSPOOLJOB_2_PDF</b> FM convert abap spool output to PDF

  • How to get date appended in the filename of the IR reports

    I have a requirement where in i need to generate the output for the IR reports with a date appended in the output name.
    The report is scheduled daily. The generated output should have a date appended to it.
    For example - if the report say 'abc' gets generated today then the name of the generated report should be abc_26/10/2009.
    I could find one option saying append date to the filename while adding a schedule to the report. I have checked that property but still while generating the report i am not able to see the date appended with the report name. It just takes the cycle name that i had mentioned.
    I am using IR 11.1.
    Any help is appreciated.

    Do to the complexity of the program we need to run it with sequences.  This is because we need to aquire data with DAQ until it reaches a certain point and then stop collecting so that it can do its process (only once for all times criteria is met), and then loop around till again collecting after DAQ drops back below certain point looking to once again reach that point.  Another flat sequence is going outside of this where I want to put the prompt and have a user input to affect how many times that that the inner loop is run (No a For Loop instead of the while loop will not work either for other reasons). 
    I just want to know if after the program starts you can have a user input that will change the effect of the rest of the programs action based on the number inputed.

  • How to make checkbox field inactive in the output of ALV report.

    Dear All,
    I am having one ALV report in whose output there are checkboxes against each record. Example: the output columns of my ALV report are:
    Checkbox, Sales Document No, Billing Document No.
    Now, my requirement is that if for the Sales Document No there exists any Billing Document No in the output then the Checkbox should be inactive but if the Billing document coloumn is empty for a particular Sales Document No then only the Checkbox field should become active.
    Kindly guide me on how to make this checkbox field inactive.
    Waiting for your reply.
    Warm Regards,

    Follow the below steps:
    1.Define as--> GS_STATUS TYPE SLIS_STATUS,
    2.check layout check box fieldname is not initial.
          then set the status according to your logical conditions
    Hope this would help you.
    Let me know your feedback.

  • How to download the output of a report along with column header

    Could someone please tell me on how to download the output of a report along with column header to .txt format. A download option needs to be given to the user using physical and logical file names .The report basically contains header details and item details and requirement is to download the same format into an .txt format.

    Try this FM:
    Data: being of itab occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    data:begin of fld_tab occurs 0,
    end of fld_tab.
    fld_tab = 'Material'.
    append fld_tab.
    fld_tab = 'Material Desc'.
    append fld_tab.
            BIN_FILESIZE            = ' '
            CODEPAGE                = ' '
             FILENAME                = 'C:\1.txt '
             FILETYPE                = 'DAT'
            MODE                    = ' '
            WK1_N_FORMAT            = ' '
            WK1_N_SIZE              = ' '
            WK1_T_FORMAT            = ' '
            WK1_T_SIZE              = ' '
            COL_SELECT              = ' '
            COL_SELECTMASK          = ' '
            NO_AUTH_CHECK           = ' '
            FILELENGTH              =
              DATA_TAB                = itab
              FIELDNAMES              = fld_tab
            FILE_OPEN_ERROR         = 1
            FILE_WRITE_ERROR        = 2
            INVALID_FILESIZE        = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10
    IF SY-SUBRC <> 0.

  • How to hide the specified rows in the output of the report?

    Hello all,
        I have a requirement where i have to hide some of the lines (<b>initial 6 lines</b> that is <b>6 rows</b>) in the output of the report.
    How would I go about doing this?
    Thanks for you time.

    Hello Sai,
    I believe this is query output ( e.g., )
    Country   Sales
    India        $100
    USA        $200
    Germany  $300
    You want to hide the line Germany  $300
    Case 1:
        If you can change the query, Filter on Country and exclude Germany
    Case 2:
        If you can not change the query, use url appending and filter out Germany
    Check webapi reference for the exact commands
    Case 3:
        Only if you are using the NW2004s front-end, Report designer will be available for you. In this, you can delete the rows that you do not want and publish in web.
    Case 1 and 2 solutions are available in older versions of front-end as well.
    Sheik Bilal

  • My UR12 Steinberg interface is recognized by Yosemite but I can't get any output from the device, does anyone know how to fix this problem? Thanks in advance

    My UR12 Steinberg interface is recognized by Yosemite but I can't get any output from the device, does anyone know how to fix this problem? Thanks in advance

    Apparently it's related to the Firefox plug in.
    This isn't exactly a solution but more of a way to avoid opening PDFs with Firefox's plug in.
    1. Highlight "Tools" from the Menu Bar in the top left of the screen (or click "Options" if using the Firefox Compact Menu)
    2. Select to "Options
    3. Select "Applications"
    4. Look for "Adobe Acrobat Document" under Content Type and to the right under Action select "Use Adobe Reader (default)" instead of the using Adobe Acrobat in Firefox
    5. Open a test PDF. It should open in it's own window now.
    Again, not a complete solution but something that'll at least let you scroll with PDFs open.
    More info here:

  • Does anyone know how to convert the output from the standard report to xml?

    Does anyone know how to convert the output from the standard SAP report to xml?

    since it a standard report which you cannot modify you can only do the following.
    submit report exporting list to memory
    list from memory and then
    use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
    but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list .

  • How to get the output of the Send Separate Remittance Advices in XML in R12

    Hi All,
    I have a requirement where we want the output of the standard report 'Send Separate Remittance Advices' to come in XML, currently its coming in PDF format.
    Can you please help?
    Edited by: 990784 on Mar 12, 2013 2:57 PM

    Refer these links
    CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    Try this
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    <?end for-each?>
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • Output of Report in PDF Format on the Web

    I am running my application developed in developer 6i on the web. When is take the output of the reports in HTML format the output comes fine.
    But when I set the report output format to PDF from registry the browser does not open the file & gives the message error opeing file. But the file is accurately created in server's temporary directory which can be opened separately without reports server.
    I am using IE 5 & also tried 6.
    I have installed Forms & reports server from developer 6i CD without 9iAS.
    Somebody gave me the answer that there is some bug in reports server. Is it really a bug ??? Another thing is if it is a bug, it also exists in 9iAS.
    Please help me out

    PrintOutputController.export, get the byte stream, save on server.
    Ted Ueda

  • How can i  display output in the same selection screen?

    I've a requirement. Suppose in my selection screen there are three input fields. On the basis of this selection screens input It will  display the output in the same selection screen. Can it be possible? .
    Can it be possible to modify the default screen no for the selection screen 1000?
    Thanks in advance.

    Hi Abijit,
    Whatever changes made in STANDARD SELECETION SCREEN 1000 or screens generated using 'SELECTION-SCREEN' statements, are not permanent.
    It will get back to its original appearance, while you execute again or some time later.
    Whenever you get into 'CHANGE' mode of these screens, an information will be displayed as follows ;
    Selection screen: Report generation makes screen
    changes ineffective

Maybe you are looking for

  • Migration 7.1.5 to 9.1.2 LAB

    Hi All, I've a scenario in which I'm currently running with cucm 7.1.5, and i want to upgrade it to cucm 9.1.2. I've a cluster of 5 cucm. in my lab I have the possibility to have 3 VM started simultaneously. Is it possible to upgrade my cluster into

  • Is there standard BAPI which can used to read substitution material?

    Is there any standard BAPI which can be used to read substitution Material code for material? Even better if there is some table or struct under MATERIAL_GET_ALL which can returns this. I didn't manage to spot anything related from there though. It s

  • XML Signatures using Smart Cards

    Hello guys, I know this is not exactly a javacard topic, but I think this forum is where I 'll get the best replies. We need to perform XML document signatures and verification using smart card stored certificates. The certificates are created using

  • Re: Materials stuck in Storage Type 916

    Hi all, I am having a situation which I am unable to figure out the cause. In our current environment, we have implemented SAP WM. Now in a normal Sales cycle (Sales Order > Delivery > Invoice), a WM TO is required to do the Picking after a Delivery

  • Why I cannot using Facetime?

    I cannot using Facetime anymore from yesterday, I can dail number to the other one, and they can receive the singal, but when we connecting the facetime failed.