Problem in Office Control

Hi all,
        I am trying to work with office control. I had created a value node called "DocumentSourceNode".
created a supply function with the name fillNode.. Under fillNode i wrote the following code.
ISimpleTypeModifiable mod = node.getNodeInfo().getAttribute("DocumentContent").getModifiableSimpleType();
ModifiableBinaryType bin = (ModifiableBinaryType)mod;
bin.setMimeType(new WebResourceType("doc", "application/msword", false));
IPrivateOfficeView.IDocumentSourceNodeElement element = wdContext.nodeDocumentSourceNode().createDocumentSourceNodeElement();
node.addElement(element);
String filename = "";
     try
                filename = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "example.doc");
                byte[] bytes = getBytesFromFile(new File(filename));
                element.setDocumentContent(bytes);
     catch (WDAliasResolvingException e)
                throw new WDRuntimeException("No datasource available: " + filename);
     catch (IOException e) {
            //handle exception
when i am executing, i am getting this exception....
catch (WDAliasResolvingException e)
                throw new WDRuntimeException("No datasource available: " + filename);
I had stored a msword document say example under mime/applications/com.sap..../example... am i stored the document in a right area? Please help me....

Hi  aarthi,
             Thanks for ur suggestion. Since i got error in my catch block i added this lines in the catch block
catch (WDURLException e)
                throw new WDRuntimeException("No datasource available: " + filename);
So i m getting this error,
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: No datasource available

Similar Messages

  • Problems in Office control

    Hello Everyone,
       I am stuck with a problem using office control.
    The requirement is to display the excel file contents present in the application server to the office control.
    The problem is with reading the contents of the excel file.
    here is the method i used:
      data:
        mime_repository type ref to if_mr_api,
        content type xstring,
        url type string value '/MIG/D/TEST/TEST.xls'.
      mime_repository = cl_mime_repository_api=>get_api( ).
      call method mime_repository->get
        exporting
          i_url = url
        importing
          e_content = content.
    * DATA is binded to the office control contents
      wd_context->set_attribute( name = 'DATA' value = content ).
    The GET method returns a sy-subrc = 3, which means file not found.
    whereas the same code works for another application server with its path.
    Where am i going wrong?  or is there any alternative method to get the content from the file?
    Regards,
    Kinshuk
    Message was edited by:
            Kinshuk Saxena

    Hi Kinshuk,
    I think you should place your file in the exact folder where WDA can recognize, I mean try placing it @ the folder...
    "/SAP/BC/WebDynpro/SAP/PUblic/BC/ssr/uuielibs/office_integration".
    Regards
    Raja Sekhar

  • Webdynpro Abap Office control problem

    Hi Gurus,
    I'am using the office control to display stored word document and I'm facing the following problem :
    when I visualize a word document from my webdynpropage, I got access to the toolbar menu(print save and all the tools displayed on the top of the control) but once I open another page to visualize another word document I loose the access to the toolbar menu in my first page, but I can do so in my second opened page.
    It seems that I can not use the office control toolbar in multipple document. and once I open a page this feature is disabled on the previews pages.
    any idea please?
    Regards,
    Simo

    Hi
    Try to use thid below code I think it will solve your problem.
    Code for File download in action method
      DATA lr_conv   TYPE REF TO cl_abap_conv_out_ce.
      DATA lv_data   TYPE        string.
      DATA lv_xfile  TYPE        xstring.
      lv_data = 'Example text, which will be opened in MS Word.'.
      cl_abap_conv_out_ce=>create( RECEIVING conv = lr_conv ).
      lr_conv->convert( EXPORTING data   = lv_data
                        IMPORTING buffer = lv_xfile ).
      cl_wd_runtime_services=>attach_file_to_response(
                         EXPORTING i_filename  = 'wd4a.doc'
                                   i_content   = lv_xfile
                                   i_mime_type = u2018applicaton/mswordu2019)
    Thanks & Regards,
    Ravi Kiran.

  • Import Data from Office Control (Web Dynpro for ABAP) into internal-Table

    Hello,
    I have a question concerning the Office Control UI-Eelement in Web Dynpro for ABAP:
    How can I import spreadsheet data from the Office Control into  a internal-table?
    I have an Excel-sheet (without any data) which is shown initially in the Office Control. First the empty Excel-Sheet will be loaded and in the second step data from an alvxml-transformation will be loaded into the Excel-sheet with the method 'activatexmlsource'. This works so far. When I change the loaded data in the Office Control and save it it will be stored as XLS-File. The problem is that I'm not able to use existing Upload-FM because every function module I tried uses GUI-functions and WebDynpro has no GUI-functionality. I always get the error that data from clipboard cannot be imported.
    So now the question is:
    How can I import changed data from the Office control into a internal-table staying in Web Dynpro application?
    Please give some advice, if you have some useful code or ideas.
    Thanks
    ram
    Edited by: Ramakullay Challa on Sep 24, 2009 9:05 AM
    Edited by: Ramakullay Challa on Sep 24, 2009 9:07 AM

    Hi,
    Once you save to desktop again you have made some changes to that file, this file you want to upload it right.
    Then in that case you need to use the FILEUPLOAD UI element right.
    Regards,
    Lekha.

  • Problems with remote control and user accounts - error 1759?

    We're running:
    -XP Pro SP2 clients with Zen SP1 IR3a agent, 4.91 SP2 Netware client.
    -We are NOT running Middle Tier.
    -Novell servers are running Netware 6.5 SP7, E-directory 8.7.3.10b or 8.8.
    -Zen server is also SP1 IR3a.
    We have no problem using remote control on workstation objects. We are having intermittent issues with remote controlling user objects. When the issue occurs, we receive the following error, "Error 1759: The selected user is not logged in on any workstations" even though the user is in fact logged in. After some more research, it appears that the "networkAddress" attribute of the user object is blank so we feel that this is the root cause. My question is what would cause the networkAddress attribute to randomly not update? For instance we had a user (verified his login) who we could not remote via the user object (workstation object worked). We checked his networkAddress attribute and found that it was empty. User rebooted and logged in again and his networkAddress attribute populated, and then we could remote control him via the user object. Now this isn't always the case after a reboot. There doesn't appear to be any pattern to when the networkAddress attribute does or does not update. In fact, this particular user has a laptop so he boots it up fresh every morning yet he was not showing a network address when he logged in initially today.
    We've followed the troubleshooting steps in Novell Documentation without any success. Is there anything else that we might be missing, especially with respect to getting the networkAddress attribute to update? We ran a DSreport on that attribute and found about 500 out of a total of 1500 users had no networkAddress. Some of those are sure to be legitimate but that number is much too high for the number of people that should be in the office.
    I've read some older threads on the subject but none of them really provide a firm solution. Also most of the older threads reference Middle Tier which we are not using.
    Thanks in advance.

    > 4.91 SP2 Netware client.
    You could try this TID:
    "A user will no longer have an entry in their "Network Address" attribute
    even though they are logged into the eDirectory Tree."
    http://www.novell.com/support/viewCo...1262&sliceId=1
    "Resolution"
    "This was fixed in the 4.91 SP3 client. NWFS.SYS was modified so that it
    will check the monitor connection on a reconnect and if it is not connected
    close the connection and try and get a new monitor connection to the tree.
    Prior to the 4.91 SP3 client, the solution is to have the user login again
    so that it issues the NDS Finish Login request again that will populate
    Network Address again."
    Regards
    Rolf Lidvall
    Swedish Radio (Ltd)

  • Import Data from Office Control (Web Dynpro for ABAP) into SAP-Table

    Hello,
    I have a question concerning the Office Control UI-Eelement in Web Dynpro for ABAP:
    How can I import spreadsheet data from the Office Control in a SAP-table?
    I have an Excel-sheet (without any data) which is shown initially in the Office Control. First the empty Excel-Sheet will be loaded and in the second step data from an alvxml-transformation will be loaded into the Excel-sheet with the method 'activatexmlsource'. This works so far. When I change the loaded data in the Office Control and save it it will be stored as XLS-File. The problem is that I'm not able to use existing Upload-FM because every function module I tried uses GUI-functions and WebDynpro has no GUI-functionality. I always get the error that data from clipboard cannot be imported.
    So now the question is:
    How can I import changed data from the Office control into a SAP-table staying in Web Dynpro application?
    Please give some advice, if you have some useful code or ideas.
    Thanks in advance,
    Philipp
    Edited by: Philipp Hiebler on Feb 11, 2008 10:15 AM

    Hi,
    Once you save to desktop again you have made some changes to that file, this file you want to upload it right.
    Then in that case you need to use the FILEUPLOAD UI element right.
    Regards,
    Lekha.

  • Office control in mobile client 7.1

    Hi all,
    i've included an office control in my mobile application to show a word document. However, when i open my application, i receive following error:
    Fatal HTTP error 500 occured. Connection is closed now.
    The exact error information is logged in
    "C:\Program Files\SAP\SAP Netweaver Mobile
    Client\HTTPError.txt"
    This is the HTTPError.txt file content:
    sessionUrl="//localhost:50080/dispatcher/demo.sap.com~attachorderapp/OrderAttachApp?sessionid=8117667533895423314&sap-wd-cltwndid=6DBFF94EF011DAA000000120E82345C3&sap-wd-appwndid=624B23E69166B08700000120E82345C3&sap-wd-locale=null" xmlns:SAP="SAP"...Localization dateFormat="MM/dd/yyyy" decimalSeparator="." groupingSeparator="," locale="en_BE"/...Client name="SAP-NW-Java" version="7.00" supportBits="6A...Server version="Unknown Version" os="Windows Vista" supportBits="537205"...Exception text="An error has occurred: Failed to process the request. [] " callStack="com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Invalid URL=
    at com.sap.tc.mobile.mwd.runtime.sal.url.URLGenerator.checkURL(URLGenerator.java:340)
    at com.sap.tc.webdynpro.clientserver.uielib.activecomp.impl.AbstractActiveComponent.getArchive(AbstractActiveComponent.java:896)
         at com.sap.tc.webdynpro.clientimpl.scxml.renderer.uielib.activecomp.AbstractActiveComponentRenderer.renderProperties(AbstractActiveComponentRenderer.java:91)
         at com.sap.tc.webdynpro.clientimpl.scxml.renderer.uielib.officecomp.OfficeControlRenderer.renderProperties(OfficeControlRenderer.java:106)
         at com.sap.tc.webdynpro.clientimpl.scxml.renderer.uielib.core.ViewElementRenderer.render(ViewElementRenderer.java:39)
    Do i have to perform certain installations to let the office control work in my mobile client?
    thanks
    Edited by: Peter Vanneste on Apr 27, 2009 5:15 PM
    Edited by: Peter Vanneste on Apr 27, 2009 5:19 PM
    Edited by: Peter Vanneste on Apr 27, 2009 5:23 PM
    Edited by: Peter Vanneste on Apr 27, 2009 5:25 PM

    Hi,
    If you are using the mobile applications for laptops, I am not sure if the JavaGui supports the office control as yet.
    It would be better if you raise an OSS.
    I had tried it a year back I got a UI rendrer problem.
    Thanks and Regards,
    Narayani

  • Problem with custom control and focus

    I've a problem with the focus in a custom control that contains a TextField and some custom nodes.
    If i create a form with some of these custom controls i'm not able to navigate through these fields by using the TAB key.
    I've implemented a KeyEvent listener on the custom control and was able to grab the focus and forward it to the embedded TextField by calling requestFocus() on the TextField but the problem is that the TextField won't get rid of the focus anymore. Means if i press TAB the first embedded TextField will get the focus, after pressing TAB again the embedded TextField in the next custom control will get the focus AND the former focused TextField still got the focus!?
    So i'm not able to remove the focus from an embeded TextField.
    Any idea how to do this ?

    Here you go, it contains the control, skin and behavior of the custom control, the css file and a test file that shows the problem...
    control:
    import javafx.scene.control.Control;
    import javafx.scene.control.TextField;
    public class TestInput extends Control {
        private static final String DEFAULT_STYLE_CLASS = "test-input";
        private TextField           textField;
        private int                 id;
        public TestInput(final int ID) {
            super();
            id = ID;
            textField = new TextField();
            init();
        private void init() {
            getStyleClass().add(DEFAULT_STYLE_CLASS);
        public TextField getTextField() {
            return textField;
        @Override protected String getUserAgentStylesheet() {
                return getClass().getResource("testinput.css").toExternalForm();
        @Override public String toString() {
            return "TestInput" + id + ": " + super.toString();
    }skin:
    import com.sun.javafx.scene.control.skin.SkinBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.control.TextField;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputSkin extends SkinBase<TestInput, TestInputBehavior> {
        private TestInput control;
        private TextField textField;
        private boolean   initialized;
        public TestInputSkin(final TestInput CONTROL) {
            super(CONTROL, new TestInputBehavior(CONTROL));
            control     = CONTROL;
            textField   = control.getTextField();
            initialized = false;
            init();
        private void init() {
            initialized = true;
            paint();
        public final void paint() {
            if (!initialized) {
                init();
            getChildren().clear();
            getChildren().addAll(textField);
        @Override public final TestInput getSkinnable() {
            return control;
        @Override public final void dispose() {
            control = null;
    }behavior:
    import com.sun.javafx.scene.control.behavior.BehaviorBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputBehavior extends BehaviorBase<TestInput> {
        private TestInput control;
        public TestInputBehavior(final TestInput CONTROL) {
            super(CONTROL);
            control = CONTROL;
            control.getTextField().addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
                @Override public void handle(final KeyEvent EVENT) {
                    if (KeyEvent.KEY_PRESSED.equals(EVENT.getEventType())) {
                        keyPressed(EVENT);
            control.focusedProperty().addListener(new ChangeListener<Boolean>() {
                @Override public void changed(ObservableValue<? extends Boolean> ov, Boolean wasFocused, Boolean isFocused) {
                    if (isFocused) { isFocused(); } else { lostFocus(); }
        public void isFocused() {
            System.out.println(control.toString() + " got focus");
            control.getTextField().requestFocus();
        public void lostFocus() {
            System.out.println(control.toString() + " lost focus");
        public void keyPressed(KeyEvent EVENT) {
            if (KeyCode.TAB.equals(EVENT.getCode())) {
                control.getScene().getFocusOwner().requestFocus();
    }the css file:
    .test-input {
        -fx-skin: "TestInputSkin";
    }and finally the test app:
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class Test extends Application {
        TestInput input1;
        TestInput input2;
        TestInput input3;
        TextField input4;
        TextField input5;
        TextField input6;
        Scene     scene;
        @Override public void start(final Stage STAGE) {
            setupStage(STAGE, setupScene());
        private Scene setupScene() {
            input1 = new TestInput(1);
            input2 = new TestInput(2);
            input3 = new TestInput(3);
            input4 = new TextField();
            input5 = new TextField();
            input6 = new TextField();
            GridPane pane = new GridPane();
            pane.add(input1, 1, 1);
            pane.add(input2, 1, 2);
            pane.add(input3, 1, 3);
            pane.add(input4, 2, 1);
            pane.add(input5, 2, 2);
            pane.add(input6, 2, 3);
            scene = new Scene(pane);
            return scene;
        private void setupStage(final Stage STAGE, final Scene SCENE) {
            STAGE.setTitle("Test");
            STAGE.setScene(SCENE);
            STAGE.show();
        public static void main(String[] args) {
            launch(args);
    The test app shows three custom controls on the left column and three standard textfields on the right column. If you press TAB you will see what i mean...

  • MS office control in WD ABAP

    Hi,
    I want to display the excel with data in webdynpro.
    I have data in XSTRING format in node, that i binded to the datasource of MS Excel UI element, I can able to download the xstring to desktop in excel format. but the same xstring i cant able to display in WD UI.
    Only excel with blank values are displayed, I checked service pack of SAP, IE Active X control all are fine.
    Please help me how to display data in MS office control Excel in WD UI.
    Regards
    Virkly

    Hello,
    Please refer to the following sample:* Excel File Upload And Display Data Using Web DynPro ABAP*
    Link: [http://wiki.sdn.sap.com/wiki/display/WDABAP/ExcelFileUploadAndDisplayDataUsingWebDynPro+ABAP]
    Have a look at the source code given in 14 which converts xstring to string.
    Hope this helps!
    Regards,
    Srilatha

  • VGA output problem and catalyst control start up link

    I do not know whether the problems are linked or whether I have made things worse.  It started with an error message on start uo saying that there was a problem with Catalyst Control failing to start.  It still alowed me to run normally until, in front of an audience, the VGA o/p link to a projector did not work.  I had a spare cable which did not remedy the situation so my class sat around the laptop.
    Another symptom is that the HDMI output does not work.  I do not ko wif this is a separate issue.
    With the notion that this was linked I set about attemping to delete and reinstall AMD drivers and blindly assumed this was where I would get the Cat Control update.
    I used AMD's compatability checker and installed for display adapter  AMD M880G with ATI Mobility Radeon HD 4250.  The driver version is 8.770.2.1000 dated 19/09/2010 
    I cannot duplicate the display or use projector only however when I attach an external monitor the laptop changes resolution as if to accommodate the additional display.
    I either need help to verify the applicability of the changes that I have made or I need help to plan a way out of the mess that I have made.

    Hello @g_david,
    I have read your post on how the Catalyst Control Center program is not working very well on your computer, and that you are not able to view your display on your HDMI connected monitor. I would be happy to assist you in this matter!
    To ensure that your graphics drivers are working correctly, I recommend installing the original software and hardware drivers that first came with your notebook. This can be done by following this document on Using Recovery Manager to Restore Software and Drivers (Windows 7). Once installed, please follow this resource on Using HP Support Assistant (Windows 7) to update the drivers on your system.
    If you are able to successfully use the Catalyst Control Center again, the next step is to re-connect the monitor to your computer using an HDMI cable. To do this, please follow the steps in this document on Troubleshooting HDMI display and sound issues. 
    Please re-post with the results of your troubleshooting, and I look forward to your reply!
    Regards
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

  • Problem opening Office documents from KM

    Hello, I have some problem opening Office documents from KM.
    We stored a lot of office documents (Excel, Word ecc.) in a File System repository (the standard repository "/documents"), when I open one of these files, before to view the document, a little logon window appears, it asks portal user's credentials.
    If the user presses the "Cancel" button the logon window will be closed and the document showed, but on the next attempt to open an office file the system will asks again the user information .
    If the user gives the right information the documents will be showed and the logon window does not appear again..
    How con I avoid the logon request for each Office document in my repository?
    Any suggestion??
    Best Regards

    Thank you a lot Brad!!
    We use Office 2003 and the note 549610 solves our issue!!
    Best Regards.

  • Excel import export using Office Control

    Hi,
    We have the requirement to provide a feature like an excel uplaod and download in our UI (WD ABAP).Basically we have some WD table view and we need to collect all the data in each cell and then download the data in an excel file.Similarly we need to get the data in the Excel and fill the table view with this data from the excel.
    Is this possible through the Office Control?I checked out the examples in SIOS but my impression was that it more or less embeds office objects(excel,word etc) in Webdynpro container,but does not really get the data to be filled in an internal table.Also I am not sure whether I can download data from my WD table view to an excel file using this.
    Can anyone please tell me if there is some way to do this through an office control.If not what are the options available for me to achieve this functionality.
    Thanks and Regards
    Sourav

    Hi Sourav,
    If you use WDP ALV table, it has an 'Export' functionality which will export the contents of the table into an Excel.
    Regards,
    Wenonah

  • I have problems with office for mac  screen resolution, specially with excel

    I have problems with office for mac  screen resolution, specially with excel ?

    For starters, make sure to Check for Updates on any of the Help menus, and make sure the product has all the latest patches. MS did come out with a patch addressing the display issues on Retina Macs. Latest patchlevel is 14.3.2.
    We are talking about Office:Mac 2011, right?

  • Problem in placing controls and indicator on imported pictures

    hi.
    i have a problem in placing controls and indicator on imported pictures on labview front pannel.
    when i place a control or indicator on imported picture ..the control or indicator don't stay at the top of picture but go behind the picture...
    kindly tell me what to do to avoid this....as complete project has been made and now i have to place all controls and indicator of front pannel on to a picture.

    The Front Panel is built in layers. Each new control or decoration you add is placed in the top most layer.
    To change this, select the picture, click the "Reorder" button (that's the rightmost button in the row of buttons on the toolbar, the one with the 2 arrows forming a circle), and select Move to Back. Your picture will be moved to the background and your controls will be in front of it.
    Try to take over the world!

  • Hi all , problem in copy control from billing type f2 to debit and credit

    hi all,
    i have a problem in copy control from billing type f2 to debit and credit memos,
    could any body advise me the procedure for this issue ,
    thanks ,
    sre

    Hi sre,
    It is better to copy f2 to DR or Credit memo request
    for that you have to maintain copy requirement 21
                                               Billing doc.header 52                         
                                               Bill.bus.header data 103
                                               Bill.header partner  3
    and for item you maintain copy requirement 303
    from dr. or credit memo request you can able to do Document type  G2 and L2
    i think this may give some idea
    regards
    bvdv

Maybe you are looking for