Send Data into word.

Hi there ! I got this problem I need to send some datas from an abap program to a Microsoft word document
(In the word file i need two colums that come from the abap program and two colums that the user will input. ), i tried to search different things but without result..
there is someone who can help me
Thanks Gil.

I feel, if you do this for MS Excel then It woud be good and easy.
REPORT  MULTIEXCEL                    .
INCLUDE ole2incl.
DATA: application TYPE ole2_object,
       workbook TYPE ole2_object,
       sheet TYPE ole2_object,
       cells TYPE ole2_object.
CONSTANTS: row_max TYPE i VALUE 256.
DATA index TYPE i.
DATA: BEGIN OF itab1 OCCURS 0,
first_name(10),
END OF itab1.
START-OF-SELECTION.
  APPEND: 'Arpit' TO itab1,
          'John' TO itab1.
  CREATE OBJECT application 'excel.application'.
  SET PROPERTY OF application 'visible' = 1.
  CALL METHOD OF application 'Workbooks' = workbook.
  CALL METHOD OF workbook 'Add'.
Create first Excel Sheet
  CALL METHOD OF application 'Worksheets' = sheet
                               EXPORTING #1 = 1.
  CALL METHOD OF sheet 'Activate'.
  SET PROPERTY OF sheet 'Name' = 'Sheet1'.
  LOOP AT itab1.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Value' = itab1-first_name.
  ENDLOOP.
Save excel speadsheet to particular filename
  CALL METHOD OF sheet 'SaveAs'
                  EXPORTING #1 = 'c:\temp\exceldoc1.xls'     "filename
                            #2 = 1.                          "fileFormat
Closes excel window, data is lost if not saved
SET PROPERTY OF application 'visible' = 0.
Reg,
Arpit

Similar Messages

  • Using VBA from Excel, how to send datas into a SQL server

    Hi,
    How do you use VBA to provide the connection to insert datas into a table within a database.
    What kind of statements do we need. 
    The database, and table are for example already created.
    Thanks

    Hi
    I know this is an old thread but did you come right?

  • How to post the data into word file

    Dear Forums
    I am a user of jDeveloper
    and working on jclient\swing.
    The problem is that i want to post\Transfer data to a formatted word file. In word file there is a same table containing same contents as jtable. Now after selection of a particular row \column the data of that row\column transferred to word file table.
    i have no idea about it.
    Help me for the Same
    thnkx.

    hi,
    I don't think the Javaworld stuff is needed in any case since ctrl c and ctrl v wor very fine. My problem is diffent. I want to copy paste using a mouse. I am using a Mouse Adapter with my table and using the DefaultEditorKit.copyAction() class as my action. But this does not work.. seems its not copying the data to the clipboard. But this migght be cause it works only with JTextComponent ?!
    Can you please tell me how to go about it.
    regards,
    Sumit.

  • How to load Report data into Word Doc.

    Hi,
    I built a couple Oracle reports. However my client wants to load these report into Microsoft word to look the same format as Oracle reports. How can I do it?
    Thanks
    Dave

    Dave,
    have you tried DESFORMAT=RTF (I'm not sure if that is what you want)? This created a rich text format file readable with MS Word.
    Gerald Krieger

  • 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).

  • Error while activating the data into DSO

    Hi
    My base DSO is used to load 4 other data targets.
    In process chain, after the base DSO gets activated there are 4 DTPu2019s running to load the data from base DSO to other DSO and 3 cubes.
    When loading to other DSO, We have encountered an error
    Object is currently locked by BI Remote
    Lock not set for : Activating data in DSO
    Activation of M records terminated.
    1. My question is when loading the data from base DSO to other objects , how does the lock mechanism works.
    I know that we cannot load the data into base DSO, when base DSO is sending data into target.
    2. What difference does it make when loading DSO to DSO and cube parallel?
    Thanks
    Annie

    Hi Annie.....
    1. My question is when loading the data from base DSO to other objects , how does the lock mechanism works.
    I know that we cannot load the data into base DSO, when base DSO is sending data into target.
    Do you mean to say that the loading in the 2nd level DSO was successful .....but the activation failed ?
    Have you checked in SM12 that whether that 2nd level DSO is somehow locked or not ?
    Is any further targets getting loaded from this 2nd level DSO ?
    Look suppose u r loading a DSO A.........and in the mean time some load starts from DSO A to some other target(it may be DSO or a cube).........then the activation in the DSO A will fail........because since the last request in the DSO A is not activated....that request will not get considered in the subsequent load....and since the load is already in progress....system will not allow to activate any new request......
    Another option can be that DSO A is getting loaded from some other targets as well.......so since still some load is in progress in this target....it will not allow the activation....
    So check it and atart the activation again..
    2. What difference does it make when loading DSO to DSO and cube parallel?
    The main difference is that there is no activation concept in the cube....so a cube may get loaded from several targets in parallel......
    A DSO can also get loaded in parallel.......but activation should start once all the loads get completed successfully.....
    Regards,
    Debjani....

  • Sending data from flat file or oracle table view to a IBM MQ

    Hi,
    We need a help in developing solution.
    We have a scenario, where data(multiple records) in source (table/file) needs to populated into a queue(JMS IBM MQ) as a single message. To achieve this we are trying a two step process.
    1)     We created a temp table to store multiple records from file, this temp table is having one column of *‘clob’* data-type which will store data from file into a single row. We are facing issue while loading data from file to staging area using LKM FILE TO ORACLE (SQLLDR)
    When we are executing interface, while creating C$ table it is going error out . Instead of taking clob (target write data type) it is taking varchar with +5000+ size whereas varchar supports only *4000*.
    create table SNPM.C$_0SINGLERECORD
    C1_C1 VARCHAR2(5000) NULL
    NOLOGGING
    Error message:
    910 : 42000 : java.sql.SQLException: ORA-00910: specified length too long for its datatype
    java.sql.SQLException: ORA-00910: specified length too long for its datatype
    Need help in sending data into destination table.
    2) After populating this data into destination(temp table) as a single record we need to send each row as a single message to JMS MQ. currently we are using LKM FILE to SQL to load into Staging area and IKM SQL TO JMS APPEND to put message in JMS MQ. We are succeeding in putting message of length < 4000 as these KMs are converting the data using varchar2, but we have data of large size+(>4K)+.
    Pointer/ solution will be of great help.
    Please let me know in case you need more description.

    The error message that is showing while using clob as datatype(which we created as user data type in data types section of respective technology)
    java.lang.NumberFormatException: For input string: "4294967295"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
    while using varchar2 in creating C$ table following is the error:
    910 : 42000 : java.sql.SQLException: ORA-00910: specified length too long for its datatype
    java.sql.SQLException: ORA-00910: specified length too long for its datatype
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)

  • BPEL doesn't insert Date into BAM dataobjects

    I have integrated BPEL process to send data into BAM data objects. I can insert data into BAM successfully when I don't map "PO Creation date" (one of the field of payload--variableData--data) but it doesn't insert data when I map PO creation date.
    I am getting PO creation date in format "20080405 103354". I tried to use Date format but I got no success.
    It takes Timestamp field under actionData-->header successfully without formating it.
    So what I have to do to enter this date?

    Priyasagi wrote:
    Hi,
    Use to_date function to convert the charactor input as,
    INSERT INTO L_EMPLOYEES VALUES (201, 'SUSAN', 'BROWN', 'EXE',CV, 30, '3484', NULL); 
    Hope it will help.
    Your usage of to_date -- without supplying a specific format mask -- is still relying on NLS_DATE_FORMAT settings, just as the OP's original was with its implicit conversion.  It's rather pointless to use to_date without a format mask.
    The only difference between
    insert .... to_date('12-Jun-1996')
    and simply
    insert .... '12-Jun-1996'
    is that in the first you are explicitly telling oracle to do what it would implicitly do in the second.  Either way, it is relying on the NLS_DATE_FOMAT that is in effect.

  • Merge data to WORD using Java

    How to format data into WORD format?
    Planning to do to formatting it in Unix server, and once done download the WORD file to the window client.
    Tq!

    hi
    You can use J-Integra as con bridge as connectiong tool.
    Prashant

  • How is the best way to send data from local database into remote database ?

    Hi all,
    I need to send data from local Oracle database into remote oracle database. Both sites connected via 128 kbps frame relay connection.
    The sending need to be done once a week, can be done nightly.
    How is the best way to do this ?
    Thank you very much,
    xtanto

    How is the best way to do this ?How much are you planning to send?
    You can use COPY command. Ensure that you have valid database link between two databases.
    Available options are:
    create - creates a new table. errors out if the destination table exists.
    replace - drop the destination table and re-creates with data.
    insert - inserts data if the destination table exists.
    append– appends data into an existing table.
    use set arraysize 5000 -The arraysize specifies the number of rows that SQL*Plus will retrieve from the database at one time.
    copy from scott/tiger@ORCL to scott/tiger@ORCL92 create new_emp using select * from emp;

  • How to  send ALV output data into Excel sheet format via Mail to the user?

    Hi friends,
    I have a doubt ie,
    How to  send ALV output data into Excel sheet format via Mail to the user?
    regards
    Moosa

    Hi,
    Provide the output internal table to the objbin in the below FM
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = i_docdata
                put_in_outbox              = c_x
           TABLES
                packing_list               = i_objpack
                object_header              = i_objhead
                contents_bin               = i_objbin
                contents_txt               = i_objtxt
                receivers                  = i_reclist
    and specify the document type
      i_objpack-doc_type   = 'XLS'.
    and try.
    Regards,
    Nandha

  • Read Write Data into a MS Word document

    The requirement I am fullfilling directly specifies the need to write data into a Microsoft Word Document and if Necessary, Read Back data from a Microsoft Word Document. The data will be simple text but as time goes on I anticipate the systems engineers may expand the requirement. I want to cross one bridge at a time so I am just concentrating on the text issue. I must do it from within a stand-alone application. Not through a server, not through ASP, not through a browser, just a stand alone application. It appears from my own investigation of the JAVA API that this is not possible. Regrettably, I am only a day or so away from switching to C# or VB to get this job done. My first question is
    1. Can Java Do this?
    2. If not, does Sun Microsystems have any plans to add this capabiliy?
    3. Can we make recommendations to Sun to add this capability to JAVA?

    1. Can Java Do this?Java can do anything but there is no built-in ability to do just that.
    2. If not, does Sun Microsystems have any plans to add
    this capabiliy?
    3. Can we make recommendations to Sun to add this
    capability to JAVA?Very doubtful! MS Office document formats are not completely open to the public - and they are weird! Supporting this capability would probably require an agreement with Microsoft and it would mean you had to change the API for every time Microsoft chooses to change the document formats.
    But there are some open source tools that claim to be rather good at reading and writing MS Office files. Take a look at this one:
    http://jakarta.apache.org/poi/index.html

  • Problem sending the data into XI through webservice

    Dear All,
    I am getting an error while sending the data into XI after hitting my webservice.
    SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
    </SOAP:Header>
    <SOAP:Body>
    <SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>SOAP:Client</faultcode>
    <faultstring>Error during conversion of XI message</faultstring>
    <faultactor>http://sap.com/xi/XI/Message/30</faultactor><detail>
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIProtocol</SAP:Category>
    <SAP:Code area="PARSER">UNEXPECTED_VALUE</SAP:Code>
    <SAP:P1>Main/@versionMajor</SAP:P1>
    <SAP:P2>000</SAP:P2>
    <SAP:P3>003</SAP:P3>
    <SAP:P4/>
    <SAP:AdditionalText/>
    <SAP:ApplicationFaultMessage namespace=""/>
    <SAP:Stack>XML tag Main/@versionMajor has incorrect value 000; expected value is 003
    </SAP:Stack></SAP:Error></detail></SOAP:Fault>
    </SOAP:Body>
    </SOAP:Envelope>
    Please suggest what the problem could be.
    Abhishek

    <SAP:Stack>XML tag Main/@versionMajor has incorrect value 000; expected value is 003
    </SAP:Stack></SAP:Error></detail></SOAP:Fault>
    --> this states as it is version problem
    Main/@versionMajor is XI message protocol version
    check SXMB_ADM if the system is maintained as XI

  • Ive just subscribed online but realised I have the wrong service by mistake... I require Convert PDF into Word doc service but selected Adobe send in error, sorry. Can you please switch the service for me? Thanks Anthony Levy

    Ive just subscribed online but realised I have the wrong service by mistake... I require Convert PDF into Word doc service but selected Adobe send in error, sorry. Can you please switch the service for me? Thanks Anthony Levy

    Hi Tony,
    Please refer this KB document : Return, cancel, or exchange an Adobe order
    Please let me know if you need any further assistance.
    Regards,
    Rahul

  • Convert Binary Data into Pdf & send it as attachment in a mail from R/3

    Hi,
    Scenario:
    The interactive form saved in WebDynpro Application is sent to R/3 in binary format. It has to be converted into pdf and sent it as an attachment in mail to the respective person in workflow.
    Kindly help on these issues :
    1. How to receive the binary data in R/3 sent by the WebDynpro Application ?
    To my knowledge we can receive the binary in XSTRING data type. Plz correct me if am wrong.
    2. How do i convert the received binary data into pdf ?
    Thanks,
    Bharath Kaushik Krishnan

    HI Bharath,
    I think You can reuse teh XString for binary data.there are certain function modules in R/3 for creating pdf/for sending it as pdf attatchment.please search in abap forums you will find more information
    With Regards
    Naidu

Maybe you are looking for

  • Menus are greyed out

    the menus on the top you can see but when you click on say File they are all greyed out.

  • Indesign Standard Plug-in MISSING.

    Hi, McAfee has deleted one of my Indesign Plug-ins as it was affected by a trojan, meaning my indesign will not start. The plug-in deleted is 'Gradient Fill' Saved as Gradient Fill.rpln in: C:\Program Files\Adobe\Adobe InDesign CS5\Required I would b

  • I cannot bring up a gallery, sent as an on-line, on another computer.  Ok on my computer

    I have up loaded a gallery of viedos and photos to my URL page, which I can bring up on my computer, but cannot be seen on another computer.  How do I upload a gallery to my photshop.com web page, which can be seen by people I send the URL?

  • Transfer backuped apps from pc to ios

    I backed up all of my apps and photos from my ipad to itunes account an can't seem to figure out how to get them back on my ipad now that i reset it? please help. thanks

  • Migrating to a new computer

    Hi, This is a simple question, but some rudimentary searching has not given me a definitive answer: I am moving from the UK to Asia. I am leaving my current laptop, with iTunes 8.2.0.23, in England and will buy a new computer when I arrive, onto whic