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

Similar Messages

  • Turning PDF Documents into Word Documents

    Can I use my Adobe Creative Suite 6 to turn PDF documents into Word Documents?

    Acrobat comes with most versions of Creative Suite and it is capable of converting PDFs to Word documents. The quality of the results depend on a number of things. If the PDF was originally generated from a Word source and it's well tagged, you will get much better results. More complicated layouts will generally have worse results and there will be considerable cleanup in Word needed. Exporting to text is sometimes better.
    For the future, there is a better forum for this type of question: http://forums.adobe.com/community/acrobat/creating__editing_%26_exporting_pdfs?view=discus sions

  • Insert SAP ICONS into from SAP into Word document (OLE)

    Hi ,
    I want to Insert SAP ICONS into from SAP into Word document (OLE) .
    Please let me know how can I do it? I would really appreciate it.
    Regards,
    Sanjeev

    Hello,
    Try this out:
    (1) Copy program DD_ADD_PICTURE into your own version called ZDD_ADD_PICTURE. Make sure
    you select all the checkboxes (including GUI Status and screens).
    (2) Paste the modified code at the end of this reply into your ZZ_ADD_PICTURE program.
    (3) Run ZZ_ADD_PICTURE for a range of Icons (e.g. enter Icon name ICON_IN* on the selection screen)
    (4) When you get the result list, type in ok-code EXPO directly in the ok-code
    field (you could also add a button for this function in the GUI status).
    (5) Download all the displayed icons as .gif files into a Windows folder
    that you have created to hold the icon .gif files (e.g. C:SAPICONS)
    (6) Now you can work with the icon files as you would any .gif file. (e.g. In a Word doc, use menu path
    Insert -> Picture -> From file.)
    Here is the code:
    REPORT dd_add_picture.
    TYPE-POOLS: sdydo.
    DATA: do TYPE REF TO cl_dd_document.
    DATA: is_displayed.
    TABLES: icont.
    DATA: BEGIN OF icontab OCCURS 0.
            INCLUDE STRUCTURE icon.
    DATA: END OF icontab.
    select-options: s_icon for icontab-name obligatory.
    SELECT * FROM icon INTO TABLE icontab WHERE locked NE 'X'
                        AND name in s_icon.
    * Event Handler Definition, handling changes of GUI fonts, colors,...
    CLASS cl_my_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
          use_new_resources FOR EVENT resources_changed OF cl_gui_resources.
    ENDCLASS.
    DATA: my_handler TYPE REF TO cl_my_event_handler.
    CREATE OBJECT my_handler.
    * Call Screen
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
      IF is_displayed IS INITIAL.
        SET PF-STATUS 'BRP'.
        SET HANDLER my_handler->use_new_resources.
    * create document
        CREATE OBJECT do.
    * fill document
        PERFORM dd_add_icon USING do.
    * merge document
        CALL METHOD do->merge_document.
    * display document .
        CALL METHOD do->display_document
                           EXPORTING  container          = 'HTML'
                           EXCEPTIONS html_display_error = 1.
                                           " do some exception handling ...
        is_displayed = 'X'.
      ENDIF.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.                       "Beenden
          LEAVE PROGRAM.
        WHEN 'PRN'.
          CALL METHOD do->print_document
                  EXPORTING reuse_control = 'X'.
        WHEN 'PRN_NEW'.
          DATA text TYPE sdydo_text_element.
          CALL METHOD do->initialize_document.
          text = 'Dies Dokument wurde speziell fürs Drucken erstellt!' &
                            ' Druckdatum: '(500).
          CALL METHOD do->add_text EXPORTING
                               text         = text
                               sap_fontsize = cl_dd_area=>large.
          WRITE sy-datum TO text DD/MM/YYYY.
          CALL METHOD do->add_text EXPORTING text = text .
          CALL METHOD do->new_line EXPORTING repeat = 2.
          PERFORM dd_add_icon USING do.
          CALL METHOD do->merge_document.
          CALL METHOD do->print_document.
        WHEN 'EXPO'.
          CALL METHOD do->export_document EXPORTING to_filesystem = 'X'.
      ENDCASE.
      CLEAR sy-ucomm.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Form  DD_ADD_ICON
    *       text
    FORM dd_add_icon USING p_do TYPE REF TO cl_dd_document.
      DATA ta TYPE REF TO cl_dd_table_element.
      DATA col1 TYPE REF TO cl_dd_area.
      DATA col2 TYPE REF TO cl_dd_area.
      DATA col3 TYPE REF TO cl_dd_area.
      DATA text TYPE sdydo_text_element.
    * set Heading
      text = ' Bilder in Dynamischen Dokumenten'(001).
      CALL METHOD p_do->add_text EXPORTING text = text
                                      sap_style = 'heading'.
      CALL METHOD p_do->new_line.
      CALL METHOD p_do->new_line.
      CALL METHOD p_do->add_table EXPORTING with_heading    = 'X'
                                          no_of_columns     = 3
                                          width             = '100%'
                                          IMPORTING table   = ta.
    * set columns
      text = 'Ikone'(011).
      CALL METHOD ta->add_column EXPORTING heading  = text
                                 IMPORTING column   = col1.
    * fill table
      LOOP AT icontab.
        SELECT SINGLE * FROM icont WHERE langu = sy-langu
                                   AND   id    = icontab-id.
        CALL METHOD col1->add_icon EXPORTING sap_icon = icontab-name
                                             sap_color = 'LIST_GROUP'.
      ENDLOOP.
    ENDFORM.                               " DD_ADD_ICON
    * CLASS cl_my_event_handler IMPLEMENTATION.
    CLASS cl_my_event_handler IMPLEMENTATION.
      METHOD use_new_resources.
        IF is_displayed EQ 'X'.
    * initialize document
          CALL METHOD do->initialize_document.
    * fill document
          PERFORM dd_add_icon USING do.
    * merge document
          CALL METHOD do->merge_document.
    * display document
          CALL METHOD do->display_document
                              EXPORTING reuse_control        = 'X'
                                        reuse_registration   = 'X'.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Regards,
    Vasanth

  • Illustrator JPGs turn into Black box when pasted into Word documents

    I have made JPGs of my letter headding to paste into Word documents. When I paste them they look like a big black box. It doesn't even seem consistant, sometimes it works mostly it doesn't. How can I fix this issue?

    How are you "pasting" them? If you are exporting JPG from Illustrator use Worst's Insert > Picture > From File. PNG would probably be a better option for your export, though.

  • How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software.

    How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software. I downloaded open office to my mac to try and save money. It worked well for a while. Now I get this pop-up message that asks me to "Reopen" and when I select the option, nothing happens. I cannot save my documents anymore and I cannot convert them to word. Help!

    dwb wrote:
    Does OpenOffice output Word documents by default or do you have to select it manually?
    You have 17 options to save as in Open Office, one of which is .doc  files,  yes it needs to be saved manually.
    You may be able to default to DOC, but have not tried same.
    Since Open Office is 99% same as Word, I use it, or Word, either one.  Open Office is a bit less buggy than Word 11'

  • I've become increasingly frustrated with the ipad adobe app. I've subscribed to be able to convert my pdf files into word documents and it has yet to work I've paid for a service that does not work which in turn makes me a disgruntled customer to say the

    I've become increasingly frustrated with the ipad adobe app. I've subscribed to be able to convert my pdf files into word documents and it has yet to work I've paid for a service that does not work which in turn makes me a disgruntled customer to say the least very disappointed with such horrible service

    Which service did you subscribe to?  Adobe PDF Pack?
    Once I know the service that you subscribed to, I can move this post to the right forum so that you can get in touch with the folks who can assist you.

  • How do you convert a jpeg file into word document so i can edit it?

    How do you convert a jpeg file into word document so i can edit it?

    http://office.microsoft.com/en-us/mac-word-help/training-edit-pictures-in-office -for-mac-2011-RZ103709558.aspx

  • How to download graph output into word document?

    Hello experts!
    I have plotted graphs using some data.
    The graph is actually output of a function module into a container.
    Can anybody tell me , how can i download this graphs into a word document?
    I am able to download text data into word documents, but not graphs.
    Regards,
    Rahul

    Steelers, unfortunately your reply didn't get through. Perhaps you tried to send an attachment or screen shot by email? Please try again (but not sending attachments or screen shots by email).

  • Am unable to insert table and graphs into word document in labwindow/CVI? can any one help me ?

    Am unable to insert table and graphs into word document in labwindow/CVI? can any one help me ?

    Are you using the Word Report Generation instrument? You can find it in toolslib\activex\word\wordreport.fp under the CVI directory.
    The instrument comes with a sample project that shows how to include table and graphs in a Word document: see samples\activex\word\wordrpt.cws in the samples foder of your CVI installation.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Exporting music into word

    I am having trouble exporting music into word.  Part of it comes in Ok and the rest is garbled.

    Hi Bonnie,
    Are you using your ExportPDF subscription for this task?
    If so try this:
    OCR
    Let me know if that helps!
    Kind regards, Stacy

  • Problems to export pdf to word document

    Every time I try to export pdf to word document gives me problems.
    I get the message that you can not do with a problem, I decided to change the browser and will not let me try and I get the message subscribe
      That I can do about it
    Thank you.

    Olá bahl2
    Pode, por favor explicar sua dúvida em português mesmo?  Porque, em inglês, está difícil entender o que você precisa :/.
    Você publicou sua pergunta no fórum de scripts de Adobe Illustrator, ao invés do fórum geral. Você está exportando o documento por meio de um script, é isso?
    Quando você se refere a "cortinhos", você se refere a aquelas finas divisões em seu plano de fundo vermelho?
    Um abraço
    Gustavo.

  • Convert Smartform in WORD Document

    Hi Gurus
    How can i convert a smartform Output in a word document ??? and  download into PC..
    Regards
    Gregory

    There 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

  • Converting scanned PDF into Word document?

    Can you convert a scanned document that comes out as a PDF into a Word document and if so, how do I do it?  So far using Mac OS10.8 I get a blank document.

    Open the PDF with Acrobat (Pro or Standard).
    Perform OCR of the scanned image of textual content.
    Save.
    Use Acrobat's Save As (pre-Acrobat 9) or Export feature to output to Word.
    Be well...

  • Inserting my photos into Word document

    I am putting together a document of my family history and want to insert some photos I've taken into it. But the photos are each about 2.2MB - 2.9 MB and when I copied & pasted the photos into the Word doc the Word doc ended up at 124MB! W/out these photos the Word doc is 11MB!
    These are photos I've taken and are in my iPhoto. I've inserted other photos for which I don't have the original so I've scanned these and then inserted into the doc - they are much smaller and range from 24KB to 264KB depending on the size of the original. How do I get around this problem?
    Many thanks

    Terence
    Again thanks for yr advice. Having played around with the various options you gave in yr response to my other posting, I think the best method for me inserting my photos in the Word doc is to export to desktop as that way I can alter the size of the file.
    By scaling the photo to a smaller size, the file size is much smaller. I found if I just dragged the photo to the desktop and then into my Word doc, then the photo was still about 2.2MB. By scaling it down as it was exported, and then dragging into Word doc it was only 224KB.
    Does this approach sound right to you?

  • Copying and Pasting Form into Word Document

    Hi,
    I am new to formcentral.  I am having a hard time copying and pasting a COMPLETED form into word.  Everytime I try, I can see the form questions but the actual filled out responses to the form are blank in the word document.  I have also tried to "export" from Adobe into a word document and that also is blank. Any suggestions?

    Yes you were right the resolution was different! Thanks for your help

Maybe you are looking for