Write javascript function in the mime repository

Hey all,
I Wrote a javascript functions inside the WAD html, and it works great.
Now I want to distribute this code to many WAD's.
I belive that the right way is to move the code to the mime repository and call it from the WAD's.
How can I Call a function in a file.js file that exists in the se80?
Thanks in advanced
Hagai

Try thowing this line in your <head> tag:
    <script language="JavaScript" src="/sap/bw/Mime/Customer/JavaScript/myJSFile.js">
      <!-- { } -->
    </script>
When you refer to your javascript, just use
<script type="text/javascript">
//Javascript here
</script>
There are also caching issues when using javascript.  After you make a change to your file, use TCODE smicm.  In TCODE SMICM, from the file menu... Goto->HTTP Server Cache->Invalidate->Global in System.  This will invalidate the cache so you can see your new changes.
Cheers,
-Brendon
Message was edited by: Brendon Lipchen
Message was edited by: Brendon Lipchen

Similar Messages

  • Where is the MiMe Repository ?

    Hi guys,
      I need to import some CSS Stylesheets into SAP BW
      Where can I find the MIME Repository in BW ?
      I don`t have it under my SAP Menu SAP -> BW - BEx ?

    A component called Web Analyzer doesn't exist.
    Maybe you want to create your query directly on the web (not just a template).
    In this case there in the Ad-hoc Query Designer, it's very similar to the Query Designer in tha Analyzer.
    From the Web Application Designer, crating a new template, in the list of the items you can find the Ad.hoc Query designer, drag it in the work area, save and lounch the template. It will open a pop-up where you will choose the InfoProvider and then create your query as in the Analyzer.
    Hope I've been helpful.
    Greetings.
    Fabrizio

  • How to execute a javascript function in the body onload?

    Hi everyone!
    As you know in the HTML body attribute. You must specify the value of onload
    What is the correct sintaxis for execute a function since in the onload body?
    I only want to do some like this, but only I do it in APEX:
    <body onload ="javascript:namefunction();" >
    I do not know how to use #ONLOAD# when you using want to set some value.
    Could u help me please ?
    Any help would be very appreciated.
    Thank u in advance
    Best Regards

    Hi Chris
    Thank you for your help
    I tried with the next code but it doesn´t work.
    Do you know for what?
    Best Regards
    I paste the next code in the HTML Header :
    <head>
    <script language="JavaScript" type="text/javascript">
    function addLoadEvent(func){
    var oldonload = window.onload;
    if (typeof window.onload != 'function'){
    window.onload = func;
    else {
    window.onload = function() {
    oldonload();
    func();
    function ejecuta()
    doSubmit('ACEPTAR_R')
    addLoadEvent( ejecuta );
    </script>
    </head>

  • JavaScript functions across the forms?

    Hello,
    We are developing set of forms using LiveCycle Designer. The forms are complex and need some involved JavaScripts. I found great feature where we can insert a script object to hold common JavaScript functions and use those anywhere in the form. However, as I need to create some 35 such forms, I was wondering if there is any way of creating a library of JavaScript functions that I can use for all the forms. I.e. I do not want to create Javascript Object per form but want to find out if I can have one JavaScript object that I can reference from all the forms?
    Thanks in advance!

    Hi Niall,
    Feeling especially lazy today, I thought I'd try asking rather than testing this to find the answer. How does updating scripts in the library work? If I have multiple forms that use a script from the Fragment Library, when I tweak the script and save it, does the tweak change the script in all the forms? If so, does this happen upon reopenning each form in Designer? (i.e. each form still has to be reopened in Designer for the tweak to happen, right?). I feel like an idiot asking, but I'm long in lazyness this miserable, damp, dreary morning in Wisconsin. Even my little dog's energy has waned today.
    Cheers,
    Stephen

  • Can we have javascript function in the HTML header of Page 0

    Hello,
    I want to have a javascript function implemented on page zero, Can anyone help me out with this issue.
    Thanks,
    Orton

    There is no HTML Header on Page Zero. The equivalent would be to use the page template.
    It's also possible to place JavaScript in HTML regions on Page Zero, but I wouldn't consider this a good practice. JavaScript is better kept in external files and referenced using the SRC attribute.

  • How to call javaScript function in the form from Action:Tab buttion in workspace

    Hi,
    I want to trigger JavaScript function that I have written in form from Action: buttons in workspace user's account.
    Is there any way that if i hit a button on action bar, it fire a javascript function.
    Reason is: I dont want to place button on the form to perform any action on the form. I want to take control of the form from these buttons. Like submit, edit a form, etc, etc..
    Please let me know if i couldnt explain it properly.
    regards
    Sunil

    Sunil, you want to look at the "Customizing the LiveCycle® Workspace ES User Interface" document at http://help.adobe.com/en_US/livecycle/9.0/customizeworkspaceui.pdf.  The workspace is a Flash component.  For ES4 there's an option to run the workspace in HTML5 which might be more productive long-term.

  • Tooltips for icons in the MIME repository

    Dear community,
    when using the "old icons", i.e. those starting with 'ICON_', (which - I know - I shouldn't do), each icon comes with some sort of automatical tooltip. Whereever I use the icon, the tooltip is also there.
    My questions:
    - Is there a way to attach (translatable) tooltips to my own icons that I upload into the MIME folder of a webdynpro component?
    - Is there a better place to put my icons to (where I could attach a tooltip)?
    - And finally: Is there a way to change the tooltip of an icon?
    Any hint is greatly appreciated.
    Best regards,
    Christoph

    Hi Lekha,
    oh, that is a misunderstanding! I certainly know about the tooltip-property for images.
    My question refers to this "automatic" tooltip functionality that occurs whenever you use one of the ICON_* icons.
    Consider the following example:
    I have a table with a column containing always exactly on of several icons. To realize this I use the Image cell editor and bind the source property to a context attribute that contains the icon source.
    Similarly, I could also bind the tooltip property of the cell editor to a context attribute that contains the tooltip text. The down side of this is that I have to introduce (and maintain) an additional context attribute, although the tooltip for one specific icon is always the same. This especially hurts if you have many tables with icons and extensive context mappings.
    In contrast, if you just refer to an ICON_* icon, you ALWAYS get a tooltip automatically, e.g. ICON_DUMMY gives you the tooltip "placeholder icon".
    Any hints here?
    Best regards,
    Christoph

  • Calling of javascript function in the method

    Hi ,
      Is it possible to trigger a javascript method after the table rendering is done. I do not want the javascript method to trigger not only on the page loading, but also when only table rendering is done.
    Thanks,
    Appu

    Hi ,
      Is it possible to trigger a javascript method after the table rendering is done. I do not want the javascript method to trigger not only on the page loading, but also when only table rendering is done.
    Thanks,
    Appu

  • Display logo from mime repository in the html email

    Hi Experts,
    I have created a report which will generate an email using SO_NEW_DOCUMENT_ATT_SEND_API1 in html format. Everything works fine except for the logo which I have saved in the  MIME repository.
    I am calling these two functions to get the mime object in URL
    'WWW_GET_MIME_OBJECT'
    'DP_CREATE_URL'
    From the second function I am getting the link of the logo in the variable gv_url .
    And I am writing the code to include that URL in the html email body
    However when the email is received, in place of picture it is just showing a box with an 'x' mark in it.
    Please help me with this, thanks
    Thanks
    Ajith
    Edited by: ajithfin_c on Jan 23, 2012 6:06 AM
    Edited by: ajithfin_c on Jan 23, 2012 6:08 AM

    Check out the help.sap.com for this. you get ->
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/3c/a670692dbc494fb5416fdaa93ee1a9/content.htm">Insert graphics</a>
    - anto

  • Is possible leave  a object type (MIME Repository) of the transport system?

    Hi,
    We'd like use the MIME Repository for storing pictures of our SAP CCM Catalog.
    When we import a new MIME object a order is created. It is possible to avoid this. I mean I'd like to know if we can do this.
    - In a prductive system (closed)
    - Configure an object type to leave the transport system
    Any idea about this?
    Thanks for your attention
    Regards
    Jorge

    Hi
    Your program works fine you need only to write all DEFINITION and then all IMPLEMENTATION:
    *       CLASS one DEFINITION
    CLASS ONE DEFINITION.
      PUBLIC SECTION.
        METHODS: ADDIT IMPORTING ADD_NUM1 TYPE ANY
                                 ADD_NUM2 TYPE ANY
                       EXPORTING ADD_SUM TYPE ANY.
    ENDCLASS.
    *       CLASS two DEFINITION
    CLASS TWO DEFINITION INHERITING FROM ONE.
      PUBLIC SECTION.
        METHODS: OUT IMPORTING OUT_NUM1 TYPE ANY
                               OUT_NUM2 TYPE ANY
                               OUT_SUM TYPE ANY.
    ENDCLASS.
    *       CLASS one IMPLEMENTATION
    CLASS ONE IMPLEMENTATION.
      METHOD ADDIT.
        ADD_SUM = ADD_NUM1 + ADD_NUM2.
      ENDMETHOD.
    ENDCLASS.
    *       CLASS two IMPLEMENTATION
    CLASS TWO IMPLEMENTATION.
      METHOD OUT.
        WRITE: / 'Sum of', OUT_NUM1, 'and', OUT_NUM2, 'is', OUT_SUM.
      ENDMETHOD.
    ENDCLASS.
    DATA O_ONE TYPE REF TO ONE.
    DATA O_TWO TYPE REF TO TWO.
    DATA: NUM1 TYPE I,
          NUM2 TYPE I,
          SUM  TYPE I.
    START-OF-SELECTION.
      CREATE OBJECT: O_ONE, O_TWO.
      NUM1 = 2. NUM2 = 4.
    *when is called is used EXPORTING
      CALL METHOD O_ONE->ADDIT
        EXPORTING
            ADD_NUM1 = NUM1
            ADD_NUM2 = NUM2
         IMPORTING
            ADD_SUM = SUM.
    *PERFORM addit USING num1 num2 CHANGING sum.
      CALL METHOD O_TWO->OUT
        EXPORTING
           OUT_NUM1 = NUM1
           OUT_NUM2 = NUM2
           OUT_SUM = SUM.
      NUM1 = 7. NUM2 = 11.
      CALL METHOD O_ONE->ADDIT
         EXPORTING
           ADD_NUM1 = NUM1
           ADD_NUM2 = NUM2
      IMPORTING
           ADD_SUM = SUM.
    *PERFORM addit USING num1 num2 CHANGING sum.
      CALL METHOD O_TWO->OUT
        EXPORTING
          OUT_NUM1 = NUM1
          OUT_NUM2 = NUM2
          OUT_SUM  = SUM.
    Max

  • Is it possible to embed JavaScript functions into a Flash file (AS 3.0) and call within flash itself, without using the external .js file

    Scenario:
    I have a text area in flash. The user will copy paste any JavaScript  function in the text area and click execute button. The JavaScript function pasted in the text area should be executed with in the flash itself and the return value will be shown in another text field.

    yes,
    function testF(s:String):XML{
        var js:XML = <script>
        <![CDATA[
        ]]>
        </script>
        js.appendChild(XML(s));
        return js;
    ExternalInterface.call(testF(your_tf.text));

  • Regarding displaying the photo in wd abap from mime repository

    Hi All,
      I have to display the photos which are availaible in the mime repository.If any one knows about it then please tell me in detail i.e. step by step.
    Thank you all in advance.

    Create an Image element on you view and then go to the source property click on that and the n select the image from MIME.now the Image will be available on the view.
    Thanks
    Suman

  • JavaScript function which fetches return_value from List of Values

    Hi,
    I have created List of Values named "NICKS". I want to write JavaScript function "get_workers_fullname(nick)" which returns display_value from List of Values. The parameter of function is return_value of List "NICKS".
    I am new with this and don't know how to handle this case.
    Please help me.

    Hi,
    The LOV, I mean is the item in Application's Shared Components. I don't mean the visible SelectList on the page.
    This is what I found in ApEx's help: "A List of Values can be referenced by page items as well as report fields. It controls the values displayed and limits the user's selection. Lists of Values can be static (based on values you enter) or dynamic (based on a SQL query)."
    I'd like to access values in such LOV from JavaScript. I am not sure it is possible.
    Cheers,
    Tom.

  • Download Word .doc file saved in MIME Repository to local PC

    I need to store a static Word document on the SAP server and download to the user's browser via a BSP application.  I have found code in the IT00 BSP Application to download the Word doc in xstring form to the browser, which will work for what I'm doing.  What I cannot seem to find, however, is how to retrieve the  Word .doc file stored in the MIME repository and then subsequently how to convert this MIME object to an xstring value.  Is there a class or function module available to retrieve and convert the MIME object to an xstring form so that it can be returned as a response back to the browser?

    you can use the following code snippet to read mime repository content.
    data: o_mr_api type ref to if_mr_api.
    if o_mr_api is initial.
    o_mr_api = cl_mime_repository_api=>if_mr_api~get_api( ).
    endif.
    call method o_mr_api->get
    exporting
    i_url = l_url
    importing
    e_is_folder = is_folder
    e_content = l_current
    e_loio = l_loio
    exceptions
    parameter_missing = 1
    error_occured = 2
    not_found = 3
    permission_failure = 4
    others = 5.
    l_current will hold the image in a XSTRING var
    Regards
    Raja

  • How to read a MIME Repository Object in ABAP ?

    Hi all,
    How can I read a MIME Repository Object in ABAP code ?
    Thanks.

    Hi,
    check the package SMIMES, there you can find classes and function modules to acess the mime repository.
    Regards,
    CW

Maybe you are looking for

  • Split CLOB column to improve performance

    Hi All, We have a transactional table which has 3 columns and one among those is CLOB which holds XML data.Inserts are coming at 35K/hr to this table and data will be deleted as soon as job is completed. So anytime the total records in this table wil

  • Report to see order status

    hello All, Is there any report or settings to see all orders and their status in CRM.We are using CRM 2007. Thanks and Regards shanto aloor

  • Acrobat Pro doesn't recognize CS4 Creative Suite serial #

    I've installed the CS4 creative suite and now acrobat doesn't recognize the serial #. All other apps are fine and working properly. Also running 10.4.11 OS. Any suggestions would be great, so thanks in advance. Tim

  • Profile not generated

    Hi all, In transaction PFCG,I have copied a SAP standard role (SAP_BC_USR_CUA_SETUP_CLIENT) to Z_SAP_BC_USR_CUA_SETUP_CLIENT. But in the authorization tab, when I am trying to generate the profiles..it says profiles not generated and it also created

  • Problem in triggerring EDI idoc for Purchase order..

    Hi experts, I am trying to create an outbound EDI IDOC for a PO. I have configured the partner profile in partner type LI with message type ORDERS in outbound parameters. I have created a new output type ZEDI for EDI, and entered in a message control