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

How to convert Internal Table data to PDF without smartforms

0 Likes
3,003

Hello Community,

I got a requirement as downloading the Internal table data in pdf format. How can i achieve it, I mean for downloading files i can use FM gui_dwonload but before that how can i convert my interna table to PDF file. Which function module i can use and how to transform my internal table gt_warehouse data to pdf.

*My Internal table declaration. This table holds my all data

DATA: gt_warehouse TYPE TABLE OF gty_warehouse, " gt_warehouse is my table
gs_warehouse TYPE gty_warehouse. "gs_warehouse is my work area

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
2,860

PDF was intended to share some formatted text or picture, if you only want to transfer data use a data format such as XML, or generate a document (e.g. any spool) and convert it to pdf.

Use any tool from WRITE statements to ALV to generate a spool (many threads/questions already answered in the forum)

Check following FM to convert spool to pdf

  • CONVERT_ABAPSPOOLJOB_2_PDF
  • CONVERT_OTFSPOOLJOB_2_PDF

Hello Community,

I got a requirement as downloading the Internal table data in pdf format. How can i achieve it, I mean for downloading files i can use FM gui_dwonload but before that how can i convert my interna table to PDF file. Which function module i can use and how to transform my internal table gt_warehouse data to pdf.

*My Internal table declaration. This table holds my all data

DATA: gt_warehouse TYPE TABLE OF gty_warehouse, " gt_warehouse is my table
gs_warehouse TYPE gty_warehouse. "gs_warehouse is my work area

6 REPLIES 6
Read only

former_member27
Product and Topic Expert
Product and Topic Expert
0 Likes
2,860
Hi
Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with: https://community.sap.com/resources/questions-and-answers, as the overview provides tips for preparing questions that draw responses from our members.
Should you wish, you can revise your question by selecting Actions, then Edit.
By adding a picture to your profile you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html
Regards,

Dedi

Regards,
Dedi Metser
Read only

FredericGirod
Active Contributor
2,860

You need a layout to convert it to pdf.

You could do the layout using WRITE or an ALV. and convert the spool to PDF using same logic as program RSTXPDFT4

Read only

Sandra_Rossi
Active Contributor
2,860

In ABAP, there are only 2 converters to PDF, as far as I know:

  • From ABAP List (WRITE, etc.)
  • From OTF Format (SAPScript, Smart Form)

It's easy to convert any text into ABAP List or OTF format.

Search forum for more information.

Read only

RaymondGiuseppi
Active Contributor
2,861

PDF was intended to share some formatted text or picture, if you only want to transfer data use a data format such as XML, or generate a document (e.g. any spool) and convert it to pdf.

Use any tool from WRITE statements to ALV to generate a spool (many threads/questions already answered in the forum)

Check following FM to convert spool to pdf

  • CONVERT_ABAPSPOOLJOB_2_PDF
  • CONVERT_OTFSPOOLJOB_2_PDF
Read only

abo
Active Contributor
2,860

There's an external library, too, but I haven't tried it yet: https://github.com/beraadim/zcl_pdf

Read only

0 Likes
2,860

Hi Community Members, After reading your comments I understood that I should write the file too and convert it spool. Thank you so much all of you