Dialog in Smartform
Hello All,
Could any one tell me how could I transform a smartform to a PDF file without having the smartform dialog?
I always have this dialog box before storing the smartform as pdf
Thank you
Karim
Hi,
Data Declarations
DATA: control TYPE ssfctrlop,"Smart Forms: Control structure
output_options TYPE ssfcompop,"Smart Composer (transfer) options
v_fm TYPE rs38l_fnam,"Form Name
itab TYPE STANDARD TABLE OF mara."Table to be passed to form
Selecting the Rows from Mara and passing it to smartfrom
SELECT * FROM mara INTO TABLE itab UP TO 10 ROWS.
<b>control-preview = 'X'."Preview the output of Smartform
control-no_dialog = 'X'."Don't show Dialog</b>output_options-tddest = 'LOCL'."Spool: Output device
output_options-tdnoprint = 'X'."No printing from print preview
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZZZ_JAYTEST'
IMPORTING
fm_name = v_fm
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 v_fm
EXPORTING
user_settings = ' '
control_parameters = control
output_options = output_options
v1 = 'From Program'"Just passing v1
TABLES
itab = itab "Passing table
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.
Similar Messages
-
Avoid popup dialog in smartforms
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 -
Avoid print dialog in smartforms
Folks,
I am trying to avoid print dialog which comes up in smartforms. But my code is not working. Please help.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = gv_form
* 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.
gv_control-no_dialog = 'X'.
gv_control-preview = 'X'.
gv_control-no_open = 'X'.
gv_control-no_close = 'X'.
*gv_control-device = 'LOCL'.
gv_output-tddest = 'LOCL'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
* ARCHIVE_PARAMETERS =
* USER_SETTINGS = 'X'
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJ =
output_options = gv_output
control_parameters = gv_control
* IMPORTING
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
* error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT gt_distributors INTO gs_distributors.
CALL FUNCTION fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = gv_control
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = gv_output
user_settings = space
gv_agmt = p_agr
gv_dist = gs_distributors-kunnr
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
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.
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
* IMPORTING
* JOB_OUTPUT_INFO =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = gv_errtab.
IF NOT gv_errtab IS INITIAL.
* add your handling
ENDIF.
A message is coming at the bottom saying...please main output device in the user master data. How do I maintain?
Message was edited by: Naren SomenHello all,
Thanks for the replies. They are really helpful. Actually my code is working fine in one client and in other client it is not working. The reason being user01-spld is empty. My code looks like this:
REPORT zagreement .
TYPES: BEGIN OF ty_distributors,
kunnr TYPE kunnr_v,
END OF ty_distributors.
DATA: gt_distributors TYPE TABLE OF ty_distributors WITH HEADER LINE.
DATA: fm_name TYPE rs38l_fnam,
gs_distributors TYPE ty_distributors.
DATA: gv_control TYPE ssfctrlop,
gv_errtab TYPE tsferror.
DATA: gv_form TYPE tdsfname VALUE 'ZAGREEMENT'.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER: p_agr TYPE knuma_ag.
SELECTION-SCREEN: END OF BLOCK b1.
***distributors
PERFORM get_distributors.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = gv_form
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.
gv_control-no_dialog = 'X'.
gv_control-preview = 'X'.
gv_control-no_open = 'X'.
gv_control-no_close = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
control_parameters = gv_control
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
* error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT gt_distributors INTO gs_distributors.
CALL FUNCTION fm_name
EXPORTING
control_parameters = gv_control
gv_agmt = p_agr
gv_dist = gs_distributors-kunnr
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.
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* error handling
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = gv_errtab.
IF NOT gv_errtab IS INITIAL.
* add your handling
ENDIF.
*& Form get_distributors
* text
* --> p1 text
* <-- p2 text
FORM get_distributors .
***distributors
SELECT kunnr
FROM a941
INTO TABLE gt_distributors
WHERE knuma_ag EQ p_agr.
IF sy-subrc <> 0.
***no distributors found for this agreement
ENDIF.
ENDFORM. " get_distributors
Your answers are really helpful and I am awarding points to all of them.
Thanks, -
Fill in spool options without dialog in Smartforms
Hi,
I´m trying to set the spool parameters before printing in Smartforms. Therefore I don´t want a dialog to choose the print options.
There are too structures, which are going to be passed to the smartform function: OUTPUT_OPTIONS and CONTROL_PARAMETERS.
I have the shortname of the device (CHAR4 field), like 'LOCL' or a print device.
How can I now set the parameters before calling the function of the smartform? When I fill the 4char device field into output_options-tddest, it´s not working! It´s always printing on the default device!
What else should I fill to get it printed right?
Cheers ArneHi Vijay,
thanks for Your answer. The background is, that I need to change all production forms form DIN A4 to DIN A5 and make bigger changes in the layout.
Therefore I decided to create it new in Smartforms, it should be better than calculating the dynamic boxes again in Sapscript.
If You want to print the forms, You can do that about CO01/02/03. Therefore You have to set "lists" where You can customize the printer device, the sapscript form and the sapscript program.
To do it in Smartforms, I´m checking the list parameters in my print program and, in case which list was choosen, I call the specific smartform.
No I want to use the device options set in the list. I´m using the function CO_PRINT_GET_INFO_LIST and I get back two structures with the list information. PRINT_CO and PRINT_OPTS.
In PRINT_CO there is a field called DESTI. It contains the shortname of the device.
Now I want to pass this one to the smartform. The device is valid, but my smartform always uses the default device.
My code:
CALL FUNCTION 'CO_PRINT_GET_INFO_LIST'
IMPORTING
print_co_exp = print_co
print_opts_exp = print_opts
EXCEPTIONS
OTHERS = 0.
wa_control_parameters-device = 'PRINTER'.
wa_control_parameters-preview = ''.
wa_control_parameters-no_dialog = 'X'.
wa_output_options-tddest = print_co-desti.
* wa_output_options-tdprinter = print_co-desti.
wa_output_options-tdarmod = '1'.
wa_output_options-tdcopies = '001'.
wa_output_options-tddelete = 'X'.
wa_output_options-tdlifetime = '2'.
wa_output_options-tdtitle = print_opts-tdtitle.
CALL FUNCTION '/1BCDWB/SF00000029'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = wa_control_parameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = wa_output_options
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_OPTIONS = wa_job_output.
I hope You understand my problem.
Cheers Arne -
How to get rid Print Dialog in Smartforms
Hi,
We are using ECC 6.0. I have the following code for calling smartforms:
DATA: ltp_control_parameters TYPE ssfctrlop,
ltp_output_options TYPE ssfcompop.
ltp_control_parameters-no_dialog = 'X'.
ltp_control_parameters-preview = 'X'.
ltp_control_parameters-preview = 'LOCL'.
ltp_output_options-tddest = 'LOCL'.
The problem is that the print dialog appears and asking for output device. How to get rid this?
thanks,
sidhi all,
thank you for replying. i got rid of the print dialog box by filling in defaults->spool control->output device in the user profile->own data. And i just set the following in my code:
ltp_control_parameters-no_dialog = 'X'.
ltp_control_parameters-preview = 'X'.
And also previously i mistakenly reset ltp_control_parameters-preview to 'LOCL' (refer to my previous post).
regards,
sid -
Show a picture from Application server
Let me reframe my question i asked earlier in this post.
I want to show a picture which is stored in Application server in my report/dialog program/smartform.
How do i do that? I don't want to upload the photo using SE78 for Smartforms. Any ways of directly picking the photo from application server, and showing it in the report / dialog program? I have other data in the program too besides the photo. So actually the output is a combination of lots of text and one photo in a corner, like a CV.
Thanks in Adv.Hi,
You can certainly display a Picture on a dialog screen with the class CL_GUI_PICTURE using a custom control on the screen.
Read the following link on How to play with the custom picture controls on a screen.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIIMAGE/BCCIIMAGE.pdf
GOTO - OAOR (Business Document Navigator)
Give Class Name - PICTURES Class Type - OT..... then Execute
It will show you the list, then select ENJOYSAP_LOGO.
On that list, you will find one control with a "create" tab.
Click std. doc types.
Select SCREEN and double-click.
It will push FILE selection screen.
Select your company logo (.gif) and press OK.
It will ask for a description- for instance: "company logo".
It will let you know your doc has been stored successfully
To display picture like comapany logo on ALV list header see the standard SAP example program BALVST03_GRID. In place of the Standard SAp logo you can place yourown by creating one with the following steps.
Regards,
Nagaraju Chidurupalli
Message was edited by: Nagaraju Chidurupalli
Message was edited by: Nagaraju Chidurupalli -
Smartform to PDF, how to suppres Print/Preview dialog
Hi Experts,
Facing some issues in downloading PDF converted from Smartform.
In the program I am trying directly download a smartform converted into PDF format and save it in local system.
When ever I am trying to execute the program it shows up the Print/Preview dialog before showing the Save As dialog.
I have passed control_parameters-getotf = 'X' to the smartform runtime FM, which ideally should have suppressed the Print/Preview dialog and return the otfdata.
Here the entire code is...
REPORT yfr_invoice.
TABLES : t001, bsad, bsid, kna1,sscrfields .
DATA : fm_name TYPE rs38l_fnam.
DATA : it_bsad TYPE STANDARD TABLE OF bsad.
DATA : BEGIN OF it_bseg OCCURS 0,
belnr TYPE belnr_d,
END OF it_bseg.
DATA : error_flag.
DATA:
cont_param TYPE ssfctrlop,
out_param TYPE ssfcompop,
otfdata TYPE ssfcrescl,
t_tline TYPE TABLE OF tline INITIAL SIZE 0,
t_docs TYPE STANDARD TABLE OF docs,
v_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filename TYPE string,
v_filter TYPE string.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_bukrs FOR t001-bukrs NO-EXTENSION NO INTERVALS OBLIGATORY.
SELECT-OPTIONS : s_gjahr FOR bsid-gjahr NO-EXTENSION NO INTERVALS OBLIGATORY.
SELECT-OPTIONS : s_rebzg FOR bsid-rebzg OBLIGATORY.
SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YFF_INVOICE'
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.
cont_param-getotf = 'X'.
cont_param-no_dialog = 'X'.
cont_param-preview = 'X' .
CALL FUNCTION fm_name
EXPORTING
control_parameters = cont_param "Passing getotf = 'X'
IMPORTING
job_output_info = otfdata
TABLES
s_bukrs = s_bukrs[]
s_gjahr = s_gjahr[]
s_rebzg = s_rebzg[]
s_kunnr = s_kunnr[]
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.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_filesize
TABLES
otf = otfdata-otfdata
doctab_archive = t_docs
lines = t_tline
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 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.
CONCATENATE 'filename' '.pdf' INTO v_name.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
default_extension = 'PDF'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_filesize
filename = v_fullpath "'C:\Test.pdf'
filetype = 'BIN'
TABLES
data_tab = t_tline
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDIF.
The program other wise works absolutly fine .
Please advise.
Thanks
JahanModerator message - Cross post locked
Rob -
Download smartform as PDF, suppress Print/Preview dialog
Hi Experts,
Facing some issues in downloading PDF converted from Smartform.
In the program I am trying directly download a smartform converted into PDF format and save it in local system.
When ever I am trying to execute the program it shows up the Print/Preview dialog before showing the Save As dialog.
I have passed control_parameters-getotf = 'X' to the smartform runtime FM, which ideally should have suppressed the Print/Preview dialog and return the otfdata.
Here the entire code is...
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
The program other wise works absolutly fine .
Please advise.
Thanks
Jahan
Edited by: Rob Burbank on Apr 8, 2010 11:10 AMHelloo Guyz...
I am exactly trying the same, but the Print Dialog is still coming ...
See here is my code ..
cont_param-getotf = 'X'.
cont_param-no_dialog = 'X'.
cont_param-preview = 'X' .
CALL FUNCTION fm_name
EXPORTING
control_parameters = cont_param
IMPORTING
job_output_info = otfdata
TABLES
s_bukrs = s_bukrs[]
s_gjahr = s_gjahr[]
s_rebzg = s_rebzg[]
s_kunnr = s_kunnr[]
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
even after this ..during execution the the Print Dialog is coming..
I have no idea what esle I am missing..
Thanks -
How to Skip Print dialog window in smartforms
Hi Experts,
while printing the smartforms i dont want Print dialog window. I want as and when i pressed the print
button it'll directly print with the specified printer.
I tried with lot of option but it is not working for me . May be i missed some prameter to pass.
Have a look in to my code below and make me correct .
DATA : WA_CPARAM TYPE SSFCTRLOP,
WA_OUTPUT TYPE SSFCOMPOP,
JOB_OUTPUT_INFO TYPE SSFCRESCL.
WA_CPARAM-PREVIEW = 'X'.
WA_CPARAM-NO_DIALOG = 'X'.
WA_CPARAM-DEVICE = 'PRINTER'.
WA_OUTPUT-TDNOPRINT = 'X'.
WA_OUTPUT-TDDEST = 'LP06'.
WA_OUTPUT-TDIMMED = ' '.
WA_OUTPUT-TDNEWID = 'X'.
WA_OUTPUT-TDDELETE = 'X'.
WA_OUTPUT-BCS_LANGU = SY-LANGU .
WA_OUTPUT-TDPRINTER = 'X'.
CALL FUNCTION FNAM
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = WA_CPARAM
OUTPUT_OPTIONS = WA_OUTPUT
USER_SETTINGS = ' '
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = T_SSFCOMPOP
USER_SETTINGS = ' '
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO = SSFCRESPD
JOB_OUTPUT_INFO = job_output_info
JOB_OUTPUT_OPTIONS = WA_OUTPUT
TABLES
ITAB1 = IT_ZADVMUTH1
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.
Thanks In Advance.
SatyaTry with below parameters, it may help you to close the thread.
WA_CPARAM-device = 'LP06'.
WA_CPARAM-no_dialog = 'X'.
WA_OUTPUT-tdnoprev = 'X'.
WA_OUTPUT-tddest = 'LOCL'.
WA_OUTPUT-tdnewid = 'X'.
SELECT SINGLE * FROM usr01
INTO ls_usr01
WHERE bname = sy-uname
AND spdb = 'G'.
If sy-subrc EQ 0.
WA_OUTPUT-tdimmed = ' '.
ELSE.
WA_OUTPUT-tdimmed = 'X'.
ENDIF.
Regards,
SaiRam -
Suppressing smartforms Print dialog box
Hi,
I want to suppress Print Dialog Box in smartform and directly go to print preview. I have set the CONTROL_PARAMETERS ,NO_DIALOG to 'X' and PREVIEW 'X' but still print dialog box is not suppressed. i even set OUTPUT_OPTIONS-TDDEST but it disappear and each time it display the print dialog with output device(TDDEST) field empty.
Thanks in advance.Hi,
Chek this sample program in 4.7:SF_EXAMPLE_03
control-no_dialog = 'X'.
control-preview = 'X'.
control-no_open = 'X'.
control-no_close = 'X'.
call function 'SSF_OPEN'
exporting
* ARCHIVE_PARAMETERS =
* USER_SETTINGS = 'X'
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJ =
* OUTPUT_OPTIONS =
control_parameters = control
* IMPORTING
* JOB_OUTPUT_OPTIONS =
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
* error handling
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
* now call the generated function module
call function fm_name
exporting
* archive_index =
* archive_parameters =
control_parameters = control
* mail_appl_obj =
* mail_recipient =
* mail_sender =
* output_options =
* user_settings = 'X'
customer = customer
bookings = bookings
connections = connections
* importing document_output_info =
* job_output_info =
* job_output_options =
exceptions formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
* error handling
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endloop.
call function 'SSF_CLOSE'
* IMPORTING
* JOB_OUTPUT_INFO =
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
others = 4.
if sy-subrc <> 0.
* error handling
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
* analyse internal error table of Smart Forms
call function 'SSF_READ_ERRORS'
importing
errortab = errtab.
if not errtab is initial.
* add your handling
endif.
I hope this will work.
Regards,
Anjali -
Smartform output without print dialog window
i mean..,
when i clicked execute button in smartforms
i don't want to give the values in print dialog window (like LP01 and clicking print preview button)
i want the smart from output when i click on execute button ..,
so can anybody help me plllllzz.
Moderator message: please search for available information/documentation before asking, do not use SMS speak.
Edited by: Thomas Zloch on Nov 10, 2010 1:55 PMyou can help yourself by searchin the SDN, this has been asked & answered more than once.
Just a tip on a sidenote: Studying the interface of the FM which calls the smartform can help a lot. -
Print Dialog not opened -Smartform
Hi Experts
We have defined a output type and assigned a smartform for Invoice.
The problem is we have included 60 billing items into a single billing document.
So, when we try VF02 and the Issue output type, it opens the window and select the output type then give the print preview, the print dialog window is not opened.
when i try it debug mode, the RV_MESSAGE_DIALOG fm returns the value(4) as OTHERS.
So it leaves the transaction, how to solve this problem, what could be the reason actually. Its most urgent, pls anyone help me.
Thanks in advance.
Regards
Rajaramsolved
-
How to supress dialog box when calling smartforms and just create a spool..
Hello Experts,
I want to supress the dialog box where you can print preview or print your smartforms. What
I want is to just create a spool file for this one. Think of it as smartforms running in background.
Thank you guys and take care!Hi again Vishwa,
I modified my code according to your last reply but it still wouldn't work. The dialog still pops up without the print and print preview buttons. Below is my code:
MOVE 'X' TO ltyc_control-no_open.
MOVE 'X' TO ltyc_control-no_close.
MOVE 'X' TO ltyc_control-no_dialog.
MOVE 'X' TO ltyc_options-tdnewid.
MOVE 'X' TO ltyc_options-tdnoprev.
MOVE 'X' TO ltyc_options-tdnoprint.
MOVE 'LOCL' TO ltyc_options-tddest.
MOVE space TO ltyc_options-tdimmed.
CALL FUNCTION 'SSF_SHOW_DIALOG'
EXPORTING
* ARCHIVE_PARAMETERS =
user_settings = ''
output_options = ltyc_options
control_parameters = ltyc_control
* OK_BUTTON = ''
IMPORTING
* E_ARCHIVE_PARAMETERS =
e_output_options = ltyc_options
e_control_parameters = ltyc_control
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.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lcc_z2574ffi_ra_cimb
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = ltyc_function
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 ltyc_function
EXPORTING
control_parameters = ltyc_control
output_options = ltyc_options
user_settings = ''
im_adrnr = gtyc_adrnr
im_name1 = gtyc_name1
im_name2 = gtyc_name2
im_str_suppl1 = gtyc_str_suppl1
im_str_suppl2 = gtyc_str_suppl2
im_str_suppl3 = gtyc_str_suppl3
im_post_code1 = gtyc_post_code1
im_city1 = gtyc_city1
im_vblnr = gtyc_vblnr
im_zaldt = gtyc_zaldt
im_swnes = gtyc_swnes
TABLES
im_regup = gt_regup
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.
Edited by: Viraylab on Nov 26, 2008 10:55 AM -
How to supress the dialog box in smartforms
Hi Experts,
Can any body tell how to supress the dailog box while executing the smarform.
valid answers will be rewarded.
Thanks,
Satish.data p_out like ssfcompop.
Look at smartform function module,there could be option like
p_out-tdnoprev = 'X'.
pass p_out to smartform function module -
Disable dialog box in smartforms
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
This is the code i'm using to generate SF. i want to generate PDF using this SF. so i don't want to display the dialogbox for "print". This is urgent.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_ctrlop-preview = 'X'.
wa_outopt-tdnoprev = 'X'.
Invoking SF *********************
CALL FUNCTION form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = wa_ctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = wa_outopt
user_settings = 'X'
mydate = p_date
reason = p_rea
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otfdata
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5this is the modified code. but still the dialog box comes.
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop,
t_otfdata TYPE ssfcrescl.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_ctrlop-preview = 'X'.
wa_ctrlop-preview = 'PRINTER'.
wa_outopt-tdnoprev = 'X'.
wa_outopt-print = 'X'.
CALL FUNCTION form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = wa_ctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = wa_outopt
user_settings = 'X'
mydate = p_date
reason = p_rea
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otfdata
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
Maybe you are looking for
-
Service Order Creation through IC Web client
Hello Experts, I am facing some problem for service order creation in IC Web client. Description: "ISUSRV" is the new BOL component in CRM 7.0 for service order creation in ISU System. BOL Object is given in this component is "IsuserviceOrder" for se
-
Issues With Tablet Sensitivity
I just recently purchased my touchscreen notebook and installed a digital art program (Krita) with no problem. I plugged in a wacom tablet that I've had for years and it seemed to have installed fine, it made a beeping noise to indicate it had been p
-
Hi, In order to send employee maseter data like infotypes like IT0000, IT0001, IT0002, IT0105 (Sty 0001/0010), HRP1000 and HRP1001 , which are the fields on which filtering should be used for the iDoc HRMD_A. Points will be rewarded. Thanks & Regards
-
Hi we have one customer balance report it contain 10,00000 records For one company code. User want to export that to note pad or When we export to excel it should automatically convert to two three excel files. Plz suggest me hoe do I help to the use
-
CS6 Bridge freezes in win7 when windows search service is activated
Has anyone else experienced this? Is thers a work around?