I am working on a smartform which needs to be printed from Web Dynpro. So, I have developed an RFC to print the form. Form is printing fine (Printing Immediately) when I test it via SE37 . But, when I test it in portal, it does not print. It creates a spool request for user ADOBETEST in SAP ( SAP account for portals, I guess).
Since the end users may not have SAP account, Is there any way we can print the form on the users local printer when printing from Web Dynpro? Somebody please suggest me how to solve this issue.
Below is the code for your reference. ( This is working fine via SE37)
DATA: it_controls TYPE ssfctrlop,
it_outputoptions TYPE ssfcompop.
it_controls-no_dialog = 'X'.
it_controls-device = 'PRINTER'.
it_outputoptions-tdimmed = 'X'.
it_outputoptions-tdcopies = '001'.
it_outputoptions-tddest = printer.
it_outputoptions-tdnoprev = ' '.
CALL FUNCTION fm_name
control_parameters = it_controls
output_options = it_outputoptions
user_settings = ' '
reservation_header = wa_rkpf
reservations = it_final
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.