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,
madan.

Refer these links
http://www.sap-img.com/bc037.htm
http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
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
    Ajay

    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
    top-of-page.
    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.
      endif.
         Subroutine GET_DAT
    form get_dat .
    *---To fetch canelled billing documents.
      select vbeln
             aedat
             fksto
      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'
    importing
       et_events             = event[]
    top-typ = 'H'.
    top-info = sy-title.
    append top.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
       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
      tables
        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.
    data:
              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'
        exporting
          src_spoolid              = v_spono
          no_dialog                = ' '
        importing
          pdf_bytecount            = numbytes
          pdf_spoolid              = pdfspoolid
          btc_jobname              = jobname2
          btc_jobcount             = jobcount2
        tables
          pdf                      = 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.
      endif.
    *-- change the width of the pdf table --
      call function 'SX_TABLE_LINE_WIDTH_CHANGE'
        exporting
          line_width_src              = 134
          line_width_dst              = 255
        tables
          content_in                  = pdf
          content_out                 = objbin
        exceptions
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          others                      = 4.
      if sy-subrc <> 0.
      endif.
    endform.

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

    Hi,
    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.
    Thanks,
    John

    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.
    http://www.roseindia.net/xml/dom/

  • 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.

    Hi!
    Use the below code to populate the Sender and receiver mail ids:
    DATA GV_SENDER    TYPE SWC_OBJECT.    
    DATA GV_SENDER_ID LIKE SWOTOBJID.      
    SWC_CONTAINER LT_CONTAINER.
    reset data for CTCV
    CALL FUNCTION 'CTCV_INIT_USER_DATA'.
      Create sender using sender mail address from new table
        SWC_CLEAR_CONTAINER LT_CONTAINER.
        SWC_CREATE_OBJECT GV_SENDER    'RECIPIENT' SPACE.
        SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
                                         ZMAIL-SENDER.
        SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'B'.
        SWC_CALL_METHOD GV_SENDER    'CreateAddress' LT_CONTAINER.
        IF SY-SUBRC NE 0.
             MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
                     RAISING SENDER_CREATION_FAILED.
        ENDIF.
        SWC_OBJECT_TO_PERSISTENT GV_SENDER GV_SENDER_ID.
    Similarly you can create the recipient mail id. Pass the GV_SENDER_ID to OPEN_FORM.
    Cheers!

  • How to convert report to PDF format

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

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    <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,
    N.Jain

    Hello,
    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
          GS_STATUS-FLG_CHECKBOXES_ACTIVE = 'X'
    Hope this would help you.
    Let me know your feedback.
    Regards,
    Raju

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

    Hi,
    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.

    Hello,
    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,
    fld_name(20),
    end of fld_tab.
    fld_tab = 'Material'.
    append fld_tab.
    fld_tab = 'Material Desc'.
    append fld_tab.
    CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
            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           = ' '
       IMPORTING
            FILELENGTH              =
         TABLES
              DATA_TAB                = itab
              FIELDNAMES              = fld_tab
       EXCEPTIONS
            FILE_OPEN_ERROR         = 1
            FILE_WRITE_ERROR        = 2
            INVALID_FILESIZE        = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            GUI_REFUSE_FILETRANSFER = 8
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Naimesh

  • 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.
    Regards,
    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: http://forums.mozillazine.org/viewtopic.php?f=38&t=2171033

  • 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
    then
    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?
    Thanks,
    Dilip
    Edited by: 990784 on Mar 12, 2013 2:57 PM

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    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
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    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?>
    o/p
    ==================
    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
    Thanks
    Zulqarnain

    PrintOutputController.export, get the byte stream, save on server.
    Sincerely,
    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.
    Abhijit

    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
    Regards,
    R.Nagarajan.

Maybe you are looking for

  • Zen Vision:M problem, NEED HELP!

    My zen vision:m is starting to run slowly. It started right after my player froze and i reset it.Now its really slow and barely even switches screens sometimes.Right now its just a black screen with the keypad lit up.Whats wrong with it'sI NEED HELP!

  • BAPI_GOODSMVT_CREATE error messages,  when I use Movement Type '541'

    Hello, I am using "BAPI_GOODSMVT_CREATE".It was working fine when i was creating a GR against Purchase Order. Now i am trying to create GR against subcontracting purchase order but it is giving Error "No goods receipt possible for purchase order" The

  • "access denied" error when using data bindings in region

    Whenever I use data boundings in a region jspx or even in a subview page, I got "access denied" error in other page that uses this region or subview. Anybody know if there is any workaround? Thanks a lot!

  • Using Captivate with SharePoint

    I apologize in advance, the "search within this forum" function is not working, so I can't search the Captivate forum to see if this question has already been answered. When you develop training and quizzes in Captivate, I've heard you can post the f

  • Feature Request: Project Manager Trim Compatibility with all formats please!

    It's 2013, Premiere Pro CC is out, and is more "Final Cut Pro" than ever (thanks Adobe), but there are still some basic things that need to be fixed. This is a DOOZY!... With DSLR media being used pretty much everywhere, the inability to created trim