Oh thanks, I see. So ok go for Program Exit.
You'll need first to get the smart form in OTF format, then convert it to PDF. To generate the PDF from a smart form, call the function module SSF_FUNCTION_MODULE_NAME to get the generated function module corresponding to your smart form.
Call this latter function module, which has parameter CONTROL_PARAMETERS. Set GET_OTF = 'X' to retrieve the OTF data as an internal table in output parameter JOB_OUTPUT_INFO-OTFDATA.
Then you may convert the OTF data to PDF using the function module CONVERT_OTF (or any similar function module).
You may google OTFDATA or CONVERT_OTF to get many examples.