cancel
Showing results for 
Search instead for 
Did you mean: 

new spool number is not created .. appending to prevoius spool

Former Member
0 Kudos

Hi friends

we have requirement to print smartform labels for each Delivery item.

i created smartform and written code in User Exit..

but spool is creating first time and next label onwards label is appending to the old spool instead of creating new spool( for the second label new spool is not created,its taking prevoius spool number , checked in debugg as well)

Please help me..

i have writeem code as follows:

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = p_sf_name

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

wa_outop-tdimmed = 'X'.

wa_control_parameters-no_dialog = 'X'.

wa_control_parameters-device = 'PRINTER'.

wa_control_parameters-preview = ''.

wa_control_parameters-langu = 'EN'.

wa_outop-tdarmod = 1.

wa_outop-tdimmed = 'X'.

CALL FUNCTION fm_name

EXPORTING

output_options = wa_outop

user_settings = space

wa_label_data = wa_label

control_parameters = wa_control_parameters

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Thanks

Ramesh

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

You need to pass X to parameter OUTPUT_OPTIONS-TDNEWID

Try like below:



CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = p_sf_name
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
wa_outop-tdimmed = 'X'.
wa_control_parameters-no_dialog = 'X'.
wa_control_parameters-device = 'PRINTER'.
wa_control_parameters-preview = ''.
wa_control_parameters-langu = 'EN'.
wa_outop-tdarmod = 1. 
wa_outop-tdimmed = 'X'.
wa_output-TDNEWID = 'X' .            "ADD
CALL FUNCTION fm_name
EXPORTING
output_options = wa_outop
user_settings = space
wa_label_data = wa_label
control_parameters = wa_control_parameters
EXCEPTIONS
formatting_error = 1 
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.

Regards,

Himanshu

Former Member
0 Kudos

take a variable gv_new with value X.Then perform the following check before and after ssf_function_module_name

What it does is tdnewid creates a new number each time spool is called for.

CONSTANTS: lc_true TYPE flag VALUE 'X'.

IF gv_new EQ lc_true.

gwa_outoptions-tdnewid = lc_true.

ENDIF.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

IF sy-subrc = 0.

CLEAR: gwa_outoptions-tdnewid, gv_new.

ENDIF.

Edited by: subhajit bhadra on Oct 22, 2009 12:49 PM

Former Member
0 Kudos

set

wa_outop-tdnewid = 'X'.

Former Member
0 Kudos

This is not working when i am printing interest invoices in transaction FINTSHOW.

I am setting check box of 'New spool request' and also 'Do not Append Jobs', and other combination on same

Please any body have suggestions?

Regards,

Manju

Former Member
0 Kudos

hi,

when u r executing it will ask for a OUTPUT device in a pop-up window.there below u will have a check box

NEW SPOOL REQUEST.

plz check that. i think it will resolve your problem.

REWARD ME IF USEFUL

thanks,

gupta pullipudi.