Download scrpit print preview in wordpad
Hi Friends,
How can i download print preview of script into wordpad.
its urgent.
thanks in advance,
desha.
I am not sure whether we can download to doc or not. but here is the sample program to download your preview to PDF
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556">Example program</a>
Regards,
SaiRam
Similar Messages
-
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 -
Retain the alignment of print preview in download of smartform
Hi ABAPers,
I need to retain the alignment of the smartform print preview when I download the smartform as PDF.
The text alignment is ok but the issue is with character "-".
In print preview
Shift Date Qty.Kgs Qty.Lts ST Fat% CLR SNF% Fat(Kg) Rate UOM Pay Farmer
AM 29 42.00 40.77 G 7.00 23.80 7.78 2.94 17.50 KG 735.00
Total Buf : 42.00 40.77 7.00 7.79 2.94 18.03 735.00
Net Amount Payable Rs 735.00
In downloaded PDF
Shift Date Qty.Kgs Qty.Lts ST Fat% CLR SNF% Fat(Kg) Rate UOM Pay Farmer
AM 29 42.00 40.77 G 7.00 23.80 7.78 2.94 17.50 KG 735.00
Total Buf : 42.00 40.77 7.00 7.79 2.94 18.03 735.00
Net Amount Payable Rs 735.00
so how to retain the exact format in PDF as in print preview.
-Dep
Edited by: DeepakNandikanti on Dec 16, 2010 7:01 AMHi friend,
There are many questions posted in Forum saying printout is coming correct in PDF but not in print.
The main reason for that is PDF accepts all kind of input its an universally accepted format Portable Device Format.
So see whether you system supports both the languages. Check with your basis team about it. Also try using other languages which your system supports so that you will get to know where your problem exists.
I think this will solve your issue please revert back to me if you have any issues i will help you.
Thanks,
Sri Hari -
The BIG WHITE MOSTLY BLANK , MOZILLA START PAGE was blocking my use of PRINT PREVIEW, from the orange "Firefox" in the upper left corner.
I was told i was using an out of date version of Firefox.
But no "click here to update".
So i downloaded the new edition of Firefox.
And still, i can not see PRINT PREVIEW, because the large white screen of the MOZILLA START PAGE is blocking it.
I have selected a background wallpaper, so would rather not see ANY of the BIG WHITE START PAGE, at all !!
HEEEELP,,,,,,Hi,
Can you please post a [https://en.wikipedia.org/wiki/Screenshot screenshot] of the start page when it is blocking the print preview. Please note that you may have to change to the tab of the site to be printed to see the print preview of the page. If the problem persists, please also check in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode.]
[http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
[https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
[http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
[http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars] -
Financial Reporting 11.1.1.3 Client print preview crashes
Hi,
I've installed a Financial Reporting 11.1.1.3 Client on a Windows XP SP2 client. When i try to launch print preview of a report from the studio, it crashes, and return to the report without printing. Any idea?
Thanks.
Regards.Dear John,
How to install latest Version of Hyperion HFM
1) I had downloaded Hyperion Enterprise Performance Management System Foundation Services, Product specific Essabase and Financial Management , and unzip into common folder . but stll iam not able to see Installtool.cmd
which part i have still dowloaded.
Regards
Amit -
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 -
I have a MAC desktop running OS 10.7.2 and Firefox 8.0.1. and can't print preview of web pages. On my PC, it's there just fine. (Firefox 8.0 on Windows XP). What can be done to get print preview of web pages for the Mac? Thanks. C Baher
Firefox 4 versions and later '''do not run on a PowerPC Mac''' and require at least OS X 10.5 and '''an Intel Mac'''.
[http://www.mozilla.org/en-US/firefox/10.0.2/system-requirements/ Firefox 10.0.2 System Requirements]
The latest version for your ppc mac is 3.6.27 you can download from here:
http://www.mozilla.org/en-US/firefox/all-older.html
[http://www.mozilla.org/en-US/firefox/3.6/system-requirements/ Firefox 3.6 System Requirements]
1. Download a new copy of the Firefox program(3.6.27) from the above link
2. Trash the current Firefox application to do a clean (re-)install.
3. Install the new version that you have downloaded(3.6.27).
Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks or other personal data.
see also: [https://support.mozilla.org/en-US/kb/Installing%20Firefox%20on%20Mac Installing Firefox on Mac]
thank you
Please mark "Solved" the answer that really solve the problem, to help others with a similar problem. -
Print Templates print preview window closes unexpectly when printing document
This is a cross posting from Internet Explorer Web Development after a suggestion that this forum would be a better location. See
https://social.msdn.microsoft.com/Forums/ie/en-US/351e1245-b606-4467-9f3c-1c72f9cdf9ea/print-templates-print-preview-window-closes-unexpectly-when-printing-document?forum=iewebdevelopment.
I have raised an issue through Connect for this:
https://connect.microsoft.com/IE/feedback/details/1134168/ie9-to-ie11-print-templates-print-preview-window-closes-unexpectly-when-printing-document, but I would like some more visibility of the issue as my customers thought my application was closing when
they printed a document. I also don't know if an issue in Connect gets any priority support via MSDN, but this forum does.
This looks to me like a problem in the IE Print Templates startDoc API call, but if there is a more appropriate forum to raise this issue in please let me know.
In the application where I use print templates, the window closing is not in it self a problem because the Javascript that is calling startDoc also closes the Print Preview window when the print is finished.
The fact that the application looses focus and can be hidden by the windows of other applications when the Print Preview window is closed by startDoc is the issue noticed by our customers, so I need a fix preferably, or a work around at a pinch.
Details of the issue reproduced below.
When using IE Print Templates, the startDoc function is causing the print preview window to close. This behaviour started with IE9, and is still present with IE11.
When an application is using print templates (see
https://msdn.microsoft.com/en-us/library/aa753279(v=vs.85).aspx) for print functionality, this has the effect of causing the application to become hidden by any other application window once printing from the print preview window has started. It is
actually this behaviour that started me looking at this issue as the users thought the hosting application had closed.
Print Templates are not accessible by using IE as a web browser, but only when using the WebBrowser Control to embed IE in an application. The reference for this feature is available from this url:https://msdn.microsoft.com/en-us/library/aa753279(v=vs.85).aspx
and a sample Microsoft application that demonstrates the use of Print Templates can be used to demonstrate the problem (required for the reproduction steps). The application is available via this article and searching for "download spiffy".
Steps to reproduce the problem:
To see the full effect of the issue, first ensure there is a window from another application (like Windows Explorer) that will cover the sample applications window if brought to the foreground (making the Windows Explorer window full screen works).
Start the sample application (and ensure that the full screen Window Explorer is the next application to activate).
Then in the drop down box in the top right corner of the UI select Template8.htm.
Click the Print Preview button that is just below the drop down box (this will open a new Print Preview window).
In the new window click the Print… button (this will open a Print dialog).
Click the Print button at the bottom of the Print dialog.
The Print dialog closes (expected) and then the Print Preview window also closes (not expected), however the document is still printed successfully.
When the Print Preview windows is closed unexpectedly, the Windows Explorer window is brought to the foreground (obscuring the sample applications window).
If you reselect the sample application and click the Print Preview button again, the Print Preview dialog is not displayed unless you restart the application (this looks to be a symptom of the same issue, not a separate problem).
To see that the Print Preview window appears to be closed by the startDoc call, use the resource editor in Visual Studio (the exe can be opened directly by File | Open | File…) to edit the HTML resource "TEMPLATE8.HTM" (I found I needed to delete
it and add it back in for the change to stick), find the startDoc call and add two alerts, one on the line before and one on the line after. When IE is accessing the template, it is being done using the name of the executable (so do not rename the modified
version of printtemplates.exe, make the changes to a copy in a different directory if you don't want to change the original). Start the modified version of the application and follow the same steps as in the reproduction. This time, after clicking
the Print button in the Print dialog, the dialog will close, the first alert will pop up, then the Print Preview window will close, then
the second alert will pop up.
Thank you,
Warren.Hi Shu,
I have noticed that the print templates API is listed as part of the Legacy APIs.
Is this just because it hasn't changed or is not new? Or does this mean that it is no longer maintained and may be removed (or at least deprecated) at some point in the future?
It would good to know if we should start planning for the implementation of a different method of printing.
I understand that the sample application is no longer maintained, but I also think that the Print Template API that it uses has not changed, and so should still work (and it does mostly).
If the Print Preview window was being closed as a result of using the Print dialog (and if it had behaved the same way with IE8) I would be willing to go with the by design argument.
I have found that the Print Preview window is not closed until startDoc is called, and it closes before control is returned from the startDoc function.
Just as part of investigating and try to find a workaround, if I call window.close(), any alert calls made no longer display the alert window after the close call.
Alert still functions after startDoc has closed the window however.
The is not the sort of consistent behaviour I would expect from something that is by design.
Also while investigating, I found that calling startDoc after calling window.close() results in an exception with the error code -2147467259 (0x80004005), this is probably quite normal and expected, but does indicate that the Web Browser Control should
not be closed till after printing.
I had found that old thread, and I had concluded it was the same issue, but it was also aimed at different aspect of the problem (which I see in the sample application, but not my application).
The visible issue I have is that my users think the application has been closed because after clicking print (on the Print dialog) the application gets hidden by other windows from other applications.
This aspect affects the sample in the same manner and so it was a convenient way to demonstrate the problem.
If IE connect do not look at this issue any time soon, do I have any other avenues to resolve this issue?
Thank you,
Warren. -
My OS is Windows 7 and I recently upgraded to Firefox 23.0.1 and then installed the extensions: Print/Print Preview 0.9 and Printfriendly initial rev 72.1. When I go to the add on manager they are listed and not disabled. Under Toolbars, the following are selected: Menu Bar, Navigation Tool Bar, Bookmarks Tool Bar, Add-On-Bar. I don't see any of my Extensions on the Add-On-Bar. At the bottom left of the browser window appears an "x" for closing the Add-On-Bar. There is nothing else showing.
Print/Print Preview uses and appends to the default Print button that comes with Firefox. If you don't have that button, use the '''Restore Default Set''' button in the lower-right corner of the Palette.
As far as Print Friendly, the AMO download page says that button is placed on the Add-on Bar by default. If it isn't there maybe "Restore ...." will fix it, and if not I would suspect a compatibility issue.
Beyond that I can't help you, as I use the Print Edit extension which works fine with Print/Print Preview . I don't like Print Friendly due that extension using their website instead of doing the "editing" within the users browser. Potential security issues for me.
Note, I have tried the Print Friendly bookmarklet which works very much like their extension, and after examining the code and having a person who I consider well-versed with JavaScript look at it - I decided to use Print Edit instead. -
Converting Smartforms to PDF and displaying Smartforms on print preview
Hi,
How to convert smartforms to pdf?
How to attach this pdf to email?
How to attach this pdf to the email and at the same time can print preview the smartforms?
Thanks.Hi Navi,
Code Snippet for Simple Mail
*& Report ZZ_TEST *
REPORT zz_test .
INCLUDE zz_test_top.
INCLUDE zz_test01.
FORM entry *
--> RETURN_CODE *
--> US_SCREEN *
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
PERFORM processing USING us_screen.
CASE retcode.
WHEN 0.
return_code = 0.
WHEN 3.
return_code = 3.
WHEN OTHERS.
return_code = 1.
ENDCASE.
ENDFORM. "entry
*& Include ZZ_TEST_TOP *
TABLES : nast,
tnapr.
TYPES : BEGIN OF t_SOUDNAMEI1.
INCLUDE STRUCTURE SOUDNAMEI1.
TYPES : END OF t_SOUDNAMEI1.
Internal Table declarations
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
*Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
i_lips LIKE lips OCCURS 0 WITH HEADER LINE,
i_SOUDNAMEI1 TYPE STANDARD TABLE OF t_SOUDNAMEI1.
Work Area declarations
DATA:w_objhead TYPE soli_tab,
wa_control_parameters TYPE ssfctrlop,
wa_output_options TYPE ssfcompop,
w_return TYPE ssfcrescl,
w_doc_chng TYPE sodocchgi1,
w_data TYPE sodocchgi1,
w_buffer TYPE string,"To convert from 132 to 255
wa_SOUDNAMEI1 TYPE t_SOUDNAMEI1,
Variables declarations
w_form_name TYPE rs38l_fnam,
w_len_in LIKE sood-objlen,
w_len_out LIKE sood-objlen,
w_len_outn TYPE i,
w_lines_txt TYPE i,
w_lines_bin TYPE i,
retcode TYPE sy-subrc,
xscreen TYPE c,
w_spld TYPE usr01-spld,
w_receiver TYPE SOXNA-FULLNAME,
w_OBJ_RECORD TYPE OBJ_RECORD,
w_user type sy-uname,
w_email TYPE ad_smtpadr.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X',
c_atrate(1) TYPE c VALUE '@'.
*& Include ZZ_TEST01 *
FORM PROCESSING *
FORM processing USING proc_screen.
SELECT * FROM lips
INTO TABLE i_lips
WHERE vbeln = nast-objky.
Call Function module to Getfunction Module name Generated by Smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = tnapr-sform
IMPORTING
fm_name = w_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
retcode = sy-subrc.
ENDIF.
CLEAR : wa_control_parameters,
wa_output_options.
CASE nast-nacha.
WHEN '1'.
wa_control_parameters-device = 'PRINTER'.
WHEN '7'.
DATA: l_email TYPE ad_smtpadr.
wa_output_options-tdnoprev = c_x.
wa_control_parameters-getotf = c_x.
To get the default output device maintained in the
User profile
SELECT SINGLE spld FROM usr01
INTO w_spld
WHERE bname EQ nast-usnam.
IF sy-subrc EQ 0.
MOVE w_spld TO wa_output_options-tddest .
ENDIF.
wa_output_options-tdnoprev = c_x.
wa_control_parameters-getotf = c_x.
To get the email address maintained for the particular output
CALL FUNCTION 'NAST_GET_MESSAGE_OBJECT_RECV'
EXPORTING
pi_objkey = nast-tdname
IMPORTING
pe_addr = w_receiver
CHANGING
pc_objhandle = w_obj_record
EXCEPTIONS
maildata_not_readable = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF w_receiver NA c_atrate.
To retrieve the E-Mail Id in case we get the User name from NAST
CLEAR wa_soudnamei1.
REFRESH i_soudnamei1.
MOVE w_receiver TO wa_soudnamei1-fullname.
To get the user name
CALL FUNCTION 'SO_NAME_CONVERT_API1'
EXPORTING
name = wa_soudnamei1
TABLES
names = i_soudnamei1
EXCEPTIONS
user_not_exist = 1
parameter_error = 2
x_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR wa_soudnamei1.
READ TABLE i_soudnamei1 INTO wa_soudnamei1 INDEX 1.
MOVE wa_soudnamei1-sapname TO w_user.
To get the e-mail Id maintained in the user profile
CALL FUNCTION 'FTR_CORR_CHECK_EMAIL_SAP_USER'
EXPORTING
i_user = w_user
IMPORTING
e_email_address = l_email
EXCEPTIONS
mail_address = 1
determination_error = 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.
MOVE l_email TO w_receiver.
ENDIF.
MOVE w_receiver TO w_email.
ENDCASE.
wa_control_parameters-no_dialog = c_x.
wa_control_parameters-langu = nast-spras .
wa_output_options-tdteleland = nast-tland.
wa_output_options-tdtelenum = nast-telfx .
wa_output_options-tdsenddate = nast-erdat .
wa_output_options-tdsendtime = nast-eruhr .
wa_output_options-tddataset = nast-dsnam .
wa_output_options-tdsuffix1 = nast-dsuf1 .
wa_output_options-tdsuffix2 = nast-dsuf2 .
wa_output_options-tdimmed = nast-dimme .
wa_output_options-tddelete = nast-delet .
wa_output_options-tdautority = nast-tdautority.
wa_output_options-tdcovtitle = nast-tdcovtitle .
wa_output_options-tdcover = nast-tdocover .
wa_output_options-tdreceiver = nast-tdreceiver.
wa_output_options-tddivision = nast-tddivision.
wa_output_options-tdcopies = nast-anzal .
wa_output_options-tdnewid = c_x.
wa_output_options-tdarmod = nast-tdarmod.
wa_output_options-tdnoarmch = c_x.
CALL FUNCTION w_form_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = wa_control_parameters
output_options = wa_output_options
user_settings = ' '
IMPORTING
job_output_info = w_return
TABLES
it_lips = i_lips
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF nast-nacha EQ 7 AND sy-subrc EQ 0.
i_otf[] = w_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = w_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Convert PDF from 132 to 255.
LOOP AT i_tline.
Replacing space by ~
TRANSLATE i_tline USING ' ~'.
CONCATENATE w_buffer i_tline INTO w_buffer.
ENDLOOP.
Replacing ~ by space
TRANSLATE w_buffer USING '~ '.
DO.
i_record = w_buffer.
Appending 255 characters as a record
APPEND i_record.
SHIFT w_buffer LEFT BY 255 PLACES.
IF w_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
REFRESH: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR w_objhead.
Object with PDF.
i_objbin[] = i_record[].
DESCRIBE TABLE i_objbin LINES w_lines_bin.
Document information.
w_doc_chng-obj_name = 'Smartform'.
w_doc_chng-expiry_dat = sy-datum + 10.
CONCATENATE 'Delivery' 'Note'
INTO w_doc_chng-obj_descr.
*w_doc_chng-obj_descr = 'Smart form output'.
w_doc_chng-sensitivty = 'F'. "Functional object
w_doc_chng-doc_size = w_lines_txt * 255.
Pack to main body as RAW.
Obj. to be transported not in binary form
CLEAR i_objpack-transf_bin.
Start line of object header in transport packet
i_objpack-head_start = 1.
Number of lines of an object header in object packet
i_objpack-head_num = 0.
Start line of object contents in an object packet
i_objpack-body_start = 1.
Number of lines of the object contents in an object packet
i_objpack-body_num = w_lines_txt.
Code for document class
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Packing as PDF.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = w_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'Smartform'.
CONCATENATE 'Delivery' 'Note' '.pdf'
INTO i_objpack-obj_descr.
i_objpack-doc_size = w_lines_bin * 255.
APPEND i_objpack.
Document information.
CLEAR i_reclist.
e-mail receivers.
i_reclist-receiver = w_email.
i_reclist-express = 'X'.
i_reclist-rec_type = 'U'. "Internet address
APPEND i_reclist.
sending mail.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = w_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
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.
ENDFORM. "processing
OTF to PDF
========================================================================
Program1
*& REPORT zpmm_print1
REPORT zpmm_print1.
DATA : gw_ssfcrescl TYPE ssfcrescl.
DATA: gt_otf TYPE STANDARD TABLE OF itcoo ,
gt_tline TYPE STANDARD TABLE OF tline,
gv_len LIKE sood-objlen,
gw_ssfctrlop TYPE ssfctrlop, "for CONTROL_PARAMETERS
gw_ssfcompop TYPE ssfcompop. "for OUTPUT_OPTIONS
DATA fm_name TYPE rs38l_fnam.
gw_ssfctrlop-getotf = 'X'.
gw_ssfctrlop-no_dialog = 'X'.
gw_ssfcompop-tdnoprev = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPMM_1'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
<error handling>
ENDIF.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = gw_ssfctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = gw_ssfcompop
user_settings = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = gw_ssfcrescl
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.
gt_otf[] = gw_ssfcrescl-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_len
TABLES
otf = gt_otf
lines = gt_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DATA : gv_filename LIKE rlgrap-filename VALUE 'C:\swet.pdf'.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = gv_len
filename = gv_filename
filetype = 'BIN'
filetype_no_show = 'X'
IMPORTING
act_filename = gv_filename
filesize = gv_len
cancel = ''
TABLES
data_tab = gt_tline.
Program 2
*& REPORT zpmm_print2
REPORT zpmm_print2.
DATA : gw_ssfcrescl TYPE ssfcrescl.
DATA: gt_otf TYPE STANDARD TABLE OF itcoo ,
gt_tline TYPE STANDARD TABLE OF tline,
gv_len LIKE sood-objlen,
gw_ssfctrlop TYPE ssfctrlop, "for CONTROL_PARAMETERS
gw_ssfcompop TYPE ssfcompop. "for OUTPUT_OPTIONS
DATA fm_name TYPE rs38l_fnam.
gw_ssfctrlop-getotf = 'X'.
gw_ssfctrlop-no_dialog = 'X'.
gw_ssfcompop-tdnoprev = 'X'.
CALL FUNCTION '/1BCDWB/SF00000041'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = gw_ssfctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = gw_ssfcompop
user_settings = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = gw_ssfcrescl
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.
gt_otf[] = gw_ssfcrescl-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_len
TABLES
otf = gt_otf
lines = gt_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DATA : gv_filename LIKE rlgrap-filename VALUE 'C:\swet.pdf'.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = gv_len
filename = gv_filename
filetype = 'BIN'
filetype_no_show = 'X'
IMPORTING
act_filename = gv_filename
filesize = gv_len
cancel = ''
TABLES
data_tab = gt_tline.
=========================================================================
Cheers
Mohinder Singh Chauhan -
Regarding error "Field symbol is not assigned." during print preview
Hi experts,
I am getting dump while trying print preview for particular POs in ME23n transaction(ECC 6.0). Please refer the below dump error:
Runtime Errors GETWA_NOT_ASSIGNED_RANGE
Date and Time 29.09.2009 19:30:39
Short dump has not been completely stored (too big)
Short text
Field symbol is not assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSTXC" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
A field symbol that was not assigned was accessed
(data segment no. 32769).
The field symbol is no longer assigned because there was an attempt
makde previously in a Unicode program to set the field symbol using
ASSIGN with offset and/or length specification. Here, the memory
addressed by the offset/length specification was not within the
allowed area.
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"GETWA_NOT_ASSIGNED_RANGE" " "
"SAPLSTXC" or "LSTXCFFT"
"FT_COMPOSE"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
I am getting this dump only for few POs.. Rest of the POs are able to print. I am not able to find notes for this issue. Is there any SAP notes available for that or Is there any configuration issue related to this?
Please provide solution for thsi as soon as possible.
Thanks and Regards
SubbuA field symbol is not assigned, but thats what the dump is telling you. Mostly this happens, when fields or function modules are stored by name, like the fieldnames in the fieldcatalog in an ALV report. It a field referenced in such a way does not exist you will get this error. Always store fieldnames and function names in capital letters and check mistyping of 1L 8B and so on.
-
Print Preview broken with Reader 9.3/Firefox 3.5.7?
Since updating to Firefox 3.5.7 and Reader 9.3, one of our users reports the print preview no longer works properly. Trying to downgrade to Reader 9.2 or Firefox 3.5.6 produced similar results on my test workstation.
Computers in question are running Windows XP SP3.
Has anyone else encountered this issue? Are there efforts to fix this functionality?
JohnI do not use the method "renderPDFForm" (at least not explicitly), instead use the "renderXDPForm (...)".
I added the XDP form the zip (I forgot): download from here!
And the only parameter that you can tell this method over the "target" of the resulting PDF is "com.adobe.idp.services.PDFFormRenderSpec. "
/* Common to all generated PDF */
com.adobe.idp.services.PDFFormRenderSpec renderSpec= new com.adobe.idp.services.PDFFormRenderSpec();
renderSpec.setLinearizedPDF(true);
renderSpec.setLocale("es_ES");
renderSpec.setRenderAtClient(RenderAtClient.No);
renderSpec.setCacheEnabled(false);
renderSpec.setStandAlone(true);
/* Target version 8 o superior: Usede ONLY to generate "MyForm-ES-AcroVersion8.pdf" */
renderSpec.setAcrobatVersion(AcrobatVersion.Acrobat_8);
/* Target version 7.0.5 o superior: Usede ONLY to generate "MyForm-ES-AcroVersion7.pdf" */
renderSpec.setAcrobatVersion(AcrobatVersion.Acrobat_7_0_5);
/* Target version 6 o superior: Usede ONLY to generate "MyForm-ES-AcroVersion6.pdf" */
renderSpec.setAcrobatVersion(AcrobatVersion.Acrobat_6);
After this, process PDF forms resulting in Assembler.
I tried also NO explicitly assign the "AcroVersion" ... and in such cases, the resulting AcroVersion indicated corresponds to the time of design (Adobe Designer, File / Form Properties / Default / Target Version), and in such cases the resulting PDF, also displays the warning message.
I do not know if I answered your question.
Any idea? -
Difference between execution mode of Print preview and Print for Output
Hello,
Can anybody tell the difference between execution mode of print preview and print for an output (For eg. PO output or Invoice)?. I am trying to download some documents linked to Purchase order to desktop. The code is written in the same driver program for printing PO and it is executed after smartform function module is called. It works fine in print preview mode and it fails in print mode. The reason why download fails in print mode is that GUI not available (just found from debugging).
Any ideas?
Thanks
AnilHI
try using any other printer and find out if you are getting the correct output. The printer needs to support Multiple Unicode encoding schemes like UTF 8, UTF 16BE, and UTF 16LE, plus special characters and logos, bi-directional text layout, and custom characters.. -
How to go for print preview option for locked/blocked items in PO.
Dear all,
Can we view PO even all the line items or some items in that PO are locked or blocked, by clicking Print preview button. If not by that button, is there any other way to view locked/blocked items in Print Preview format.
Can anybody suggest me on this ?
Thanks
HemanthHi,
Its not possible to see the line item in the print preview if it is blocked...
You can only display in the PO only...why do you need Print preview of blocked items??
Added on :
You can check these locked details in the EKKO and EKPO table in the SE16 tcode for the respective PO and can also download the details if req. from the same table..
Hope it helps..
Regards
Priyanka.P -
Can i set pf-status in print preview of form
I want to download a smartform in pdf after viewing the print preview .
For that i want to give a button / menu in the form print preview page.
can i set pf-status for that ?Hi,
Please find the Snippet below
*Calling the Function Module of the SmartForm
CALL FUNCTION l_fmodule
EXPORTING
CONTROL_PARAMETERS = wa_cparam
HEADER = wa_emp
IMPORTING
JOB_OUTPUT_INFO = it_otf_from_fm
TABLES
APPRAISALS = it_emp1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
case sy-subrc.
when 1.
message e005.
when 2.
message e010.
endcase.
ENDIF.
it_otf[] = it_otf_from_fm-otfdata[].
*PDF Preview
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
EXPORTING
I_OTF = it_otf[]
EXCEPTIONS
CONVERT_OTF_TO_PDF_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
case sy-subrc.
when 1.
message e006.
endcase.
ENDIF.
*Converting into PDF Format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = l_bin_filesize
TABLES
OTF = IT_OTF
LINES = IT_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5.
Function Module 'SSFCOMP_PDF_PREVIEW' will Show the PDF Preview while executing the Driver Program.
And the 'CONVERT_OTF' Function Module will convert it to the PDF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = l_bin_filesize
FILENAME = l_FULL_PATH
FILETYPE = c_bin
TABLES
DATA_TAB = IT_pdf_tab
The Above function Module will Download the content of smart form in the PDF Format.
This may help you.
Thanks and Regards,
Prakash K
Maybe you are looking for
-
Blank screen with proprietary nvidia drivers [SOLVED]
I've just installed arch on a new computer, and have encountered an issue- I can't get it running with the proprietary drivers, just nouveau, which is quite the handicap on a GeForce 660. I used the beginner's guide since my last fresh install was us
-
How can I create a Virtual Private Nework on my MacBook Pro?
Hello all, I have a MacBook Pro 17" with OS X 10.4.7. I need to install and run five instances of Apache2 and demonstration the websites without having to be connected to a network/Internet. My /etc/hosts file would look something like: 192.168.21.1
-
Saving tv shows to a hard drive
I have 2 apple tv's they run out of memory since they aren't connected to a computer. I usually delete my shows when I run out of space. but now I have too many shows downloading and my kids want to keep their shows. I bought an external hard drive i
-
Retrieval performance become poor with dynamic calc members with formulas
We are facing the retrieval performance issue on our partititon cube. It was fine before applying the member formulas for 4 of measures and made them dynamic calc. The retrieval time has increased from 1sec to 5 sec. Here is the main formula on a mem
-
Table Name For 'Picked Quantity' Field in VL03 Transaction
Dear All, I am not able to find out 'Picked Quantity' Field in VL03 Transaction.Can anybody provide me Table name and field name for the same. Regards, Mayank