‎2005 Nov 14 12:04 PM
hi all
i am printing asset inventory number slip.for that i have written a smartform.
now my problem is that i want to spool the request to the printer as soon as i execute my smartform program.
exception to the print preview which we usually get on executing a smartform program.
the structure for this is <b>ssfcompop</b>and the field required is <b>tdnewid</b>.
i am not able to utilise the above structure .
can u show me utilisation of the above for spooling
the print generated out of smartform
thanks in advance
Gaurav
‎2005 Nov 14 12:13 PM
Hi Gaurav,
I think SSFSPCTLOP is the structure for your requirement and TDNEWID is the field to be set to 'X'.
Try passing this structure to the smart form function module in the print program.
Regards,
Ravi
‎2005 Nov 14 12:38 PM
hi ravi
Thanks for your reply.
i have already tried with the solution that you have given right now but with no results.
can u send me some sample code for my problem.
‎2005 Nov 14 1:36 PM
Hi Gaurav,
I tried paasing the below params. It is working or me.
Please try this way.
data : options like SSFCOMPOP,
control like SSFCTRLOP.
control-NO_DIALOG = 'X'.
Get output device from USR01
select single spld
into dl_spld
from usr01 where bname = sy-uname.
if sy-subrc = 0.
options-tddest = dl_spld. " Output device
endif.
options-TDNEWID = 'X'.
call function FM_NAME
EXPORTING
CONTROL_PARAMETERS = control
OUTPUT_OPTIONS = options
USER_SETTINGS = 'X'
tables
it_mara = ITAB_MARA
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Hope this will help you.
Please award points if the answer is useful.
Thanks & Regards,
Siri.