on 04-04-2008 3:22 AM
hi all,
i'm facing a problem, i want to avoid popup dialog in smartforms.
i have set structure SSFCTRLOP-no_dialog = 'X'. but it still show popup dialog. did i miss something?
Hi,
I had the same issue, no need to set device to PRINTER since the underlying function module will default that if blank.
On debugging the SMARTFORM function module.
It turns out that the parameter USER_SETTINGS defaults to 'X', which will display the printer dialog popup.
Changing this setting (USER_SETTING) to ' ' (SPACE) when calling the generated SMARTFORM function module as below then stopped the pop up appearing.
(The actual issue is that the destination specified was being overwritten with *, so it was looking to the users settings for a printer. Normally LOCAL PRINTER, changing the user_setting to ' ' keeps the printer specified and no need for the printer dialog popup)
* Get function module name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = i_formname
IMPORTING
fm_name = l_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
RAISE no_form.
WHEN 2.
RAISE no_function_module.
WHEN OTHERS.
ENDCASE.
ENDIF.
CALL FUNCTION l_fm_name
EXPORTING
control_parameters = i_ctrl_params
output_options = i_output_opts
user_settings = ' ' <--- *** Set this to SPACE ***
t_line_items = it_trolley_items
IMPORTING
job_output_options = l_job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
This fixed the issue in my case, every case is different.
Hope this helps someone, even though this is posted long after the original question.
Thanks
Jodh Atwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the below code
REPORT ZK_SALESFORM.
TABLES:VBAP.
data: form_name type rs38l_fnam.
DATA: out_opt TYPE ssfcompop,
i_device TYPE ssfctrlop.
i_device-preview = 'X'.
i_device-no_dialog = 'X'.
i_device-device = 'PRINTER'.
out_opt-tdimmed = 'X'.
out_opt-tddelete = 'X'.
out_opt-tdimmed = ' '.
out_opt-tddest = 'LP01'.
parameter:l_vbeln like vbap-vbeln.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZK_SALES'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FORM_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 FORM_NAME
EXPORTING
control_parameters = i_device
output_options = out_opt
user_settings = space
Best Regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
set no_dialogue as 'X'
and USER_SETTINGS = ' '.
Then it will directly show you the output.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try this
CALL FUNCTION lf_fm_name
EXPORTING
user__settings = space_
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
pass user setting as sapce if u don't want dialog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
DATA : device TYPE ssfctrlop.
device-no_dialog = 'X'.
CALL FUNCTION ws_form_fname
EXPORTING
control_parameters = device
IMPORTING
job_output_info = ls_output_info
TABLES
i_final_ap = i_final_ap.
Pls. reward if useful.....
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 just tried this out and it works fine ON CONDITION that I have set the default device in my Username std. params (I have set "LOCL" logical device, and have checked the 2 checkboxes below it)
Then in ABAP, I used it like this.
DATA is_device TYPE ssfctrlop.
is_device-preview = 'X'.
is_device-no_dialog = 'X'.
Later in Smartform call:
CALL FUNCTION fm_name
EXPORTING
control_parameters = is_device
nalog = nalog "program specific data
TABLES
ztaboperacije = ztaboperacije "program specific data
zheader = zheader "program specific data
Like this, I get the preview, without being asked in the std. dialog.
Regards,
SD
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.