Skip to Content
author's profile photo Former Member
Former Member

ALV List as PDF

Guys,

Can anybody help me out in converting ALV Output List as PDF? Can anyone provide an example plz?

How do v convert an internal table data into OTF format for PDF output? Help plz.

Thanks in advance,

CK

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2006 at 11:08 AM

    use the function module CONVERT_ABAPSPOOLJOB_2_PDF to convert the abap list into PDF.

    Refer the following link to know more about pdf conversions:

    http://www.sapgenie.com/abap/pdf_creation.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2006 at 11:10 AM

    DATA: lt_pdfdata LIKE TABLE OF tline WITH HEADER LINE.

    DATA: lt_otf TYPE STANDARD TABLE OF itcoo WITH HEADER LINE,

    lt_doctab TYPE STANDARD TABLE OF docs WITH HEADER LINE,

    lt_otfdata TYPE STANDARD TABLE OF itcoo WITH HEADER LINE.

    *-- Convert the OTF data to PDF data

    CALL FUNCTION 'CONVERT_OTF_2_PDF'

    EXPORTING

    use_otf_mc_cmd = 'X'

    IMPORTING

    bin_filesize = v_bin

    TABLES

    otf = lt_otf

    doctab_archive = it_doctab

    lines = lt_pdfdata

    EXCEPTIONS

    err_conv_not_possible = 1

    err_otf_mc_noendmarker = 2

    OTHERS = 3.

    Regards

    Ashok P

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2006 at 11:12 AM

    Hi,

    use FM <b>CONVERT_ABAPSPOOLJOB_2_PDF </b> to convert it in to PDF

    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           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.

    use FM <b>CONVERT_OTF_2_PDF</b> to convert ot to OTF Format to PDF..

    CALL FUNCTION 'CONVERT_OTF_2_PDF' 
    * EXPORTING 
    * USE_OTF_MC_CMD = 'X' 
    * ARCHIVE_INDEX = 
    IMPORTING 
    BIN_FILESIZE = P_BIN_FILESIZE 
    TABLES 
    OTF = P_OTF 
    DOCTAB_ARCHIVE = P_DOCS 
    LINES = P_LINES

    Regards,

    Santosh

    Message was edited by: Santosh Kumar P

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2006 at 11:14 AM

    HI,

    <b>To convert OTF to PDF</b>

    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
      FORMAT_SRC = 'OTF'
      FORMAT_DST = 'PDF'
      DEVTYPE = 'ASCIIPRI'
      LEN_IN = LEN_IN
    IMPORTING
      LEN_OUT = LEN_OUT
    TABLES
      CONTENT_IN = OTF_TAB
      CONTENT_OUT = ITAB2
    EXCEPTIONS
      ERR_CONV_FAILED = 1
      OTHERS = 2.

    See the below link for a Example Program

    http://www.erpgenie.com/sap/abap/pdf_creation.htm

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.