Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

creating spool request

Former Member
0 Likes
497

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

3 REPLIES 3
Read only

Former Member
0 Likes
471

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

Read only

0 Likes
471

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.

Read only

0 Likes
471

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.