on 08-04-2008 10:38 AM
Dear experts,
I have seen this question being asked a lot but no one has defined in a way that one could make a confident start to resolve this.
Keeping this code in mind , i am required that when i execute this driver prgram that executes given smartform 'ZSF_SALESGRN' .
Here i should not get the inital popup of print-dialog.
How can i modify/add this given code to achieve the same.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSF_SALESGRN'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
i_header = i_heading1
i_detail = i_lipsvbap
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.
Hi,
In the structure CONTROL_PARAMETERS, you have field called NO_DIALOG. You have to check this field and pass this to the structure CONTROL_PARAMETERS.
Your question is
What is st_control_parameters variable .What is the data type ?
it of type SSFCTRLOP.
Your declaration should be
st_control_parameter type SSFCTRLOP.
Thanks,
Phani Diwakar.
Edited by: MVPhani Diwakar on Aug 4, 2008 12:02 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case u do not have the printer settings maintained for teh user then u have to supply the printer name yourself..otherwise it will pop up again..U have to fill up these parametrs also
ST_OUTPUT_OPTIONS-TDDEST
ST_OUTPUT_OPTIONS-TDPRINTER
and make the USER_SETTINGS = space
st_control_parameter type SSFCTRLOP
Well here is the solution...
For PRINTING DIRECTLY
ST_CONTROL_PARAMETERS-PREVIEW = ' '.
ST_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
ST_OUTPUT_OPTIONS-TDIMMED = 'X'.
CALL FUNCTION v_fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = st_control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = st_output_options
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO = st_document_output_info
JOB_OUTPUT_INFO = st_job_output_info
JOB_OUTPUT_OPTIONS = st_job_output_options
TABLES
IS_LABELS = IS_LABELS
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.
ELSE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.