Skip to Content
0
Former Member
Nov 08, 2012 at 08:40 AM

Error using a static output device

30 Views

Hello,

I need to pass a static output device in my code but I get an error.

My code is something similar to this:

DATA :
gs_control_parameters TYPE SSFCTRLOP,
gs_output_options TYPE SSFCOMPOP.

gs_control_parameters-no_dialog = 'X'.
gs_output_options-XDFOUTDEV = 'PRUEBA'.
* gs_output_options-tddest = 'PRUE'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'MYFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = v_fm
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

gs_output_options-tdnewid = 'X'.

WHILE pnet > 0.
if pnet = 1.
gs_output_options-tdfinal = 'X'.
endif.
CALL FUNCTION v_fm
EXPORTING
control_parameters = gs_control_parameters
output_options = gs_output_options
zmatnr = pmat-low
zlot = plot-low
zfem = pfemb
zpes = ppeso.
pnet = pnet - 1.
endwhile.
endif.

I send several copies of my report to the spool. This is why I'm using the parameters tdnewid and tdfinal.

It works fine in case I don't the parameter no_dialog but I need it because otherwise the spool dialog appears for each copy.

The name of my output device is PRUEBA but, I don't know exactly which parameter I must use.

Can anybody help me?

Thanks in advance.

Regards.