How to get Header and footer in PDF file from a report program

I am generating spool from ALV GRID DISPLAY. Only the body of a report is coming in the SPOOL. I mean content of the TOP_UP_PAGE event is not coming in the SPOOL. Please suggest me.
Coding I am pasting here.
* Begin of modification(+) by I080845 ( Prasanta Maiti ) 12/23/2011 Defect# 17821
    IF sy-batch IS NOT INITIAL
* Begin of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
    and i_final is NOT INITIAL.
* End of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
* The print parameters are retrived and validate
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
*           ARCHIVE_TEXT          = c_check
*           AR_OBJECT             = c_check
*          ARCHIVE_REPORT         = c_check
*          COVER_PAGE             = c_check
          in_archive_parameters  = v_arcpar
          in_parameters          = v_pripar
          destination            = 'LOCL'
          layout                 = 'X_65_512/2'"c_layout
          line_count             = '65'  "60
          line_size              = '1024'
          no_dialog              = c_check
        IMPORTING
          out_archive_parameters = v_arcpar
          out_parameters         = v_pripar
          valid                  = v_val
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
IF v_val  NE space AND sy-subrc = 0.
        v_pripar-prrel = space.
        v_pripar-primm = space.
        NEW-PAGE PRINT ON NEW-SECTION PARAMETERS v_pripar
        ARCHIVE PARAMETERS v_arcpar NO DIALOG.
        NEW-PAGE.
**    displaying output in PDF
*    PERFORM f_show_record.
*   ALV Display
        PERFORM f_alv_display.
        NEW-PAGE PRINT OFF.
        CALL FUNCTION 'ABAP4_COMMIT_WORK'.
      ENDIF.
      IF NOT sy-spono IS INITIAL.
        "Declarations
        v_spool_id = sy-spono.
* Checking the flag for too large spool
*    IF v_too_large IS INITIAL.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = v_spool_id
            no_dialog                = space
          IMPORTING
            pdf_bytecount            = v_bytecount
          TABLES
            pdf                      = i_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
            OTHERS                   = 12.
Edited by: Thomas Zloch on Feb 10, 2012

Hi,
Try with ALV LIST DISPLAY. I dont thing so its possible with ALV GRID DISPLAY.

Similar Messages

  • How to add header and footer to a file through ODI?

    hi,
    I want to add header and footer to my file..............footer should contain a counter so that page number can be displayed...................
    Can anyone please guide me .................
    Thanks .............
    Ritika

    what is the utility you are using to create file . Interface or OdiSqlUnload ?
    and what do you want to have Header and Footer as and how are you concluding the File as page 1 and page 2 etc ... ?

  • How can I copy and paste a pdf file from my picture file and paste onto a document?

    How can i copy and paste a pdf file onto a document.  I am trying to place and article onto my
    Reverbnation Press page.  They only give you the option to either place a url link or paste a document.  There
    is no uploading for the Press page.  thanks, elena

    The Digital Editions forum is here, in case this is what you are talking about:
    http://forums.adobe.com/community/adobe_digital_editions
    If you are not, I apologize for the misunderstanding.

  • Header and footer in PDF files generated from Business Publisher

    Hi All,
    Is there any out of box feature to include Header and Footer of our choice in the Pdf file of Process Model generated from Business Publisher (from Print function in the publisher explorer)
    Thank you all in advance.
    regards,

    Hi Raja,
    Does this mean that you have been sucessful in generating the PDF from the BPublisher?
    If yes, could you please share how you achived this. Platform .. version ect. you have.
    I am trying to create the PDF , but my IE popup just ... well ... just disappears..
    thanks
    regards
    Sanjiv

  • How to Add Header and Footer in Flat file

    HI All,
    I am using ODI 11g.
    MY interface is populating data from joining to 2 tables through sql query and Loads in to Flat file.
    But i need to add Header and Footer in the Flat file.
    In the below 3 lines
    The 1st line is header ....2nd line is Data ....3rd line is Footer.
    Any ideas how to work on this.
    HSB9KT.KTPRTO.EBSDATA.D0000000 20120626020636
    CFFE00263 SOLGSR014991340000527894536058173880207SOLNE06242012072420120000009048382650000247MRS
    T00000000000000000000
    Thanks,
    Lony

    Hi Drieux,
    i am able to add Header and Footer in this.
    But i want the header like Its like HSB9KT.KTPRTO.EBSDATA.D0000000 || SYSDATE (YYYYMMDDHHMMSS)
    In my Out put i only see header as HSB9KT.KTPRTO.EBSDATA.D0000000 .
    I have added a Variable where i am using SELECT to_char(sysdate,'YYYYMMDDHHMMSS') FROM DUAL query.
    create header (HSB9KT.KTPRTO.EBSDATA.D0000000 #v_DATE)
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=FFT_SOLSNP$CRLOAD_FILE=/home/tarak/FFT_SOL.datSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=descrSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=1SNP$CRLENGTH=994SNP$CRPRECISION=994SNP$CR$$SNPS_END_KEY*/
    Any idea why this sysdate part is not showing in Header.

  • How to get Outlook 2012 to print PDF files from the attachments?

    Every time i try to print it just pops opens and then closes right away.  No printing tab pops up for me to choose anything.  I currently just got a new computer and so having to configure everything.

    You can't. The commandline parameters for Acrobat and Adobe Reader do not allow any type of commands to be run.

  • How to change header and footer in login page in oracle apps r12

    Hi all,
    how to change header and footer in login page in oracle apps r12 and login button background color, please help me
    thanks
    saran

    how to change header and footer in login page in oracle apps r12 and login button background color, please help meTips For Personalizing The E-Business Suite R12 Login Page (MainLoginPG) [ID 741459.1]
    How to Personalize Login page in R12? [ID 579917.1]
    R12 Login Page: How to Personalize the Logo ? [ID 849752.1]
    Thanks,
    Hussein

  • How to place header and footer  in OO-ALV program using class

    How to place header and footer  in OO-ALV program using class tell me wat r the class we shold use and their attributes as well

    Hi Venkatesh,
    Take a look at this how to [ABAP Objects - ALV Model - Using Header and Footer|https://wiki.sdn.sap.com/wiki/x/xdw]
    it's explaining how to define the classes and use it for display an ALV with Header and Footer.
    Regards,
    Marcelo Ramos

  • How to print header and footer in SET_TABLE_FOR_FIRST_DISPLAY

    Hello Experts,
             How to print header and footer while using the method SET_TABLE_FOR_FIRST_DISPLAY, any tips from the experts will be appreciated.
    Regards,
    Babu

    Hi,
    there are four events for printing: print_end_of_list, print_top_of_list, print_end_of_page and print_top_of_page. More information about implementing these events is in this bible for ALV:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Cheers

  • How to read the and Write the PDF file give me the solution

    Hi all,
    How to read the and Write the PDF file give me the solution
    My coding is
    import java.io.File;
    import com.asprise.util.pdf.PDFImageWriter;
    import com.asprise.util.pdf.PDFReader;
    import java.io.*;
    import java.io.FileOutputStream;
    public class example {
    // public example() {
         public static void main(String a[])
              try
              PDFReader reader = new PDFReader(new File("C:\\AsprisePDF-DevGuide.pdf"));
                   reader.open(); // open the file.
                   int pages = reader.getNumberOfPages();
                   for(int i=0; i < pages; i++) {
                   String text = reader.extractTextFromPage(i);
                   System.out.println("Page " + i + ": " + text);
    // perform other operations on pages.
    PDFImageWriter writer = new PDFImageWriter(new FileOutputStream("c:\\new11.pdf"));
                   writer.open();
                   writer.addImage("C:\\sam.doc");
                   writer.close();
                   System.out.println("DONE.");
    reader.close();
              catch(Exception e){System.out.println("error:"+e);
              e.printStackTrace();
    I get the pdf content then it returns the string value but ther is no option to write the string to PDF, and we only add a image file to PDF,but i want to know how to wrote the string value to PDF file,
    Please give response immtly
    i am waiting for your reply.
    thanks,
    Suresh.G

    I have some question flow
    How library to use this code.
    I try runing but have not libary.
    Please send me it'library
    Thank you very much!

  • How do I download and print a pdf file in osx mountain lion

    How do I download and print a pdf file?

    control click on your PDF to download option
    Open it on your desktop Command-P is the short cut for print option.

  • Using Acrobat X and creating a PDF File from EXCEL 2010, I notice that the Pagination restarts at 1 for each Worksheet included in the PDF.

    I use Acrobat X Standard and created a PDF file from two or more worksheets using EXCEL 2010.
    The resulting PDF file restarts the PAGE # (In header/footer settings of Excel) at 1 for each worksheet.
    However, a colleague of mine who has Acrobat X Pro version, using EXCEL 2010 and same exact file does the same task, he gets a file that starts at page 1 and second worksheet continues the page # from the last page of the First worksheet.
    We both are using the ACROBAT menu (not the print to Adobe printer) to create the file so that we can get Bookmarks included in the resulting file for each worksheet.
    We cannot figure out any option in Acrobat's preferences that controls the pagination on either of these versions of Acrobat.
    So is this just a feature that works one way in Standard version and another way in the Pro version, and the user has no control over it?

    This is so sad. I read your comments and I said, "Huh?" Haha!
    I tried the indexed color option and it did make the final file smaller. Around 600KB. But there's probably another way to make it even smaller like the gazillion-paged pdf file that I mentioned that was only about 300KB.
    And by saying a layout program, does that mean like Adobe InDesign? Does that mean that I should just make my graphics in Photoshop and then import using another program and finish the file there?
    What other layout programs can I use?
    Thank you so much!

  • How to get the absolute path of a file from the local disk given the file n

    how to get the absolute path of a file from the local disk given the file name

    // will look for the file at the current working directory
    // this is wherever you start the Java application (cound be C: and your
    // application is located in C:/myapp, but the working dir is C:/
    File file = new File("README.txt"); 
    if (file != null && file.exists())
        String absolutePath = file.getAbsolutePath();

  • How to search specific text/string in pdf files from command prompt?

    Hi,
    How to search specific text/string in pdf files from command prompt?
    Will be great if you can refer to any adobe provided command base utility to achieve the above target.
    Best Regards,

    You can't. The commandline parameters for Acrobat and Adobe Reader do not allow any type of commands to be run.

  • How can I generate and/or retrieve log files from iPad

    How can I generate and/or retrieve log files from iPad?
    OBS!
    There are NO files apearing in ~/Library/Logs/CrashReporter/MobileDevice/<name of iPad> so where else can i find it?
    I want to force it to produce a log, or find it within the iPad.
    It is needed for support of an app.

    Not sure on porting out the log data, but you can find it under General->About->Diagnostic&Usage->Diagnostic&Usage Data.  It will give you a list of your log data, and you can get additional details by selecting the applicable log you are looking for.  Hope this helps.

Maybe you are looking for

  • IPhoto photo stream time zone/ duplicates issue

    I've got a bunch of duplicate photos in my iPhoto library on my Macbook from both manually importing photos from iPhone when connected and from syncing via Photo Stream. I've since disactivated Photo Stream, but still had duplicate photos on my compu

  • Run Time Errors : Raise_Exception, Exception condition "WRONG_PARAMETERS" r

    Hi SAP Gurus, I have activated Document splitting & when iam trying to post the document then iam getting the following Run Time Error. Iam using SAP ECC 6.0 Short text                                                                                Ex

  • Consolidation monitor

    Hi Experts, I have a problem with the consolidation monitor. The standard BCS content was activated and the customization was completed. When i run the consolidation monitor, there is no hierachy displayed but the sequence of task heading columns are

  • Printing postcards double sided

    I wish to print postcards on both sides, just like a regular postcard. Color and front and black & white on back. I would prefer to print directly from iPhoto 6, but that is secondary as some photo printers come bundled with Mac software. Does anyone

  • Hierarchy info object

    Hi Experts, I have an info object created in BI system and it has activated as master data info provider.Now i have a requirement to load the hierarchy through flat file, Whether do i have to create transfer rules , Data source , Info package and the