Opening MS Word Editor from ABAP Program

Hi all,
My requirement is to give two options. User can open Text Editor OR MS Word Editor from screen. Text/any data entered on this will then be saved.
Can anyone help me regarding this?
Thanks a lot in advance.
Best Regards,
Prasad

Prasad,
Pls. go through below link.
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/204d1bb8-489d-2910-d0b5-cdddb3227820]
Regards,

Similar Messages

  • Open Outlook email editor from SAP

    Hi,
    I need to open the outlook email editor from ABAP program so that the user can manually input the To, CC, subject, body and attachment.
    Can anybody help ?
    Thanks and regards
    Arijit Ghose

    check out this sample code (using VB script) , you can do similar stuff using activex control as well.
    FUNCTION Z_OUTLOOK_MAIL_CREATE.
    *"*"Local interface:
    *"       IMPORTING
    *"             VALUE(I_SUBJECT) TYPE  C OPTIONAL
    *"       TABLES
    *"              EMAIL_BODY STRUCTURE  SOLI OPTIONAL
    *"              ADDRESS_LIST STRUCTURE  SOLI OPTIONAL
    *"              ATTACHMENTS STRUCTURE  SOLI OPTIONAL
    *"       EXCEPTIONS
    *"              INVALID_PATH
    *"              DOWNLOAD_FAILED
    *"              EXECUTION_FAILED
      DATA:
        V_TRANSLATE(2),
        IT_VBS          LIKE SOLI
           OCCURS 50 WITH HEADER LINE,
        V_LAST,
        V_VBS_FILENAME  LIKE RLGRAP-FILENAME,
        COMMANDLINE(1000).
    *- Prepare a code to translate a quote into a hex-tab
    *- so it can then be translated back to 2 double quotes.
      CONCATENATE '"' CON_HEX-TAB INTO V_TRANSLATE.
      APPEND:
        'Dim myolapp                                        ' TO IT_VBS,
        'Dim olNamespace                                    ' TO IT_VBS,
        'Dim myItem                                         ' TO IT_VBS,
        'Dim myRecipient                                    ' TO IT_VBS,
        'Dim myAttachments                                  ' TO IT_VBS,
        '                                                   ' TO IT_VBS,
        'Set myolapp = CreateObject("Outlook.Application")  ' TO IT_VBS,
        'Set olNamespace = myolapp.GetNamespace("MAPI")     ' TO IT_VBS,
        'Set myItem = myolapp.CreateItem(olMailItem)        ' TO IT_VBS,
        '                                                   ' TO IT_VBS.
    *- Translate the body into a single line.
      LOOP AT ADDRESS_LIST.
        CONCATENATE
          'Set myRecipient = myItem.Recipients.Add("'
          ADDRESS_LIST
          INTO IT_VBS.
        APPEND IT_VBS.
      ENDLOOP.
      APPEND:
        'myItem.VotingOptions = "Approve;Reject"' TO IT_VBS.
    *- Build the subject line.
      CONCATENATE
        'myItem.Subject = "'
        I_SUBJECT
        INTO IT_VBS.
      APPEND IT_VBS.
    *- Prepare attachments
      APPEND:
        'Set myAttachments = myItem.Attachments' TO IT_VBS.
    *- Check if the attachment exists
      LOOP AT ATTACHMENTS.
        CALL FUNCTION 'WS_QUERY'
             EXPORTING
                  FILENAME       = ATTACHMENTS
                  QUERY          = 'FE'
             EXCEPTIONS
                  INV_QUERY      = 1
                  NO_BATCH       = 2
                  FRONTEND_ERROR = 3
                  OTHERS         = 4.
        IF SY-SUBRC EQ 0.
          CONCATENATE 'myAttachments.Add("'
                      ATTACHMENTS
            INTO IT_VBS.
          APPEND IT_VBS.
    * '    olByValue, 1, "4th Quarter 1996 Results Chart"'
    *      append '    olByReference, 1' to it_vbs.
        ELSE.
          MESSAGE I017(ZZ) WITH
             'Could not attach' ATTACHMENTS.
        ENDIF.
      ENDLOOP.
    *- Prepare the email body.
      CLEAR: V_LAST, IT_VBS.
      APPEND IT_VBS.
      LOOP AT EMAIL_BODY.
        AT FIRST.
          APPEND 'myitem.body = _' TO IT_VBS.
        ENDAT.
        AT LAST.
          V_LAST = 'X'.
        ENDAT.
        TRANSLATE EMAIL_BODY USING V_TRANSLATE.
        WHILE SY-SUBRC EQ 0.
          REPLACE CON_HEX-TAB WITH '""' INTO EMAIL_BODY.
        ENDWHILE.
        IF V_LAST = 'X'.
          CONCATENATE '"' EMAIL_BODY '" &vbCrLf '
            INTO IT_VBS.
        ELSE.
          CONCATENATE '"' EMAIL_BODY '" &vbCrLf  &_'
            INTO IT_VBS.
        ENDIF.
        APPEND IT_VBS.
      ENDLOOP.
      APPEND 'myItem.Display' TO IT_VBS.
    *- Prepare the vbscript filename for download and execution
      CLEAR V_VBS_FILENAME.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                ENVIRONMENT    = 'TEMP'
                QUERY          = 'EN'
           IMPORTING
                RETURN         = V_VBS_FILENAME
           EXCEPTIONS
                INV_QUERY      = 1
                NO_BATCH       = 2
                FRONTEND_ERROR = 3
                OTHERS         = 4.
      IF SY-SUBRC <> 0.
        RAISE INVALID_PATHNAME.
      ENDIF.
      CONCATENATE V_VBS_FILENAME 'mail.vbs'
        INTO V_VBS_FILENAME.
      COMMANDLINE = V_VBS_FILENAME.
    *- Download the file
      CALL FUNCTION 'WS_DOWNLOAD'
           EXPORTING
                FILENAME            = V_VBS_FILENAME
                FILETYPE            = 'DAT'
                MODE                = 'S'
           TABLES
                DATA_TAB            = IT_VBS
           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
                OTHERS              = 8.
      IF SY-SUBRC <> 0.
        RAISE DOWNLOAD_FAILED.
      ENDIF.
      CALL FUNCTION 'WS_EXECUTE'
           EXPORTING
                COMMANDLINE    = COMMANDLINE
                PROGRAM        = 'WSCRIPT.EXE'
           EXCEPTIONS
                FRONTEND_ERROR = 1
                NO_BATCH       = 2
                PROG_NOT_FOUND = 3
                ILLEGAL_OPTION = 4
                OTHERS         = 5.
      IF SY-SUBRC <> 0.
        RAISE EXECUTION_FAILED.
      ENDIF.
    ENDFUNCTION.
    Regards
    Raja

  • Is it possible to call website from ABAP Program?

    Hi Experts,
           Is it possible to call website from ABAP Program?
    It is very Urgent Help me.
    Regards,
    Ashok.

    Hi,
    Check the following program:
    REPORT ZURL NO STANDARD PAGE HEADING.
    DATA: BEGIN OF URL_TABLE OCCURS 10,
    L(25),
    END OF URL_TABLE.
    URL_TABLE-L = 'http://www.lycos.com'.APPEND URL_TABLE.
    URL_TABLE-L = 'http://www.hotbot.com'.APPEND URL_TABLE.
    URL_TABLE-L = 'http://www.sap.com'.APPEND URL_TABLE.
    LOOP AT URL_TABLE.
      SKIP. FORMAT INTENSIFIED OFF.
      WRITE: / 'Single click on '.
      FORMAT HOTSPOT ON.FORMAT INTENSIFIED ON.
      WRITE: URL_TABLE. HIDE URL_TABLE.
      FORMAT HOTSPOT OFF.FORMAT INTENSIFIED OFF.
      WRITE: 'to go to', URL_TABLE.
    ENDLOOP.
    CLEAR URL_TABLE.
    AT LINE-SELECTION.
    IF NOT URL_TABLE IS INITIAL.
      CALL FUNCTION 'WS_EXECUTE'
           EXPORTING
                program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'
                commandline     = URL_TABLE
                INFORM         = ''
              EXCEPTIONS
                PROG_NOT_FOUND = 1.
      IF SY-SUBRC <> 0.
         WRITE:/ 'Cannot find program to open Internet'.
      ENDIF.
    ENDIF.
    Regards,
    Bhaskar

  • Open a word document from a Java Application

    Hi,
    Can I open a word document from a java GUI apllication and point to a bokkmark automatically in the word document when opened.

    See this thread:
    http://forum.java.sun.com/thread.jspa?threadID=228332&messageID=810684

  • XML files from ABAP programs

    Hi everyone!
    Is there a way in ABAP to output XML files?  Pls. send code/ function module if any.
    From ABAP programs, we are sure that we can output TEXT files, but how about XML files?
    The significance of this question is related
    Currently we are using XI to interface SAP and AMS, this question for ABAP to produce XML file arose, if for example, the XI server is down and we have to still send data from one system to another. IDocs can also produce XML files, pls confirm.  Earlier however, we have preferred XI rather than IDocs to do this.  Anyway, any idea regarding this scenario will be greatly appreciated. 
    Thanks and God bless!
    Celeste

    Hi,
    Please check this sample codes from other thread.
    1. itab --- > xml
        xml ---> itab.
    2. This program will do both.
    (just copy paste in new program)
    3.
    REPORT abc.
    *-------------- DATA
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    DATA : BEGIN OF itab OCCURS 0,
    a(100) TYPE c,
    END OF itab.
    DATA: xml_out TYPE string .
    DATA : BEGIN OF upl OCCURS 0,
    f(255) TYPE c,
    END OF upl.
    DATA: xmlupl TYPE string .
    ******************************* FIRST PHASE
    ******************************* FIRST PHASE
    ******************************* FIRST PHASE
    *------------------ Fetch Data
    SELECT * FROM t001 INTO TABLE t001.
    *------------------- XML
    CALL TRANSFORMATION ('ID')
    SOURCE tab = t001[]
    RESULT XML xml_out.
    CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
    EXPORTING
    TEXT = xml_out
    * IMPORTING
    * LENGTH =
    TABLES
    FTEXT_TAB = itab.
    *-------------- Download
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filetype = 'BIN'
    filename = 'd:xx.xml'
    TABLES
    data_tab = itab.
    ******************************* SECOND PHASE
    ******************************* SECOND PHASE
    ******************************* SECOND PHASE
    BREAK-POINT.
    REFRESH t001.
    CLEAR t001.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'D:XX.XML'
    filetype = 'BIN'
    TABLES
    data_tab = upl.
    LOOP AT upl.
    CONCATENATE xmlupl upl-f INTO xmlupl.
    ENDLOOP.
    *------------------- XML
    CALL TRANSFORMATION ('ID')
    SOURCE XML xmlupl
    RESULT tab = t001[]
    BREAK-POINT.
    Regards,
    Ferry Lianto

  • Good afternoon ladies and gentlemen!   My question concerns the impossibility to open RAW-files directly from the program Adobe Bridge. At the moment when you open a RAW-file from Adobe Bridge by double-clicking, RAW-file is opened only in Photoshop. In t

    Good afternoon ladies and gentlemen!
    My question concerns the impossibility to open RAW-files directly from the program Adobe Bridge. At the moment when you open a RAW-file from Adobe Bridge by double-clicking, RAW-file is opened only in Photoshop. In the settings Adobe Bridge - in "open RAW-files by double-clicking in Adobe Camera Raw» box is checked. When you try any changes in the settings Adobe Bridge system displays a message:
    Bridge's parent application is not active. Bridge requires that a qualifying product has been launched at least once to enable this feature.
    The entire line of Adobe products on my computer updated to the latest updates. Previously, a family of products Adobe Photoshop on your computer is not set. Computer - PC, Windows 7 Enterprises.

    <moved from Adobe Creative Cloud to Bridge General Discussion>

  • When I try to install abode - it will download but says i have to close firefox before it will install. also i try to open a word document from a website and it will not open - it will only download

    i install abode - it will download but not install and indicates i have to close firefox before it will download. Also, I try to open a word document from a website - it will download but not open.

    You need to close Firefox to install many plugins, including those from Adobe.
    As for the Word downloads, see the changing downloads action section of this link - https://support.mozilla.com/kb/Managing+file+types

  • Call SXPG _ CALL _ SYSTEM from ABAP program

    Hi,
    Someone may help me?  I need to call the function module SXPG _ CALL _ SYSTEM from ABAP program for to encrypt a file.
    I created the command by SM49 , but I don't know how I can call it from ABAP program.
    Thanks
    Maria C

    Hi Maria.
    This is a possible code you can use:
    DATA: log LIKE TABLE OF btcxpm WITH HEADER LINE.
    Can contain STDOUT, STDERR
    commandname =
    CALL FUNCTION ‘SXPG_CALL_SYSTEM’
    IMPORTING
      COMMANDNAME = commandname
      PARAMETERS = parameters
    EXPORTING
    STATUS = status
      TABLES
      EXEC_PROTOCOL = log
    EXCEPTIONS
      NO_PERMISSION = 1
      COMMAND_NOT_FOUND = 2
      PARAMETERS_TOO_LONG = 3
      SECURITY_RISK = 4
      WRONG_CHECK_CALL_INTERFACE = 5
      PROGRAM_START_ERROR = 6
      PROGRAM_TERMINATION_ERROR = 7
      X_ERROR = 8
      PARAMETER_EXPECTED = 9
      TOO_MANY_PARAMETERS = 10
      ILLEGAL_COMMAND = 11
      OTHERS = 12.
    The following are the comments of the parameters taken from:
    http://help.sap.com/saphelp_40b/helpdata/en/fa/0971ee543b11d1898e0000e8322d00/content.htm
    Parameters
    IMPORTING Parameters
    Parameter name
    Use
    COMMANDNAME
    The name of the definition of the external command, as specified in the maintenance function (transaction SM69).
    PARAMETERS
    Arguments for the external command as specified by the definition in the R/3 System and by the calling program or user.
    These arguments are checked for impermissible characters, such as the ; under UNIX. Problems are registered with the SECURITY_RISK exception.
    EXPORTING Parameters
    Parameter name
    Use
    STATUS
    Returns the final status of the execution of the external command:
    · Value ‘O’: The external command was started and ran to end successfully.
    · Value ‘E’: An error occurred; the external command was not run successfully.
    Tables Parameters
    Parameter name
    Use
    EXEC_PROTOCOL
    Contains the STDOUT and STDERR output of the external command and any output from the target host system.
    Exceptions
    Exception name
    Meaning
    X_ERROR
    Reserved for future use.
    NO_PERMISSION
    The AUTHORITY-CHECK of the user’s authorization for the authorization object S_LOG_COM failed. The user is not authorized to carry out the command named with the specified arguments on the target system.
    COMMAND_NOT_FOUND
    Command name, as identified by COMMANDNAME and OPERATINGSYSTEM, has not been defined in the maintenance function (transaction SM69).
    PARAMETERS_TOO_LONG
    The combined argument string (ADDITIONAL_PARAMETERS and the DEFINED_PARAMETERS, as returned in ALL_PARAMETERS) exceeds the limit of 128 characters in length.
    SECURITY_RISK
    Either:
    · The command contains impermissible characters. These are characters with potentially dangerous properties, such as ; under UNIX.
    · The command definition specifies that an extra-check function module be run. This function module has rejected execution of the command.
    WRONG_CHECK_CALL_
    INTERFACE
    The command definition specifies that an extra-check function module is to be run. Either this function module is missing, or the interface defined for this function module does not match that of the standard R/3 function module SXPG_DUMMY_COMMAND_CHECK. For more information, please see SXPG_DUMMY_COMMAND_CHECK: Interface for Extra-Check Function Modules.
    TOO_MANY_PARAMETERS
    The command definition specifies that user-specified arguments for the external command are not allowed. However, an additional string of command arguments was specified.
    PARAMETER_EXPECTED
    The command definition includes the placeholder character ?, which signifies that additional user-defined arguments are required. However, no additional arguments string was supplied.
    PROGRAM_START_ERROR
    An error occurred while starting the external command. The R/3 system field SY-MSGV1 contains additional information on the problem.
    PROGRAM_TERMINATION_
    ERROR
    An error occurred while trying to obtain the return code of the external program. The R/3 system field SY-MSGV1 contains additional information on the problem.
    ILLEGAL_COMMAND
    The external command definition was modified "illegally". That is, the command was not modified by means of the maintenance function (transaction SM69).
    The modified command is registered in the system log in its substituted form. The message is registered under the system log ID "LC".
    OTHERS
    Catch any new exceptions added to this function module.
    Hope this will be useful.
    Sandro Lombardo

  • Call workflow from ABAP program

    created a zbusiness object (ZPRODH)with
    one key field product hierarchy,
    one attribute level number and
    one method display.
    I tested that zobject and using this object created workflow to display product hierarchy ,it is displaying it. now I have to call it from one abap program.
    In the abap program I am calling the funcion module, I
    CALL FUNCTION 'SWW_WI_START_SIMPLE'
    EXPORTING
    TASK = TASK
    IMPORTING
    WI_ID = WI_ID
    TABLES
    AGENTS = AGENTS
    WI_CONTAINER = WI_CONTAINER.
    It is calling the workflow and subrc is 0, but not passing the value to the workflow. Because of that the method is not working, any idea?
    Thanks in advance

    ttpa,
    Please check this thread:
    Re: Workflow from abap program
    Also check that your Fm do requires any explicit commit or not?
    Hope it will help u
    Cheers
    Jai

  • Call to Java web service from abap program

    HI,
    I want to call to Java WS from abap program and i read some post how to do that in release of NW 6.4 but I want to know what is the simplest way to do that in release 7.0 .
    Many Thanks,
    Nina

    Hi Uwe,
    Thank you.
    I have WSDL or URL how i can call to them ,in the example that you send i don't find the place that it called.
    Do i have to create proxy for that ?
    BR
    Nina

  • Execute webdynpro from abap program and return to the caller program

    Guys,
    I have a question here.
    I know there is a way to call an abap webdynpro application from normal abap program by either using a class method, or use a function module WDY_EXECUTE_IN_PLACE by providing
    the webdynpro application or using CALL TRANSACTION statement.
    But, is there anyways that we can call the webdynpro application from abap program by supplying data to the webdynpro and display to the user from the portal, and then
    once the user do some manipulation on the data, can we transfer back the data to the caller abap program?

    hey ,
    you can pack any web-dynpro program in tranasaction code and run it from R/3 and not via portal  :
    search in " SAPTECHNICAL" how to do so  - for some reason i cant post a link here
    than you can use call transaction .
    regards
    ASA

  • How to read a word in a abap program for syntax check

    program for finding keywords:
    into a given program name in selection screen.
    e.g Parameters Keyword in YXABC propgram.
    How to find a word in a abap program for syntax check

    Hi!
    Read table TNAPR for the program names.
    Then use the READ REPORT  statement for it and load the program into an internal table.
    Then loop at the table.
    Regards
    Tamá

  • Procedure to Call Workflow Object from ABAP program in Se38

    Hi All,
    I have one scenario like i have to call one Workflow object from ABAP program in SE38.The scenario is like below.....
    I have to select some records from database table.For example there are 100 records in the internal table.
    For all that records i have to invoke Workflow for getting approval from the authorized persons. Once Approval has come to program, It will post one document in SAP and process ends.
    Please suggest me how to move forward with this scenario.
    Regards
    Manas Ranjan Panda

    Hi,
    So you want to start a workflow from an ABAP, if an event exists for that particular workflow then the best way is to use fm SAP_WAPI_CREATE_EVENT,
    to start a workflow from an ABAP you can use fm SAP_WAPI_START_WORKFLOW.
    Kind regards, Rob Dielemans

  • To post a mail from ABAP program

    dear friends
                  how to post a mail to SAP inbox of a particular user from ABAP program.

    get the spool no of the program
    we have standard program rstxpdf4  through that convert it to pdf
    and through f.m SO_NEW_DOCUMENT_ATT_SEND_API1 u can send mail.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
       EXPORTING
         DOCUMENT_DATA                    = x_document_data
         PUT_IN_OUTBOX                    = 'X'
         COMMIT_WORK                      = 'X'
       TABLES
         PACKING_LIST                     = it_packing_list
         CONTENTS_BIN                     = it_contents_bin
         CONTENTS_TXT                     = it_contents_txt
         RECEIVERS                        = it_receivers
      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.
       retcode = sy-subrc.
       perform protocol_update.
    else .

  • Sending an email to users from abap program

    Hi experts ,
    How to send an email to users from abap program ...
    i need full coding please..so that i can copy and paste it in my program.
    Thank you in advance.
    Rajasekhar.P

    Hi Venkat
    check the below simple code to convert spool to HTML and email it
    data: list type table of  abaplist with header line.
    data: htmllines type table of w3html with header line.
    data: maildata   like sodocchgi1.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    start-of-selection.
    Produce a list
      do 100 times.
        write:/ sy-index, at 30 sy-index, at 50 sy-index.
      enddo.
    Save the list
      call function 'SAVE_LIST'
           tables
                listobject         = list
           exceptions
                list_index_invalid = 1
                others             = 2.
    Convert the list
      call function 'WWW_LIST_TO_HTML'
           tables
                html = htmllines.
    Send mail
      maildata-obj_name = 'TEST'.
      maildata-obj_descr = 'Test Subject'.
      loop at htmllines.
        mailtxt = htmllines.
        append mailtxt.
      endloop.
      mailrec-receiver = '[email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = maildata
                document_type              = 'HTM'
                put_in_outbox              = 'X'
           tables
                object_header              = mailtxt
                object_content             = mailtxt
                receivers                  = mailrec
           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.

Maybe you are looking for

  • SUPERDRIVE reads ALL my DVD's EXCEPT ONE!!!:: My Windows 7 Home Premium. WHY IS THIS?????

    iMac reads all my DVD's except one my WINDOWS 7 HOME PREMIUM INSTALL DVD! The windows dvd works fine on a pc so I know it's not the DVD. Now I have seen people posting that their Superdrive doesn't work, or that it only reads cd's - I DONT HAVE THOSE

  • How do you create database in server administration

    I am newbie can an yone direct me to create a database in server administration or a table in cf. I meant  database with data.c ar extension

  • Setting Focus in JTable

    How can i set the focus to the first editable cell in a JTable?

  • 1st song of transferred CD cut off 4G 20GB

    When transferring a CD to I tunes, often the first song is cut off after only a few seconds. This doesn't happen every time but very often and it's frustrating. Does anyone else have this same problem and if so, could you offer any suggestions on how

  • Can't Open .png Fiies

    I have just upgraded to a new iMac and have transferred all my files, settings & applications from my old iMac. The old machine had MAC OS X 10.4.11 and the new machine has 10.5.5 Everything went perfectly except I can't now open .png files in Photos