Convert Smartform to WORD by OLE
I developed a quotation form with smartforms and now I'm working hard to convert this form to a WORD document by OLE
I'm in trouble because it works quite fine in WORD 2000 but it doesn't work with WORD 97. I implemented the method cl_gui_frontend_services=>registry_get_value to get the WORD version from frontend but I can't find out what the diefference is. Macros look similar in both versions.
Has anybody got an idea what the difference is ?
Thanks in advance, Ulrike
Hi Ulrike,
as an alternative way, you can try CONVERT_TEXT function.
http://help.sap.com/saphelp_erp2004/helpdata/en/d6/0dba8f494511d182b70000e829fbfe/frameset.htm
In DOI approach,
do you succeded in converting TABLES to word format?
As I know, unfortunately there are limited number of tools in abap for such conversion.
regards,
Ahmet Sahan
Similar Messages
-
I have a requiremnt to convert a smartform output generated to Word format. Apart from the font sizes, i have a logo generated in smartform which also needs to be converted in that word. Can anyone know about this or have done this requirement then please reply back.
Thanks & Regards,
Pankaj DwivediHi,
<u>A example for you</u>
CALL FUNCTION fm_name " '/1BCDWB/SF00000031'
EXPORTING
control_parameters = control_parameters
output_options = output_options
s_header = st_header
IMPORTING
job_output_info = output_data
TABLES
it_overdue = ITAB[]
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
now convert the final document (OTF format) into PDF
format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'DOC'
IMPORTING
bin_filesize = v_pdf_len
TABLES
otf = output_data-otfdata
lines = pdf_table
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
Downloading the PDF file to the local Server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = L_FILENAME
FILETYPE = C_BIN_FILETYPE
TABLES
DATA_TAB = lt_pdf_nuc_data
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.
Hope this helps you
Regards
Sudheer -
Convert SmartForm to Word File or EXCEL,POSSIBLE?
Hi,
I have a requirement to convert a SmartForm to Word File or EXCEL because they need to do some changes in the form.I know how to convert it to PDF but I don't know how to convert it to WORD or EXCEL.I've searched the forum and know i have to use the FM:CONVERT_ITF_TO_RTF.I'm a newbie and can anyone tell me how to use this FM or give me a example.Will it loose all the formatting?Thanks.CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_formname
IMPORTING
fm_name = w_fmname.
CALL FUNCTION w_fmname
EXPORTING
control_parameters = cparam
output_options = outop
user_settings = space
IMPORTING
job_output_info = tab_otf_data
TABLES
IT_VBRP = IT_VBAP[].
if sy-subrc IS INITIAL.
ENDIF.
tab_otf_final[] = tab_otf_data-otfdata[] .
*--Start of PDF--
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'DOC''
MAX_LINEWIDTH = 255
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = BIN_FILESIZE
BIN_FILE =
TABLES
OTF = tab_otf_final
LINES = doc_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 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.
DATA : FNAME TYPE STRING .
FNAME = PATH.
concatenate FNAME VBELN '.doc' into FNAME .
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = bin_filesize
FILENAME = fname
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH = file_size
TABLES
DATA_TAB = doc_tab
FIELDNAMES =
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. -
Convert Smartform in WORD Document
Hi Gurus
How can i convert a smartform Output in a word document ??? and download into PC..
Regards
GregoryThere is no standard possibility to do Word outputs in SAP.
Anyway you can develop connection of Mail-merge technology of Microsoft and SAP ABAP class i_oi_document_proxy.
http://help.sap.com/saphelp_sm32/helpdata/EN/e9/0be980408e11d1893b0000e8323c4f/content.htm
with interface get_mail_merge_interface:
http://help.sap.com/saphelp_sm32/helpdata/en/6e/8fc2e3dd0d11d2bdba080009b4534c/content.htm
Simple example I found here:
http://www.sap2word.de/abap.html
Hope, it helps
Edited by: Dimy IT dev on Sep 7, 2009 2:58 PM -
Smartforms to Word or Excel.
Hi, All.
How to convert Smartform to Word or/and Excel files.
SAP R/3 version 4.6c
Best regards
Dmitry V. Bolshakov.Hi,
I am facing the same problem in ECC 5.0.
I want to generate a word file from smartform at run time. Is it possible any way.
Thanks,
Ashok -
A Problem When Converting SmartForm (OTF) to MS Word
Hi,
i'm converting smartform to ms word file but design is spoiled.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'ASCII'
max_linewidth = 132
IMPORTING
bin_filesize = gv_fsize
* bin_file = l_pdf_xstring
TABLES
otf = itcoo
lines = tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
CALL FUNCTION 'CONVERT_TEXT'
EXPORTING
CODEPAGE = '1133'
DIRECTION = 'EXPORT'
FORMAT_TYPE = 'RTF'
* FORMATWIDTH = 72
* HEADER = ' '
* SSHEET = 'X'
* WITH_TAB = 'X'
* WORD_LANGU = SY-LANGU
TABLETYPE = 'BIN'
* TAB_SUBSTITUTE = ' '
* LF_SUBSTITUTE = ' '
* REPLACE_SYMBOLS = 'X'
* REPLACE_SAPCHARS = 'X'
* MASK_BRACKETS = 'X'
* IMPORTING
* NEWHEADER =
* WITH_TAB_E =
* FORMATWIDTH_E =
TABLES
FOREIGN = tline
ITF_LINES = tline
* LINKS_TO_CONVERT =
EXCEPTIONS
NOT_SUPPORTED = 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.
* Transfer the 132-long strings to 255-long strings
LOOP AT tline.
TRANSLATE tline USING ' ~'.
CONCATENATE gd_buffer tline INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_attach = gd_buffer.
APPEND it_attach.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE = gv_fsize
FILENAME = l_pdf_string
FILETYPE = 'BIN'
APPEND = 'X'
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = 'X'
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = it_attach
* FIELDNAMES =
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.
when converting to pdf with parameter is 'PDF' in fm CONVERT_OTF, design is not spoiled. but in 'ASCII' format in fm CONVERT_OTF design is spoiled.
how can i solve this problem?
can somebody help me pls?
Thanks.CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = FILE_LEN
TABLES
OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
Hope there will be problems with word but i think you can use pdf for that
If you do get the resolution please do let me know
Cheers -
Problem while converting smartform out to PDF.
Hi,
I have an issue while converting smartform output to PDF. After converting samrtform out to PDF, apostrophe(') is appearing as # in the pdf file. For example the word Indian's is getting printed as Indian#s. I'm using Helvetica font for printing this text.
How ever print preview is coming fine.
Could anybody provide me some inputs to solve this.
Thanks,
Rick.I'm using FM: CONVERT_OTF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = ls_job_info-otfdata
lines = lt_pdf_table
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 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. -
Print preview of smartform in word format (editable)
Hi Everybody,
I have a smartform. I want, when i click on the print priview , it should display in Ms word format and that to editable.
Plz help.
Thanks,
Mohammadi.hi,
1.convert smartform output to a word document using the function module "'RSPO_DOWNLOAD_SPOOLJOB'.
2.Check the print options for smartform.
3.Refer This:Re: print priview in smartforms
Regards,
Shiva Kumar -
Exporting smartform into word document
how to export smartform into word document . i tried converting into pdf and then download but it showing run time error that conversion is not possible and also it tells that otf command // missing. is it not possible to export directly to word document instead of pdf.plz give clear description of what to be done exactly with sample codes.
marks will be rewarded.Hi Lavanya,
Converting the output from Spool to Word is possible.
Here is the sample code.
I cut pasted a code from a link i got in the website, see if it helps.
ZSPOOL2WORD
Genera un fichero Word a partir de una orden de spool
MÓDULO : FI *
TIPO : Listado *
TITULO : Generación fichero Word
DESCRIPCION : Genera un fichero Word a partir de una orden de spool
AUTOR: Andres Picazo FECHA: 24/03/2003 *
MODIFICACIONES *
FECHA NOMBRE DESCRIPCION *
REPORT ZSPOOL2WORD
NO STANDARD PAGE HEADING
LINE-COUNT 065
LINE-SIZE 080.
INCLUDE OLE2INCL.
*----TABLAS/ESTRUCTURAS--
*----TABLAS INTERNAS--
DATA I_BUFFER(132) OCCURS 1000000 WITH HEADER LINE.
*----VARIABLES--
*----PARAMETER/SELECT-OPTIONS EN PANTALLA--
SELECTION-SCREEN BEGIN OF BLOCK BLK_PAR WITH FRAME TITLE TEXT-SEL. "Pará
PARAMETERS: P_SPOOL LIKE TSP01-RQIDENT OBLIGATORY.
SELECTION-SCREEN END OF BLOCK BLK_PAR.
SELECTION-SCREEN BEGIN OF BLOCK BLK_WOR WITH FRAME TITLE TEXT-WOR.
PARAMETERS: P_WORD AS CHECKBOX DEFAULT 'X'.
PARAMETERS: P_FWOR LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.DOC'.
PARAMETERS: P_PLAN LIKE RLGRAP-FILENAME
DEFAULT 'D:DATOSAPISMAYORPLANTILLA LIBRO MAYOR.DOC'.
SELECTION-SCREEN END OF BLOCK BLK_WOR.
SELECTION-SCREEN BEGIN OF BLOCK BLK_FIC WITH FRAME TITLE TEXT-FIC.
PARAMETERS: P_CTXT AS CHECKBOX DEFAULT ''.
PARAMETERS: P_FTXT LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.TXT'.
SELECTION-SCREEN END OF BLOCK BLK_FIC.
LOGICA DEL PROGRAMA
INITIALIZATION
INITIALIZATION.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM LEER_SPOOL.
IF NOT P_CTXT IS INITIAL.
PERFORM GRABA_FICHERO.
ENDIF.
IF NOT P_WORD IS INITIAL.
PERFORM LANZA_WORD.
ENDIF.
FORMS ADICIONALES
*& Form LEER_SPOOL
Lee la orden de spool en el buffer
FORM LEER_SPOOL.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = P_SPOOL
FIRST_LINE = 1
LAST_LINE = 9999999
TABLES
BUFFER = I_BUFFER
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error' SY-SUBRC
'al leer la orden de spool' P_SPOOL.
ENDIF.
ENDFORM. " LEER_SPOOL
*& Form GRABA_FICHERO
Graba el contenido del spool a fichero de texto.
FORM GRABA_FICHERO.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME = P_FTXT
FILETYPE = 'ASC'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = I_BUFFER
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
GUI_REFUSE_FILETRANSFER = 8
OTHERS = 9.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error' SY-SUBRC
'al grabar el fichero' P_FTXT.
ENDIF.
ENDFORM. " GRABA_FICHERO
*& Form LANZA_WORD
Abre la plantilla de Word y pega el contenido del portapapeles.
FORM LANZA_WORD.
DATA: WORDAPP TYPE OLE2_OBJECT,
DOCUMENT TYPE OLE2_OBJECT,
SELECTION TYPE OLE2_OBJECT.
Copia el contenido del buffer en el portapeles
CALL FUNCTION 'CLPB_EXPORT'
TABLES
DATA_TAB = I_BUFFER
EXCEPTIONS
CLPB_ERROR = 1
OTHERS = 2.
Abre Word
CREATE OBJECT WORDAPP 'word.application'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'No se ha podido abrir el Word'.
ENDIF.
Lo pone en visible
SET PROPERTY OF WORDAPP 'Visible' = 1.
Cogemes el objeto documento
CALL METHOD OF WORDAPP 'Documents' = DOCUMENT.
Abrimos el fichero plantilla
IF P_PLAN IS INITIAL.
CALL METHOD OF DOCUMENT 'Add'.
ELSE.
CALL METHOD OF DOCUMENT 'Open' EXPORTING #1 = P_PLAN.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al leer el fichero plantilla'.
ENDIF.
ENDIF.
Coge el objeto selección
CALL METHOD OF WORDAPP 'Selection' = SELECTION.
Pega el contenido del portapapeles
CALL METHOD OF SELECTION 'Paste'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al pegar contenido del portapapeles'.
ENDIF.
Graba el fichero
CALL METHOD OF WORDAPP 'ActiveDocument' = DOCUMENT.
CALL METHOD OF DOCUMENT 'SaveAs' EXPORTING #1 = P_FWOR.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al grabar el nuevo documento'.
ENDIF.
Cierra Word
CALL METHOD OF WORDAPP 'Quit'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al cerrar Word'.
ENDIF.
ENDFORM. " LANZA_WORD
check this also.................
By using FM RSPO_RETURN_ABAP_SPOOLJOB you will be able to get the ASCII text of your Spool, which you can download to your local HD and open with M$ Word.
Check the function module
CALL FUNCTION 'RSPO_DOWNLOAD_SPOOLJOB'
EXPORTING
id = p_spool
fname = p_file.
Give the file extn as .DOC. it will downlaod it as a
Word doc.But I fear you wont get the table formats and
all.
~~Guduri -
Download Smartform to word file
Hi ,
How to download a smartform to word file . Any help will be useful to me
Regards,
JeevaHi,
You can use the function module 'CONVERT_OTF', here the output will be downloaded as PDF with all background pictures and formats but if u download in DOC format all the formatting and background pictures will be lost.
But we can convert the pdf output to word by a third party solution. Use SolidConverter. Version 1 is free.
Otherwise:
In transaction SMARTFORMS, use in menu UTILITIES point DOWNLOAD FORM.
But the Download utility in Tx. SMARTFORM is NOT available in SAP 46C.
You can use program RSTXSCRP (SAPscript Export to Dataset / SAPscript Import from Dataset) to do this for SAPSCRIPTS.
Regards,
Anjali. -
Adobe acrobat java sdk is available? if yes then its possible to convert pdf to word
adobe acrobat java sdk is available ? if yes then its possible to convert pdf to word(doc)
There is little interest in automating Acrobat with Java, since it cannot be run on a server. On a client workstation, OLE is available, and perhaps Java can use that.
(JavaScript is of course another story). -
Convert smartform output in to PDF using CONVERT_OTF function how to do it
Hi Anil , and Hi All
I am trying to display smartforms output in java webdynpro
for that i have got the following code in sdn.
can anybody please clarify these doubts in the below code
1) What are the mandatory input and output parameters
I have to pass here in this code to my application
2) please check my previous post also in this regards please
. Please reply at the very earliest. Check the below code
Convert smartform output in to PDF using CONVERT_OTF function module and you can write pdf using parameter 'binfile' of this function in WebDynpro using the following code:
It is copied from my prg. I hope you understand it.
public void onActionGetQuote(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionGetQuote(ServerEvent)
wdThis.wdGetOppt_QwriterCustController().executeZquote_Writer_Input();
String fileName = wdContext.currentZquote_Writer_InputElement().getOrder().toString().trim() + System.currentTimeMillis() + ".pdf";
String pdfOutput = new String(wdContext.currentOutputElement().getBinfile());
if (pdfOutput != null)
try
String pdfResoucePath = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), fileName);
FileOutputStream fileOutputStream = new FileOutputStream(new File(pdfResoucePath));
PrintStream ps = new PrintStream(fileOutputStream);
ps.print(pdfOutput);
ps.close();
//Display the PDF to the browser
String fileURL = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getDeployableObjectPart(), fileName);
IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(fileURL, "Pdf Browser", false);
window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
window.removeWindowFeature(WDWindowFeature.MENU_BAR);
window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
window.open();
// To collect all the file created in the server by user
quoteFiles.add(quoteFiles.size(), pdfResoucePath);
} catch (Exception e)
throw new WDRuntimeException(e);
//@@endHi
ABAPers prepared a BAPI function module which calls Smart form , how can i execute it from java Webdynpro, so that I can display the smart form in Webdynpro. Pleas reply at the very earliest. Every answer will be rewarded.
regards
jalandhar -
Convert multiple files (word docs) to multiple pdf
Hi,
Is there a script I can use in batch processing to convert about 1500 word documents into pdf? I know it's possible to convert multiple files into one pdf, but this is no good to me. Doing these conversions one by one is going to take forever!
I've tried selecting a few documents at a time and then selecting "convert to pdf" from the right-click menu, but each one requires that you tell it where to save, and then opens the file when it is done.
I need to convert Word files on a regular basis for work, and could really use a batch process for this with so many to do!
I have Acrobat 7 Pro (version 7.1.0) on XP Pro SP 2 at work, and Acrobat 8 Pro (Version 8.1.2) on XP Pro SP 3 at home.
If there is anyway it's possible to do this via a batch process I would really appreciate knowing how!!
Apologies if this has been covered in another thread, I searched but couldn't find anything.
Thanks in advance :)I have Acrobat 9 Pro. I can batch convert Word docs to PDFs by doing this:
1. Open Acrobat Pro. Click File > Create PDF > Batch Create Multiple Files...
2. A window will open prompting you to add files. Click Add Files > Add Files... OR Add Folders... If adding a folder, navigate to it, and click OK to add it to the list. You can also select a bunch of files and drag & drop them into the Add Files window.
3. Once you have all the files listed that you want to convert, click OK. A new window called Output Options will open. In this window, select your preferred settings. For me, I want all the new PDFs to have the same filename and be in the same folder as the Word docs, so I choose these settings:
4. Click OK, and then the batch process will begin running. You will see Word opening and closing. However, you won't have to click Save or anything. You can run it unattended. The process takes a little while, so I usually set up a batch to run, then go to lunch. Once finished, you should have all your new PDFs:
Hope that helps someone! -
Download classical report to MS word with OLE
hi experts,
I have a Classical HR Report that contains profile information of the employee.Now I have to Download the Report to Ms word through OLE . I tried some threads but they were just displaying the static text.I have to download the data for the following format.could some one help me on this?
WRITE : 'Salary Information '.
SKIP 1.
WRITE : 1 SY-ULINE(83).
WRITE : /1'|',2 'Period Ending On 31ST',25'|',26'Rating(If Any)',42'|',43'Basic Salary',57'|',58'Gpm',70'|',71'CTC',83'|'.
WRITE : /1 SY-ULINE(83).
CLEAR YEARSAL.CLEAR CURRENT.
CLEAR GROSS.CLEAR GROSS1.CLEAR CTC1.
LOOP AT ISAL INTO WSAL WHERE PERNR = WP01-PERNR AND ENDDA = '99991231' ."AND CURRENT BETWEEN WSAL-BEGDA AND WSAL-ENDDA.
GROSS = WSAL-BET01 + WSAL-BET02 + WSAL-BET03 + WSAL-BET04.
GROSS1 = GROSS.CONDENSE GROSS1.
CTC1 = WSAL-BET10.CONDENSE CTC1.
WRITE : /1'|',2 'Current' ,25'|',26 WSAL-RTEXT,42'|',43 WSAL-BET01 ,57'|',58 GROSS1,70'|',71 CTC1,83'|'.
WRITE : /1 SY-ULINE(83).
ENDLOOP.
"need to download such information as above to ms word
"ole format
CREATE OBJECT gs_word 'WORD.APPLICATION' .
IF sy-subrc NE 0 .
MESSAGE s000(su) WITH 'Error while creating OLE object!'.
LEAVE PROGRAM .
ENDIF .
*--Setting object's visibility property
SET PROPERTY OF gs_word 'Visible' = '1' .
*--Opening a new document
GET PROPERTY OF gs_word 'Documents' = gs_documents .
CALL METHOD OF GS_DOCUMENTS 'ADD' = V_DOCUMENTS.
CALL METHOD OF gs_selection 'TypeText'
EXPORTING
#1 = 'Overview Of The Employee'.
"the output format would be like this .
pernr | year | salary | .......
Edited by: SYED_ibbu on Feb 23, 2011 11:07 AM
Edited by: SYED_ibbu on Feb 24, 2011 5:57 AMhi experts,
i Have to display multiple tables in the word document . i am displaying the first table but when i try to display the second table it is getting displayed inside the first table. When i debugged , i found that that the cursor is still in the first row of the first table even after the first table is displayed and the second table is displayed from that cursor position. How to get the cursor position after the end of the table ie outside the table to the main document.could some one help me on this. Below is the code i have used.
GET PROPERTY OF GS_WORD 'ActiveDocument' = gs_actdoc.
GET PROPERTY OF gs_actdoc 'Tables' = gs_tables .
GET PROPERTY OF gs_selection 'Range' = gs_range .
CALL METHOD OF gs_tables 'Add' = gs_table
EXPORTING
#1 = gs_range
#2 = LINES
#3 = '7'.
GET PROPERTY OF gs_table 'Borders' = gs_table_border .
SET PROPERTY OF gs_table_border 'Enable' = '1' .
GET PROPERTY OF gs_cell 'Range' = gs_range .
SET PROPERTY OF gs_range 'Text' = value .
CALL METHOD OF gs_table 'Cell' = gs_cell
EXPORTING
#1 = P_TABIX1
#2 = CNT.
GET PROPERTY OF GS_WORD 'ActiveDocument' = gs_actdoc1.
GET PROPERTY OF gs_actdoc1 'Tables' = gs_tables1 .
GET PROPERTY OF gs_selection 'Range' = gs_range1 .
CALL METHOD OF gs_tables1 'Add' = gs_table1
EXPORTING
#1 = gs_range1
#2 = '2'
#3 = '4'.
with thanks in advance,
syed
Edited by: SYED_ibbu on Feb 25, 2011 5:39 AM -
i work on release 11i application and converts some reports to run with xml publisher
i want to convert a total field that exist in po report to words it seems to convert number into words isthat possible i tried to make this in oracle reports and it run successfully but there is a problem when converting that report to run with xml publisher .
any help will be approtiated.Use ap_amount_utilities_pkg.ap_convert_number
E.g.
SQL> select ap_amount_utilities_pkg.ap_convert_number(trunc(12345678)) from dual;
AP_AMOUNT_UTILITIES_PKG.AP_CONVERT_NUMBER(TRUNC(12345678))
Twelve million three hundred forty-five thousand six hundred seventy-eight
Gareth
Maybe you are looking for
-
CIN details in vendor report S_ALR_87012089
Dear Experts , The report S_ALR_87012089 is used for tracking the changes made in vendor master . We maintain the vendor CIN details in the CIN tab in vendor master , but the said report doesnt trace the changes made in vendor master CIN tab . Pls a
-
Acrobat 11 doesn't create pdf. files from doc. files
I tried to create a pdf. file from a doc. file (Office 2003). Acrobat 11 instead opens a warning message with the following contents (translated from German): A high security level has been chosen. Start the application that created the document, act
-
All, As I understand it weblogic has an internal naming service that manages the deployed enterprise beans and this is what JNDI uses when requesting initial contexts and home references. Presumably you can choose to use a different naming service an
-
hello, Can anybody provide me a step by step copy of a business one case study. I have been working with people oriented projects all these days, and was never accountable for any documents, now I have got an opportunity with an MNC ( A process orie
-
Render Crashing with New Update
Well, last night I rendered a project with zero issues. Today I updated via CC App and some hell broke loose. First, when I opened CC 2014 (had used it many times before) it suddenly thinks I was using a trial version???? Even though I am signed in.