on 04-23-2008 2:42 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
set
wa_outop-tdnewid = 'X'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.