on 03-21-2007 2:04 PM
I am trying to control the printer to which my output is directed using the job_output_options, but I find that one of the first things the generated function module does is clear those parameters. CLEAR JOB_OUTPUT_OPTIONS. This appears to be part of the standard build of the function module, so it looks like these parameters are useless. Anyone else had this problem? Does SAP plan on changing this? Since I have the dialog turned off, the program picks up my user default. I need to control this output based on the plant and workcenter.
Any help (other than using GET_PRINT_PARAMETERS because that isn't the answer) would be appreciated.
Thanks for the help. I see I was setting the parameters in the wrong place.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write a select on CRHD table to get the Printer name in CRHD-PDEST.
Pass the CRHD-PDEST to output_options structure.
data: X_OUTPUT_OPTIONS TYPE SSFCOMPOP, "SAP Smart Forms: Smart
X_CONTROL_PARAMS TYPE SSFCTRLOP."Smart Forms: Control
X_OUTPUT_OPTIONS-TDIMMED = 'X'. " Print Immediately
X_OPTIONS-TDIMMED = 'X'. " Print Immediately
X_CONTROL_PARAMS-PREVIEW = ' '. "Do not show Preview
X_OUTPUT_OPTIONS-TDDEST = CRHD-PDEST.
call your Smartform FM this way
CALL FUNCTION V_FM_NAME
EXPORTING
ARCHIVE_PARAMETERS = X_ARC_PARAMS
CONTROL_PARAMETERS = X_CONTROL_PARAMS
OUTPUT_OPTIONS = X_OUTPUT_OPTIONS
USER_SETTINGS = ' '
TABLES
MATID_TAB = IT_TEMP
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
i have used lile this
st_output_options-tdtitle = text-011. "Free goods credit notes'
st_output_options-tdnewid = c_x. "create new spool dataset
* ST_OUTPUT_OPTIONS-TDCOPIES = C_N_1. "one copy Commented by SM0001
st_output_options-tddest = p_prntr. "name of printer
st_output_options-tdnoprev = space. "no preview
st_output_options-tdcover = space. "no cover page
st_output_options-tddataset = p_prntr. "dataset name
st_output_options-tdsuffix2 = space. "name of report variant
* ST_OUTPUT_OPTIONS-TDIMMED = C_Y. "print immediately? Commented by SM0001
st_output_options-tddelete = space. "do not delete after print
*****************Insert by SM0001 on 17/10/2006
IF p_tmod = c_2.
st_output_options-tdarmod = c_3.
ELSEIF p_tmod = c_1.
st_output_options-tdcopies = c_n_1. "one copy
st_output_options-tdimmed = c_y. "print immediately?
ELSEIF p_tmod = c_3.
st_output_options-tdarmod = c_3.
st_output_options-tdcopies = c_n_1. "one copy
st_output_options-tdimmed = c_y. "print immediately?
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.