10-17-2023 9:06 AM
Hello Experts,
My requirement is that I need to convert internal table to PDF format and then send it to mail .
regards
10-17-2023 10:02 AM
I will suppose Adobe Forms is not available on your system.
You could build a generic report or a Sap Script/Smart Form to create a classic spool or OTF data, and then use the CONVERT_OTF_2_PDF or CONVERT_ABAPSPOOLJOB_2_PDF
Any reason you don't generate the attachment as xml or xlsx?
10-17-2023 10:25 AM
raymond.giuseppi thanks for your reply.
- i want to generate PDF attachment .
- now i have internal table with data how can i convert it to otf . have you example code please ?
regards
10-17-2023 11:46 AM
Don't you love it when you ask questions and the OP just repeats their question again?
trabelsioussa
"I want to generate a PDF attachment" is not an answer to the question "Any reason you don't generate the attachment as XML or XLSX".
What we want to know is why must the attachment be PDF? Who has said so? What will happen to attachment?
10-17-2023 12:34 PM
'We hear only our own voices, still echoes returning to our emptiness.' (Stojanovic)
10-18-2023 8:59 AM
sorry raymond.giuseppi .
this customer request . he wants pdf attachment.
10-18-2023 9:21 AM
You could just build a small dynamic program (getting fields decription, playing with field symbols) to generate a classic spool or use a class such as CL_SALV_TABLE for generating such a spool. Then convert this spool to pdf with the classic FM already mentionned.
10-18-2023 9:33 AM
trabelsioussa If the idea is data exchange into another system, then they're definitely wanting the wrong thing. I ask again - what are they doing with the attachment once they receive it? Just reading it?
10-18-2023 9:56 AM
10-17-2023 12:12 PM
Alternative solution using Java and SAP BC:
10-18-2023 8:59 AM
10-17-2023 2:41 PM
Are you aware of "printing a Forms" in SAP? There are old ways like Sapscript (SE71) and Smartforms (t-code SMARTFORMS), or Adobe forms (SFP). This way you can design a print form (table in your case) and call it from your program. Result then can be retrieved as PDF binary file.
This is most common way to create a PDF in SAP. It requires learning and practice from a developer.
Or you are looking for different kind of solution?
10-18-2023 9:08 AM
thanks tomas.buryanek for reply.
i have idea about Smartforms (t-code SMARTFORMS). i will try it . have you example code maybe can help me ?
10-18-2023 9:27 AM
trabelsioussa Did you tried to search "smartform to pdf"? If yes, then which help do you need?