I have two programs. Program 1 is an ABAP program which creates a PDF from the output using SUBMIT TO SAP-SPOOL then CONVERT_ABAPSPOOLJOB_TO_PDF. It then attaches the PDF to an email and sends the mail. Program 2 produces a Smartform. When sending the email from program 1 I would like to call program 2 and automatically attach the smartform to my email before sending it.
I have tried using SUBMIT_TO_SAP-SPOOL but this fails because there is no spool output - even when I print the smartform.
I think I may be able to do it by using SUBMIT and EXPORT LIST TO MEMORY, bringing back the list using LIST_FROM_MEMORY and maybe using the returned list to create the smartform internally in program 1.
I haven't yet tried this because it seems a long winded way of going about things and I thought I would ask and see if anyone had achieved this in a less contrived way. Any suggestions?