cancel
Showing results for 
Search instead for 
Did you mean: 

Send a Sapscript as a PDF by email

former_member227595
Active Participant
0 Kudos

Hi,

I've to convert a sapscript into PDF and then send it by email.

I'm using the next logic in my printer program:

1. I Executo the FMs OPEN_FORM, WRITE_FORM and CLOSE_FORM.

2. Then I obtain the spool request using the FM RSPO_FIND_SPOOL_REQUESTS

3. Then I convert the Spool request into a *pdf using the FM CONVERT_OTFSPOOLJOB_2_PDF

4. Finally I call the FM SO_DOCUMENT_SEND_API and attach the pdf created in the 3rd step.

My problem is that when I execute all this in background task. It doesnt send the email. Does anybody know what is going on?

Thanks !

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Did you leave the COMMIT_WORK parameter as SPACE?

You actually do not have to send it to the spool. The OPEN_FORM function module has a parameter to request OTF data. The CLOSE_FORM function will return it as an internal table. You can convert that to PDF and send.

Answers (0)