Include Idoc Script in another

Hi,
Do we have a way to include (like a library) an .idoc script inside another idoc script ?
Thanks,
Sunil

Absolutely!
iDocScript contains a feature called include. For more details see http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c02_application.htm#CSIDO118

Similar Messages

  • Include one script in another

    Apologies if this is a stupid question , but I'm looking at having a library of javascript functions which will be available to other scripts. However I can't find an obvious way of including one javascript file in another.
    Has anyone else tried this?

    Hi there,
    another way to execute an external script is the Application.doScript method.
    Application.doScript(script:any, language: ScriptLanguage , withArguments:Array of any):any
    Executes the script in the specified language.
    script: Data Type: any
    The script to execute. Can accept: File or String.
    language: Data Type: ScriptLanguage , Default Value: UNKNOWN
    The language of the script to execute. If not specified, uses the language used to call this method. (Optional)
    withArguments: Data Type: Array of any
    An array of arguments to pass to the script. (Optional)
    Best wishes
    Andy

  • Calling one script from another

    InDesign has a nice mechanism for calling one script from another, so code can be made modular. What about FrameMaker ExtendScript? What methods are people using to call one script from another? Thanks for any suggestions.
    Rick Quatro

    Hi Trevor,
    Note that ExtendScript is Javascript plus FM objects and methods, so you need to stick to Javascript syntax rules. The right way to include another script source is as follows:
    #include "scriptname.jsx";
    If this works when running the main script from the ESTK, you know it finds the included script. When you then Export the script to Binary (from the File menu of the ESTK), the binary will include the embedded script as well. After this you have a jsxbin file, which you can drop into one of the two available startup folders to make it fire automatically when FM starts. Or you can move it anywhere else and run it via the File > Script > Run command. The main idea here is that when compiling a script into binary format, all include references are resolved and the script contains the complete code. If you run the jsx, the script is interpreted and requires a correct relative reference to any included script.
    I hope this clarifies things a little
    Ciao
    Jang

  • How to include one view into another view

    Hi SDN's,
                   Could any please tell me,How to include one view into another view.
    In my requirment.I want to create a 'Z' view for an interface .In that  view i have to take,
    1) Ship-to-email adrr by
                              LIKP-KUNNR -> KNA1-ADRNR
                              KNA1-ADRNR -> ADR6-ADDRESNUMBER.
    2) E-mail addr of person who created the document.i.e
        LIKP-ERNAM -> USR21-BNAME.
        USR21-ADDRESNUMBER ->  ADR6-ADDRESNUMBER 
        USR21-PERSNUMBER -> ADR6-PERSNUMBER.
       In both the case we have to pass ADDRESSNUMBER to ADR6 table.
    If we pass these condition it fails,B'Coz at a time it passes Two ADDRESSNUMBER and a PERSNUMBER.
    So i created two which fetches only the email addr of  person who created the document.and another view fetches Ship-to-email addr.
    Now i want to include the second view into first view . Is it possible?or please
    tell me someother way to get these email addresses in a single view.

    hi
    as per my knowledge, nested views are not possible. However, while creating a new view, selection method will not giv u option to select the already created view(S) except the tables..i think so.
    regards,
    shamim

  • How to Include JAVA script code in SAP BI7 web Reporting?

    How to Include JAVA script code in SAP BI7 web Reporting?

    In nw2004s there is a new web item called "Script" web item which lets you add javascript code. When you add javascript code in this web item, you don't need the opening and closing <script> tags...
    Hope it Helps
    Chetan
    @CP..

  • Idoc scripting in workflow tokens

    Greetings,
    A question for developers: up to what extent of Idoc Script calls can be made inside Workflow tokens? Only the function wfAddUser or other Idoc Script functions as well?
    I'm trying to develop a dynamic workflow component that involves reading possible user, alias or ad-hoc metadata values from a database table using a custom Idoc Script function, into a token. So basicly, something like this:
    <$wfAddUser(customIdocScriptFunctionToFetchUsers(dDocType),"user")$>
    Is anything like this possible at all? Tests done so far result in the content item entering and exiting the workflow automatically due to probably being unable to load the users, the strange thing is that no erros are being output, not even in the content server output with "workflow" or "idocscript" sections being traced...
    The point of this mechanism is to avoid having to create large ammounts of (hidden) metadata to serve as support to store users/alias to be loaded into workflow steps as tokens. Feel free to suggest any other alternatives tho :p
    Thanks in advance,
    - Tiago Vidigal

    Hey Tiago,
    Typically you try to limit your token script to just wfAddUser. It is possible to use basically any idoc script in a token but any failure at all will result in the behavior you are seeing with the item skipping straight through the step.
    Using your current design here is what I would do:
    -In the entry script for that step make your call via the custom script function
    -Store the result of the lookup into a workflow variable: <$wfSet("usersForStep", getCustomUsers(dDocType))$>
    -do your wfAddUser in the token: <$wfAddUser(wfGet("usersForStep"), "user")$>
    -Sidenote: You can add multiple users at once in one wfAddUser call if you pass a comma delimited string of the usernames
    Reason this works: the Entry script is always evaluated before a token when entering a step, meaning you can put any complex logic there where it is easier to debug and keep your token code clean.
    Hope that helps,
    Andy Weaver - Senior Software Consultant
    Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=L_Oracle_Consulting_amw >
    Edited by: Andy Weaver on May 18, 2009 10:55 AM
    (Fixed one of my code snippets)

  • IDOC script in custom element forms

    Hi,
    I am using Site Studio 10gr4.
    I was wondering if its possible to use IDOC script inside custom element forms. What I want to acheive is to display a combox box inside a custom element in a static list. The values inside the combobox are retreived from one of the views (created inside Configuration Manager in the content server).
    Your help will be appreciated.
    Many Thanks

    OK, I found the answer :).
    I checked in the custom element element form as an HTM. Chaning it to HCSP fixed the issue :).

  • Include python script inside an app

    Hi all, I'm writing an applescript app which should use a python script.
    how can I include the script inside the apple and have it called by the applescript?
    Thank you!

    Now, is there a way to let the user choose both the output file directory and the output file name (out.iso)?
    To get the filename, add this after the code to select the directory:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;">
    set outPutName to text returned of (display dialog "Now, please enter a filename:" default answer "out" with title "Enter Filename") & ".iso"</pre>
    But you need to remove "quoted form of the" from dirOutput.
    Also, "set dirOutput to POSIX path of the dirOut" is not needed.
    so, this should work:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;">
    set dirOut to (POSIX path of (choose folder with prompt "Scegli la posizione in cui salvare il file convertito"))
    set outPutName to text returned of (display dialog "Now, please enter a filename:" default answer "out" with title "Enter Filename") & ".iso"
    if outPutName is ".iso" then set outPutName to "out.iso" -- simple error check for blank name
    if outPutName contains "/" then set outPutName to "out.iso" -- simple error check for bad charater in name
    set fullPathOut to quoted form of (dirOut & outPutName)
    </pre>
    Tony

  • How to manipulate the date in idoc scripting?

    how can we manipulate date in idoc scripting? How to retrieve the year, month, date from the date? How can we update the year of the particular date in idoc scripting.

    There are a bunch of date / time functions that you can find in chapter 5 of the Idoc Script Reference (the bible for this sort of thing)
    For the sort of things you need to do I would recommend you look at formatDateWithPattern()
    for example to retrieve the year of 'now'
    <$year = formatDateWithPattern(dateCurrent(),"yyyy")$>
    month
    <$month = formatDateWithPattern(dateCurrent(),"MMM")$>
    the patterns for the same rules as Java date formats (unsurprisingly)
    If you want to update the year then I think you need to build the date as a string and the use the parseDate or parseDateWithPattern functions to actually create something that Idoc will recognise as a date object.
    Tim

  • Making Custom Idoc Script function

    Hi all,
    I am making a custom Idoc Script function. I have merged the resource
    table into the core IdocScriptExtensions table. But i am not able to call the custom function in SiteStudio. Find below the steps that i have taken
    step1) I have added a resource (Static Table) in my component which merges to "IdocScriptExtensions" fucntion.
    Step2) I have already created the java class.
    Step3) Edited <td>Myname</td><td>Myclass</td><td>MyloadOrder</td> in the resource with corresponding values.
    Step4) From component settings added the custom classes.
    Step5) made a build of the component.
    Step6) Installed the component in my server.
    now when i go to SS Designer and call this function then no response is generated.
    This component will return me a boolean by quering DB. I have number of sysouts and traces but none of them is printed on the console. Can somebody please provide insited into what probably might be amiss here.
    ANY pointers will be hightly appriciated. waiting for a quick response.
    reagrds,
    sapan

    Hi Sapan,
    For the most part your steps look correct. Personally I would probably do the following:
    1. move your component's classes folder back inside the component
    2. register the folder in the component
    3. add the folder to the class path
    4. in the component's hda file, check to make sure there the merge rule is set for your IdocScriptExtensions entry.
    if all of those are correct, occasionally the content server can be tempermental when new classes are added and so I would try disabling the component, restarting, then enabling and restarting.
    If everything is compiled, it has to be either a classpath issue or an issue merging your IdocScriptExtensions table.
    Also, if you go to Administration>Configuration Info, expand enabled components and find yours, it will tell your the classpath registered for your component(though your code is in the content server classes folder).
    Sounds like you are really close though...did you get the debugger working?
    David

  • Include a jsp in another

    I wanr to include a jsp into another, but dinamically. I have a file named Inicio.jsp. This file has a link that calls the servlet "ServletMenu". This servlet decides which jsp page to load. But I want to load "inside" the Inicio.jsp.
    Here a send some code
    Inicio.jsp: shows a menu
    <tr>
    <td>Menu 1</td>
    </tr>
    ServletMenu
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    String operacion = (String)request.getParameter("operacion");
    if(operacion.equalsIgnoreCase("menu1")) {
    RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher("/WebModulo1/Menu1");
    dispatcher.forward(request, response);
    Menu1 contains a form
    The page given by the servlet should show everything that is shown in Inicio.jsp and in the middle of the page should be the content of the Menu1.jsp.
    Am I clear? The idea is mantain a fix menu and load only dynamic content in the middle of the page.
    hope you can help

    I have the code working but ServletMenu only loads the Menu1.jsp and that is not what I want.
    I' m developing an Intranet site. Depending on the user that is logged, the menu that is shown, because not all users have access to all the system tasks.
    I thought of having the pages containing the menu shown to the user done statically and in the middle of that statical page load the content of a dynamic page.
    For example, suppose I have in the server the pages Inicio.jsp, that shows the menu, and Menu1.jsp that shows the same things that Inicio.jsp (but the link to menu1should not exit) and whatever is loaded when the user clicks in the link menu1 of the Inicio.jsp page. The "whatever is loadded" will be another .jsp page, that should be inside Menu1.jsp.
    Hope I'm clearer this time
    Thanks

  • Include a .jsff in another .jsff

    Hi,
    I am trying to include a .jsff within another .jsff page in jdev 11.1.1.2 as a simple region.
    The jdev allows me to include the same as a region/dynamic region when I drag and drop the second .jsff file in the first .jsff file.
    But when i try to select the drop as a "region", I get the following error.
    Nov 2, 2010 1:49:00 PM oracle.adfdtinternal.view.rich.region.transform.RegionDocFragInfo constructRegionDocumentFragment
    SEVERE: oracle.bali.xml.model.XmlReadOnlyException: read-only on commit
    java.lang.RuntimeException: oracle.bali.xml.model.XmlReadOnlyException: read-only on commit
         at oracle.adfdt.jdev.transaction.JDevTransactionManager.runTaskUnderTransaction(JDevTransactionManager.java:84)
         at oracle.adfdt.view.rich.region.util.RegionCreationUtil._createRegion(RegionCreationUtil.java:220)
         at oracle.adfdt.view.rich.region.util.RegionCreationUtil.createRegion(RegionCreationUtil.java:93)
         at oracle.adfdtinternal.view.rich.region.transform.RegionDocFragInfo.constructRegionDocumentFragment(RegionDocFragInfo.java:119)
         at oracle.adfdtinternal.view.rich.region.transform.RegionDocFragInfo.getData(RegionDocFragInfo.java:85)
         at oracle.bali.xml.model.datatransfer.operation.CreateFromFragmentOperation$1.performTask(CreateFromFragmentOperation.java:52)
         at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:172)
         at oracle.bali.xml.model.datatransfer.operation.CreateFromFragmentOperation.apply(CreateFromFragmentOperation.java:42)
         at oracle.bali.xml.model.AbstractModel.performOperationAction(AbstractModel.java:274)
         at oracle.bali.xml.model.datatransfer.operation.PerformOperationAction.actionPerformed(PerformOperationAction.java:36)
         at oracle.bali.xml.share.ActionProxy.actionPerformed(ActionProxy.java:47)
         at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy.access$201(DropMenuInvoker.java:234)
         at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy$1.run(DropMenuInvoker.java:254)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: oracle.bali.xml.model.XmlReadOnlyException: read-only on commit
         at oracle.bali.xml.model.XmlModel.__precommitTransaction(XmlModel.java:2715)
         at oracle.bali.xml.model.XmlContext.precommitTransaction(XmlContext.java:1172)
         at oracle.bali.xml.model.XmlContext.__precommitTransaction(XmlContext.java:1665)
         at oracle.bali.xml.model.XmlContext.__commitTransaction(XmlContext.java:1696)
         at oracle.bali.xml.model.XmlModel.__requestCommitTransaction(XmlModel.java:2796)
         at oracle.bali.xml.model.XmlModel.commitTransaction(XmlModel.java:445)
         at oracle.bali.xml.model.XmlModel.commitTransaction(XmlModel.java:415)
    Can anybody tell me what's the problem here ? Any thing wrong that I am doing ?
    I also tried to inlcude a subView (and even a subform within the subView) and drop the second jsff in this subview but to no avail. I still am getting the above issue.
    Thanks,
    Pawan.

    In response to your questions,
    The two fragments are part of two different taskflows. The first fragment is a view within its taskflow as is the second within its own taskflow.
    The second taskflow i am dragging and dropping as a static region which is when i am getting the above error.
    Not sure of what is causing the same. Any pointers please ?
    Thanks,
    pawan.

  • Include Java script in the abap webdynpro

    Dear expert,
    Anyone know how can i include a java script in the abap web dynpro.
    Thanks
    Regards,
    Bryan

    Hi
    There is no way you can include Java Script in Web Dynpro ABAP. You can navigate to a BSP application and run your JavaScript.
    Abhi

  • Calling GET_WORKFLOW_INFO_BYNAME service from idoc script

    Hi, i need to call service GET_WORKFLOW_INFO_BYNAME in custom idoc script on documents to determine if the document is in workflow. If it is there is no problem. But if it is not, calling if GET_WORKFLOW_INFO_BYNAME cause exception which is writen to server log.
    I don't want to write this exception to log because of log size.
    Is there any way how to suppress the exception or other method to find if the document is in workflow?
    Best regards

    Hi
    I guess you can check the status of the content to verify if a content is any WF or not . If the status is Review / Edit etc then it indicates the content to be part of a WF .
    Hope this helps .
    Thanks
    Srinath

  • Including java script in struts

    Hii All,
    I wanted to use some java script function on onclick of button. like on click on calendar image i should invoke the cal control writtern in java script.
    Its a pure struts application. can any1 tell me how to include java script in struts ?

    it depends on the javascript file you are using as to how you are going to have to do it.. but I would imaging you will have to include the js file like this.
    <script type="text/javascript"
         src="<c:out value='${pageContext.request.contextPath}'/>/scripts/newCalendar/calendar.js"></script>then on how to call the javascript from the onclick it will completely depend on the actual calendar script.

Maybe you are looking for