2023 Oct 17 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
2023 Oct 17 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?
2023 Oct 17 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
2023 Oct 17 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?
2023 Oct 17 12:34 PM
'We hear only our own voices, still echoes returning to our emptiness.' (Stojanovic)
2023 Oct 18 8:59 AM
sorry raymond.giuseppi .
this customer request . he wants pdf attachment.
2023 Oct 18 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.
2023 Oct 18 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?
2023 Oct 18 9:56 AM
2023 Oct 17 12:12 PM
Alternative solution using Java and SAP BC:
2023 Oct 18 8:59 AM
2023 Oct 17 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?
2023 Oct 18 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 ?
2023 Oct 18 9:27 AM
trabelsioussa Did you tried to search "smartform to pdf"? If yes, then which help do you need?