Skip to Content
0
Former Member
Feb 21, 2014 at 05:33 PM

Emailing smartform as PDF from Webdynpro is causing dump "Screen output without connection to user"

26 Views

Hello all,

I have a request that at the end of the PCR workflow, to email the PCR as PDF to a person.

Our PCR is created in Webdynpro, which triggers a workflow.

In the method for closing the PCR, I am calling a function module with the import parameters from the Webdynpro context. This function module in return is calling a smartform to which is passing the same import parameters (from the function module). It is then creating OTF data, which I am converting to binary data and then this is emailed as PDF to a person. Everything works good in the sense that it is sending the email with the PDF from the smartform attached and it's also triggering the workflow...except for one problem...in Webdynpro it is generating one dump:

Attached is the code of the function module I created (FM ZHR.txt).

In the Webdynpro I am calling the function module like that:

CALL FUNCTION 'ZHR_PCR_PDF_EMAIL'

EXPORTING I_PERNR = LS_PATD-PERNR "which is retrieved from the context of Webdynpro

.

If I take out the import parameter output_options from l_functionmodule, I don't get any dump, but then it doesn't send the email....

I know the error is caused by the fact that is calling GUI screen, but I don't know what I need to change in the structure ls_outputoptions.

Can anyone help with this?

Thank you,

Iuliana

Attachments

FM ZHR.txt.zip (2.3 kB)
error.JPG (27.1 kB)