Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting internal table data into PDF format....

Former Member
0 Likes
822

Hello,

I get data for a personel's trip in an internal table in a internal table with data formatted properly. I want the data from this internal table to be converted into pdf form. How can I do this ?

DATA: pernr               LIKE ptrv_head-pernr,
      tripno              LIKE ptrv_head-reinr.
DATA: i_tripform          LIKE bapitrform OCCURS 0 WITH HEADER LINE,
           return              LIKE bapireturn.

pernr = '1000'.
tripno = '2600281'.

CALL FUNCTION 'BAPI_TRIP_GET_FORM'
       EXPORTING
            employeenumber = pernr
            tripnumber     = tripno
      "SET_PRINT_FLAG      = ' '
      "display_form        = 'X'
       IMPORTING
            return         = return
       TABLES
            tripform       = i_tripform.

Edited by: Rajesh Thomas on Aug 24, 2009 6:42 PM

4 REPLIES 4
Read only

Former Member
0 Likes
722

Hi, write the data to a spoolfile and use a function module to convert it to PDF eg. CONVERT_ABAPSPOOLJOB_2_PDF.

Succes

Read only

aakash_neelaperumal2
Active Participant
0 Likes
722

There are 3 common ways by which you can get this data in PDF format.

1) Send mail using function module SO_NEW_DOCUMENT_ATT_SEND_API1

2) Write the data in ABAP list and convert the spool to PDF using CONVERT_ABAPSPOOLJOB_2_PDF

3) Write data using SCript or Smartform and get OTF data and convert to spool using CONVERT_OTF_2_PDF

Read only

0 Likes
722

But how can I create spool file from internal table data ?

Edited by: Rajesh Thomas on Aug 24, 2009 7:05 PM

Read only

0 Likes
722

if the process is taken place in background just loop the table data and use write: wa_itab-f1.....fn and pick the spool number using system variable sy-SPONO convert the spool to OTF and OTF to PDF.