Hierarchy construct automation?

Dear All,
       I am working on BI 7.0 . I have to pull data from R/3 using hierarchies. The hierarchy is on 0account . Presently there are many hierarchies on 0account in my system..e.g.
PHARMACY SALARIES(text node)>SALARIES PRODUCTIVE(text node)>REGULAR SALARIES PROODUCTIVE(text node)>"0account infoobject restricted to various account nos". There are more than 50 hierarchies like this. Are hierarchies possiblein R/3? Can hierarchies in BW be made ONLY manually or is there a way where all these hierarchies can be made automatically according to hierarchies in R/3(if hier present)? I want to pull data using hierarchy "Drug Expense">"Inpatients days in Hospital">"specific account nos". Is there a way to construct a hierarchy data source?
Regards,
Ratish
[email protected]

Are hierarchies possible in R/3?
Yes
Can hierarchies in BW be made ONLY manually or is there a way where all these hierarchies can be made automatically according to hierarchies in R/3(if hier present)?
Hierarchies can be maintained in BW manually. But it is a very tedious job. If a hierarchy exists in R3 then recommended to load it to BW rather then maintaining the same structure manually in BW.
Always first look for the delivered extractor for the existing hierarchies in R3. If none exists to meet you req then build a custom one.
I want to pull data using hierarchy "Drug Expense">"Inpatients days in Hospital">"specific account nos". Is there a way to construct a hierarchy data source?
refer doc: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20a709c1-0a8e-2a10-21b4-f779728c63bf
also refer thread:
how to create data source on hierarchies customer defined

Similar Messages

  • What is the best way to bring a hierarchy in R3 to BW

    Hi,
    There is a hierarchy constructed on R3 based on sales area called AMG hierarchy. Users now want the same hierarchy in BW reports based on Cube1.
    What is the best approach to handle this?
    What is the best way to bring a hierarchy in R3 to BW?
    Thanks

    Hi,
    I tried mk1 and it prompts for:
    u201CHierarchy name & Data Elementu201D
    When I tried mk2, it only prompts for u201CHierarchy nameu201D.
    1.
    Both tcodes do not allow me to browse for the list of hierarchies so it appears I need to know the tech name somehow. Should  I have been able to browse?
    2.
    Is there another way to see the list of hierarchies on R3
    (Is there a similar tcode on BW to see or create the hierarchies on BW?)
    3.
    Just to understand, what difference does it make whether the hierarchy was created with mk1 or mk2?
    4.
    So, let me get this clear, on R3, when I execute BW10, I am prompted to enter:
    "Data Element for the Logical General Hierarch"
    it is at this point that when I browse, trying to see the list of hierarchies, I get the above message.
    "No General Hierarchy Available in R/3"
    Let's assume that I know the "Data Element for the Logical General Hierarch" to be xxxxHierxxxx.
    When I enter xxxxHierxxxx, what should I expect?
    Are you suggesting that it will automatically create the same hierarchy on BW?
    Thanks

  • How to add .mov extension to Quicktime clips ?

    Not to exported movies but to all the individual clips / movies, created
    by capturing process. I know I have seen the box to check / uncheck ( add
    .mov extension.
    Obviously I didn't check it, but now need to.
    Doesn't seem to be a quicktime option / preference.
    Where in FCP ?
    tHANKS

    Too, you can download a simple Automator Action, like Change Extension. Then in Automator choose, File > Import Actions, point to this new file.
    Then the fully constructed Automator workflow is quite simple: 2 steps. Like this:
    Or, you can download a super simple app like R-Name.
    It's got an option there, "Add Extension". Couldn't be easier to use. I use this app quite a bit.

  • MDM Security

    Is it possible to maintain MDM Security using Automator?
    For example:
    1. Manually create Access Node Group
    2. Manually assign users to Access Node Groups
    3. Upload Access Node Groups security using Automator
    I’ve tried to upload the file bellow but Automator failed with the massage:
    “Property MDM_ORAReadLF is not defined" but the property exists under Access Leaf tab for ACCOUNTS hierarchy.
    Automator file sample:
    UpdateHierPropValue,ORACLE_CURRENT,ACCOUNTS,MDM_ORARead (Leaf),Read
    Thanks
    Dragomir Pejic
    [email protected]

    Hello,
    Great question -- I have never tried that before -- perhaps using the ChangeProp Automator parameter it is possible?
    Please let me know if you get it to work.
    Thanks,
    todd rebner
    http://www.advancedepm.com/

  • Hierarchy Automation

    Hi All,
    This is in regard with the Automation of hierarchies in BPC, we have one dimension where in we are loading two infoobjects to automate that dimension with master data and hierarchies,
    we are facing strange situation Already we were maintaining the dimension members and Hierarchies manually, we are in  process of automation the dimension, when we load the master data from one Info object to the dimension that is fine but when we are loading hierarchies from one infoobject other hierarchies of other infoobject are vanishing. For example loading cost centers and project system  to one dimension.
    when we load costcenter hier proj system hier's are vanishing.....
    Is there any note to be applied
    Regards
    Ram

    Check whether you have maintained the right Hierarchy ID in the conversion file.

  • Importing hierarchy in STS (automation)?

    Is it possible to somehow automate the import of updated hierarchies in STS for a particular subplan?
    in STS: General Settings, step "Determine Hierarchy for a Subplan."
    Thank you

    HI,
    The need for this I think is the following. When hierarchy gets updated in BW, for some reason it does not get updated automatically in STS. I have to manually reimport the newest hierarchy to STS. That is why I have the above mentioned question.
    Thank you,
    Andy

  • COM Objects Hierarchy

    Hi all,
    I wish to know where can I find a "map", hierarchy of all methods&property for an application(like Microsoft Word, Excel) , to acces then ActiveX classes in LabVIEW. For example for Vector tool (CANape,CANalyzer,CANoe) if you type in Help -> COM Hierachy you find a map of all objects that you can access whithin ActiveX automation.
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    COM HIerrachy.JPG ‏179 KB

    I don't think one of those exist.
    Would be nice though.
    I started to do one of those manually years ago (when reference were first introduced) but before I was done I noticed the pattern. 
    Drop an
    Application Control >>> Class Specifier Constant
    on a diagram and pop-up and choose "select VI Server Class" to see all of the possilbe classes.
    After selecting a class wire it to BOTH a property node and a Invoke node to find all of the properties and methods for each class.
    Have fun!
    Ben
    Message Edited by Ben on 04-23-2009 06:05 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    classes.PNG ‏30 KB

  • Quicksilver or Automator? Or something else? (Complicated task within)

    I have a big list of categories and names here: http://www.alecquighardworker.com/97-69.txt (1). Pretty much every separate line needs to be turned into a folder titled what’s on that line. (Ex: Folders for “Art” “TodPapageorge-Richard_BWoodward” “AnthonyMccall-Graham_Ellard_and_StephenJohnstone” and so on). Is there an automated way of doing this? Otherwise I’d be creating a bunch of folders and then copy and pasting endlessly.
    And, what would REALLY be cool is if I could automate so a process would go through this document and create the folders that follow some sort of hierarchy. Ideally, the folders would be like “Art” > “TodPapageorge-Richard_BWoodward”, “AnthonyMccall-Graham_Ellard_and_StephenJohnstone”, “JudithLinhares-Madison_SmarttBell”, “Literature” > “LynneTillman-GeoffreyOBrien”, “Poetry” > “Laurie_Sheck”, “Anne_Waldman”, “Donald_Platt” and so on. If those could all be under the folder “Fall2006,_No97” it might allow me to go through this entire huge document very quickly and relatively easily.
    What will ultimately happen with all of this data: There are already folders numbered 1-100, each containing folders for called “Art” “Literature” “Poetry” “Fiction” “Music” “Film” “Theatre” and so on. (Here's a pic of that heirarchy: http://www.alecquighardworker.com/Picture%201.png). All of the folders I create will have to be moved into those preexisting folders. That gets a little more tricky, so I don’t mind doing that manually. FYI, this is being done so a static website can be updated for the launch of a new, dynamic one.
    Unfortunately I’m only an intermediate QS user at best. However, if anyone has any ideas, or even other programs or places to look for general automation help, I would very much appreciate!
    Thank you!
    Alec
    1 This text has been prepped for folder naming and comes from the page here: http://www.bombsite.com/backissues.html.
    I cross-posted this here: http://blacktree.cocoaforge.com/forums/viewtopic.php?p=27749#27749
    powerbook g4 Mac OS X (10.4.6) 1.67ghz, 1GB RAM, superdrive

    I have a big list of categories and names here: http://www.alecquighardworker.com/97-69.txt (1). Pretty much every separate line needs to be turned into a folder titled what’s on that line. (Ex: Folders for “Art” “TodPapageorge-Richard_BWoodward” “AnthonyMccall-Graham_Ellard_and_StephenJohnstone” and so on). Is there an automated way of doing this? Otherwise I’d be creating a bunch of folders and then copy and pasting endlessly.
    And, what would REALLY be cool is if I could automate so a process would go through this document and create the folders that follow some sort of hierarchy. Ideally, the folders would be like “Art” > “TodPapageorge-Richard_BWoodward”, “AnthonyMccall-Graham_Ellard_and_StephenJohnstone”, “JudithLinhares-Madison_SmarttBell”, “Literature” > “LynneTillman-GeoffreyOBrien”, “Poetry” > “Laurie_Sheck”, “Anne_Waldman”, “Donald_Platt” and so on. If those could all be under the folder “Fall2006,_No97” it might allow me to go through this entire huge document very quickly and relatively easily.
    What will ultimately happen with all of this data: There are already folders numbered 1-100, each containing folders for called “Art” “Literature” “Poetry” “Fiction” “Music” “Film” “Theatre” and so on. (Here's a pic of that heirarchy: http://www.alecquighardworker.com/Picture%201.png). All of the folders I create will have to be moved into those preexisting folders. That gets a little more tricky, so I don’t mind doing that manually. FYI, this is being done so a static website can be updated for the launch of a new, dynamic one.
    Unfortunately I’m only an intermediate QS user at best. However, if anyone has any ideas, or even other programs or places to look for general automation help, I would very much appreciate!
    Thank you!
    Alec
    1 This text has been prepped for folder naming and comes from the page here: http://www.bombsite.com/backissues.html.
    I cross-posted this here: http://blacktree.cocoaforge.com/forums/viewtopic.php?p=27749#27749
    powerbook g4 Mac OS X (10.4.6) 1.67ghz, 1GB RAM, superdrive

  • How to find a hierarchy of all Itmes Pages inside a Page

    Hi,
    I am using Oracle Portal 10.1.2. Need some information:
    I have a page with Items or it can have both items, sub-pages and further each subpage can have items and/or sub-pages. How can I find all the objects in a hierarchical order. How can I construct my SQL to query the back-end tables that I can query to build a hierarchy for the whatever Page's pageid I provide.
    If given a Page ID need to return all the items, sub-pages and so forth. I am trying to build a Tree structure Menu.
    I have one Top page with tabs and in each tab I am adding one Portlet i.e. a page that is published as Portlet. Now this page which is published as a portlet can only have Items added or can have n number of sub-pages underneath which in-turn can have items and/or sub-pages and so forth, just like a Folder Structure in Windows. As soon as the user clicks a tab want to show all the items/pages in a tree like format.
    Any idea on how can I proceed any help is really appreciated.
    Thanks

    Hi,
    I am using Oracle Portal 10.1.2. Need some information:
    I have a page with Items or it can have both items, sub-pages and further each subpage can have items and/or sub-pages. How can I find all the objects in a hierarchical order. How can I construct my SQL to query the back-end tables that I can query to build a hierarchy for the whatever Page's pageid I provide.
    If given a Page ID need to return all the items, sub-pages and so forth. I am trying to build a Tree structure Menu.
    I have one Top page with tabs and in each tab I am adding one Portlet i.e. a page that is published as Portlet. Now this page which is published as a portlet can only have Items added or can have n number of sub-pages underneath which in-turn can have items and/or sub-pages and so forth, just like a Folder Structure in Windows. As soon as the user clicks a tab want to show all the items/pages in a tree like format.
    Any idea on how can I proceed any help is really appreciated.
    Thanks

  • How do I create an automator variable for a path that includes a date?

    I like to use Image Capture to scan documents into a hierarchy of folders under my ~/Documents directory that are organized by year and document type.  For example, I have
    ~/Documents/archives/2011
         /Misc
         /Utilities
    and
    ~/Documents/archives/2012
         /Misc
         /Utilities
    for archiving miscellaneous docs and utilities bills. Now, switching folders in Image Capture is annoying so I want to use the Automator support built into that app to direct the scanned images to ~/Documents/archives/<Current Year>/Misc or ~/Documents/archives/<Current Year>/Utilities.  I was able to do this with separate Automator workflows, each with a hard-coded path to the destination folder.  For example,
    What I would like to do is use an Automator variable to dynamically determine ~/Documents/archives/<Current Year>/Misc.  I see variables for Home, Documents, and Current Year.   However, when I try to create a new path variable it only lets me choose a full path to a Finder folder.  How do I combine Documents and Current Year variables with the "archives" and "Misc" folder names to create a new path variable?

    Well now, you went and made me learn something today.  In the Variables Library, under Utilities, is a variable named AppleScript.  You can put a small script into this that evaluates to your path, for example:
    ((((path to documents folder) as text) & "archives:" & (year of (current date)) as text) & ":Utilities") as alias
    If the script evaluates to a proper path, it can be used wherever any other path can - you can experiment by looking at the results of a Get Value of Variable action.

  • Account dimension hierarchy text nodes ACCTYPE property

    Hello,
    We have master data being populated into BPC from BW. So for the Account dimension in BPC, we use the 0GL_ACCOUNT infoobject in BW. This infoobject also has all the Financial statement version hierarchies which are being loaded to BPC. The question that I have is, how should the hierarchy text node values for ACCTYPE property be populated if I have to automate this load on a daily basis.
    For the actual GL accounts, we have the account number ranges defined. Like 1* series accounts are Assets etc..So we can easily define a rule for populating the ACCTYPE  property values. But not sure if there is any easy logic for populating the hierarchy text nodes as we dont have any pattern in them. Would we need to maintain it manually always?
    Thanks
    Gaurav

    Hello Richard,
    If there is really no logic behind them there is off course no way of automating this. Then I guess you will have to maintain each node separately.
    Some customers are also willing to change their text node structure. For example I had one when where the rules for the 0HIER_NODE records were as follows:
    *           EXP -> Starts with 32*, 311*, 312*, 321*, 3111*, 3112*,
    *                  3142*,  31111*,  31112*,  311111*
    *           INC -> Starts with TOT, 3000000000, 3100000000, 313*,
    *                  322*, 3113*, 3141*, 31113*, 311112*
    *           AST -> Starts with 1*
    *           LEQ -> Starts with 2*
    Kind regards,
    Christophe

  • How to prevent BPC from automated calculating for hierarchies / nodes?

    Hi experts,
    I am looking for a practicable way to prevent the system from automated calculating for hierarchies, and especially for nodes within hierarchies?
    Let's say, I have ENTITIES (AS A HIERACHY) in rows and ACCOUNTS in COLUMNS. Now I want the system to block adding up the values for one specific account on node XY. Instead of the sum of all base member entities, the cell for account XY should be left empty.
    Is there a practicable way to deal with this?

    Hi Stefan,
    you can prevent the system to calculate a node by editing the Formula Property  in the Dimension.
    You can insert 0 or null to the Formula field for the specific element.
    But in this case the values from your leaf elements lying under your node wont be calculated  even in higher hierarchy nodes.
    For ex.: with the following structure
    -A
    ---A1
    A11
    A12
    ---B1
    B11
    B12
    If you set A1 to 0, the top node A will only be calculated by values of B1
    Regards
    Jörg

  • [b]Tutorial:[/b] Simplify Developing OLE Automation Code Using VBA

    INTRODUCTION
    Automating Office applications from Oracle Forms can be a tedious, frustrating, and time-consuming process. Because the OLE2 and CLIENT_OLE2 built-ins do not validate the automation commands that they relay, code that compiles without errors often dies at runtime with a not-so-helpful error code. This tutorial will demonstrate how to simplify the development of automation code using a tool that ships with all Microsoft Office editions -- the Visual Basic for Applications (VBA) IDE.
    The VBA IDE, a core Office component, is a full-fledged development environment featuring code completion, basic syntax highlighting, context-driven help and a runtime debugger. Its Object Browser provides a convenient means of browsing the Word object model, as well as searching by keyword.
    For those who may not interested in following this tutorial in detail, I would like to stress the usefulness of the Object Browser as a tool for inspecting the functions supported by OLE server applications and, perhaps more importantly, valid values for function arguments. Whether/not anyone buys the assertion that starting with VBA prototypes is far more productive than pounding out OLE2 code from the very start, they will find the Object Browser invaluable as a reference -- I rely on it exclusively for this sort of documentation.
    A BRIEF INTRODUCTION TO THE VBA IDE & THE OBJECT BROWSER UTILITY
    Try this:
    1. Open Word
    2. Launch the VBA IDE by pressing <Alt><F11>
    3. Open the Object Browser by pressing <F2>
    The Object Browser allows you to visually navigate Word's class hierarchy. Its user interface is a bit crowded, so controls are unlabeled. Hovering the mouse cursor above a control will display a tooltip explaining that control's purpose. The browser's scope can be narrowed by using the Project/Library combo. Typing a keyword or substring in the Search Text combo and clicking on the Search button will cause all classes/members whose name contains the specified search text to be listed in the Search Results pane. Selecting an item from this list will update the two panes below it, showing the selected class, and its members. Beneath the Classes and Members panes is an untitled pane, gray in color, which displays details for the selected class/member, including hyperlinks to relevant information such as arguments, their types and allowable values. If Visual Basic Help is installed, pressing <F1> will display help on a selected class/member. (This feature can be installed from your Office install CD, if necessary.)
    NOTE: While it is possible to cut-and-paste the code examples that follow, I highly recommend that they be typed in by hand. Doing so will provide a better understanding of how the IDE's code completion behaves. Use code completion most efficiently by not using the mouse or <Enter> key when selecting from completion lists. Instead, just type enough letters to select the desired list element, then continue along as if you had typed the entire element, typing the next operator in your statement. It really is slick!
    HELLO WORLD - VBA-STYLE
    1. Open Word
    2. Launch the VBA IDE by pressing <Alt><F11>
    3. Select Module from the Insert menu.
    4. In the blank area that appears, enter the following code:
      Public Sub HelloWorld()
          Documents.Add
          Selection.TypeText ("Hello, world!")
      End Sub5. Press <F5> to run the code.
    If you switch back to Word by pressing <Alt><F11>, there should appear a newly-created document containing the text Hello, world!.
    A MORE AMBITIOUS EXAMPLE
    In this example, we will launch Word, type some text, and alter its formatting. For the purposes of this tutorial, consider it the process we wish to automate from within Forms.
    1. If Word is running, close it.
    2. Open any Office application except Word, such as Excel, Outlook or PowerPoint
    3. Launch the VBA IDE by pressing <Alt><F11>.
    4. Select References from the Tools menu -- a dialog should pop up.
    5. From within this dialog, locate and select Microsoft Word <version> Object Library, then click OK.
    6. Select Module from the Insert menu.
    7. In the blank area that appears, enter the following code:
    Public Sub LaunchWord()
        Dim app As Word.Application
        Set app = CreateObject("Word.Application")
        app.Visible = True                          '!!! IMPORTANT !!!
        app.Documents.Add
        With app.Selection
            .TypeText "This is paragraph 1."
            .TypeParagraph
            .TypeText "This is paragraph 2."
            .TypeParagraph
            .TypeText "This is paragraph 3."
        End With
        With ActiveDocument
            .Paragraphs(1).Range.Words(3).Bold = True
            .Paragraphs(2).Range.Words(3).Italic = True
            .Paragraphs(3).Range.Words(3).Underline = True
        End With
    End Sub8. Press <F5> to run the code.
    A new Word session should have been launched. Switch to it, to view the results of our handiwork!
    TAILORING VBA CODE INTENDED FOR OLE2 CONVERSION
    Now, things get a bit uglier. The code listed above gives a good idea of how concise VBA code can be, but With blocks and chained object references do not translate readily into OLE2 code. Here's the same process, rewritten in a more OLE2-friendly style. Note the numerous intermediate object references that have been declared.
    Public Sub LaunchWord()
        Dim app As Word.Application
        Dim doc As Word.Document
        Dim docs As Word.Documents
        Dim pars As Word.Paragraphs
        Dim par As Word.Paragraph
        Dim wrds As Word.Words
        Dim sel As Word.Selection
        Dim rng As Word.Range
        Set app = CreateObject("Word.Application")
        app.Visible = True                          '!!! IMPORTANT !!!
        Set doc = app.Documents.Add
        Set sel = app.Selection
        sel.TypeText "This is paragraph 1."
        sel.TypeParagraph
        sel.TypeText "This is paragraph 2."
        sel.TypeParagraph
        sel.TypeText "This is paragraph 3."
        Set pars = doc.Paragraphs
        'select third word of first paragraph and make it bold
        Set par = pars.Item(1)
        Set rng = par.Range
        Set wrds = rng.Words
        Set rng = wrds.Item(3)
        rng.Bold = True
        'select third word of second paragraph and italicize it
        Set par = pars.Item(2)
        Set rng = par.Range
        Set wrds = rng.Words
        Set rng = wrds.Item(3)
        rng.Italic = True
        'select third word of second paragraph and underline it
        Set par = pars.Item(3)
        Set rng = par.Range
        Set wrds = rng.Words
        Set rng = wrds.Item(3)
        rng.Underline = True
    End Sub
    TRANSFORMATION: CONVERTING VBA CODE INTO PL/SQL
    Here is the PL/SQL counterpart to our previous VBA routine. Compare printouts of the two and note their similarities. Notice the need for argument lists -- this causes the code to fluff up quite a bit, and really interferes with readability.
    PROCEDURE LAUNCH_WORD IS
      v_app OLE2.OBJ_TYPE;     -- Application
      v_doc OLE2.OBJ_TYPE;     -- Document
      v_docs OLE2.OBJ_TYPE;    -- Documents collection
      v_pars OLE2.OBJ_TYPE;    -- Paragraphs collection
      v_par OLE2.OBJ_TYPE;     -- Paragraph
      v_wrds OLE2.OBJ_TYPE;    -- Words collection
      v_sel OLE2.OBJ_TYPE;     -- Selection
      v_rng OLE2.OBJ_TYPE;     -- Range
      v_args OLE2.LIST_TYPE;   -- OLE2 argument list
    BEGIN
      /* launch Word and MAKE IT VISIBLE!!! */ 
        v_app := OLE2.CREATE_OBJ('Word.Application');
        OLE2.SET_PROPERTY(v_app, 'Visible', TRUE);
      /* initialize key object references */ 
        v_docs := OLE2.GET_OBJ_PROPERTY(v_app, 'Documents');
        v_doc := OLE2.INVOKE_OBJ(v_docs, 'Add');
        v_sel := OLE2.GET_OBJ_PROPERTY(v_app, 'Selection');
      /* type first paragraph */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 'This is paragraph 1.');
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        OLE2.INVOKE(v_sel, 'TypeParagraph');
      /* type second paragraph */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 'This is paragraph 2.');
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        OLE2.INVOKE(v_sel, 'TypeParagraph');
      /* type third paragraph */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 'This is paragraph 3.');
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
      /* set reference to Paragraphs collection */
        v_pars := OLE2.GET_OBJ_PROPERTY(v_doc, 'Paragraphs');
      /* select third word of first paragraph and make it bold */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 1);
        v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
        v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
        OLE2.SET_PROPERTY(v_rng, 'Bold', TRUE);
      /* select third word of second paragraph and italicize it */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 2);
        v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
        v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
        OLE2.SET_PROPERTY(v_rng, 'Italic', TRUE);
      /* select third word of second paragraph and underline it */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
        v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
        OLE2.SET_PROPERTY(v_rng, 'Underline', TRUE);
    END;
    REFACTORING FOR REUSABILITY AND READABILITY
    While the previous procedure runs without errors, it suffers from poor readability which, in turn, makes it difficult to maintain. Here, we address those issues by moving repetetive low-level operations into separate procedures.
      PROCEDURE LAUNCH_WORD IS
        v_app OLE2.OBJ_TYPE;    -- Application
        v_doc OLE2.OBJ_TYPE;    -- Document
        v_docs OLE2.OBJ_TYPE;   -- Documents collection
        v_sel OLE2.OBJ_TYPE;    -- Selection
        v_args OLE2.LIST_TYPE;  -- OLE2 argument list
      BEGIN
        /* launch Word and MAKE IT VISIBLE!!! */ 
          v_app := OLE2.CREATE_OBJ('Word.Application');
          OLE2.SET_PROPERTY(v_app, 'Visible', TRUE);
        /* create a new Word document */ 
          v_docs := OLE2.GET_OBJ_PROPERTY(v_app, 'Documents');
          v_doc := OLE2.INVOKE_OBJ(v_docs, 'Add');
          v_sel := OLE2.GET_OBJ_PROPERTY(v_app, 'Selection');
        /* add a few paragraphs */
          PRINT_PARAGRAPH(v_sel, 'This is paragraph 1.');
          PRINT_PARAGRAPH(v_sel, 'This is paragraph 2.');
          PRINT_PARAGRAPH(v_sel, 'This is paragraph 3.');
        /* apply formatting */
          APPLY_FORMATTING(v_doc, 1, 3, 'Bold', TRUE);
          APPLY_FORMATTING(v_doc, 2, 3, 'Italic', TRUE);
          APPLY_FORMATTING(v_doc, 3, 3, 'Underline', TRUE);
      END;
      PROCEDURE APPLY_FORMATTING(
        v_doc OLE2.OBJ_TYPE,
        v_paragraph_num NUMBER,
        v_word_num NUMBER,
        v_attribute VARCHAR2,
        v_value BOOLEAN) IS
        v_pars OLE2.OBJ_TYPE;   -- Paragraphs collection
        v_par OLE2.OBJ_TYPE;    -- Paragraph
        v_wrds OLE2.OBJ_TYPE;   -- Words collection
        v_rng OLE2.OBJ_TYPE;    -- Range
        v_args OLE2.LIST_TYPE;  -- OLE2 argument list
      BEGIN
        /* set reference to Paragraphs collection */
          v_pars := OLE2.GET_OBJ_PROPERTY(v_doc, 'Paragraphs');
        /* get specified paragraph */   
          v_args := OLE2.CREATE_ARGLIST;
          OLE2.ADD_ARG(v_args, v_paragraph_num);
          v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
          OLE2.DESTROY_ARGLIST(v_args);
        /* get words for specified paragraph */
          v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
          v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        /* apply formatting to word found at specified index */
          v_args := OLE2.CREATE_ARGLIST;
          OLE2.ADD_ARG(v_args, v_word_num);
          v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
          OLE2.SET_PROPERTY(v_rng, v_attribute, v_value);
      END;
      PROCEDURE PRINT_PARAGRAPH(v_sel OLE2.OBJ_TYPE, v_text VARCHAR2) IS
        v_args OLE2.LIST_TYPE;
      BEGIN
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, v_text);
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        OLE2.INVOKE(v_sel, 'TypeParagraph');
      END;
    CONCLUSION
    It is my hope that this tutorial, despite it's introductory nature, has demonstrated the value of the VBA IDE, the ease with which automation processes can be prototyped using VBA, the noticeable similarity between VBA automation routines and their Forms PL/SQL counterparts, and the advantages of testing automation processes within the VBA IDE. Please feel free to follow up with any specific questions or concerns you may have.
    Thanks,
    Eric Adamson
    Lansing, Michigan
    FINAL NOTE: These examples use the OLE2 built-in, and will operate correctly when called from forms running in the Form Builder OC4J. Deploying them to an Oracle Application Server will launch Word on the server itself (if available), which is usually not the developer's intent! Automating Word client-side via web forms requires adding WebUtil support. Adapting the code for WebUtil is trivial -- just replace all instances of OLE2 with CLIENT_OLE2. Adapting forms for WebUtil and configuring OLE support into your Oracle Application Server, however, are beyond the scope of this tutorial.
    REVISION HISTORY
    This promises to be something of a 'living document'. I've snuck changes through without comment in the past, but in the future, I'll try to document significant changes here.
    2006-08-21
      * Prefaced boring subject line with text: 'Tutorial:' to clarify purpose
      * Added emphasis on value of Object Browser as a reference

    Thanks James, for your kind words. I do hope this information will help folks out. I honestly believe that tinkering around in the VBA IDE will prove highly gratifying for automation developers. It can be assured that learning to make Word jump through hoops is much more straight-forward in this environment. I'm not one for mottos, but if I were pressed for a cheesy motto, I would say: First, make it work. Then, make it work in Oracle!
    Once the idea has sunk in, that Visual Basic routines for automating Word are exact analogs to their OLE2 counterparts, we can remove keywords like Oracle and PL/SQL from our Google searches on Word automation which, at least in this context, are the proverbial kiss of death. Suddenly we find ourselves liberated by the possibility of steal-, ahem... borrowing ideas from the Visual Basic* community!
    As for links, my link of choice is invariably http://groups.google.com -- if you don't already use it at least ten times a day, you must try it. This is the venerable USENET archive, including the holdings of now-extinct DejaNews. Another possible site of interest is http://word.mvps.org/FAQs/MacrosVBA, which may serve as a good starting point for those who wish to learn how to do fancy tricks with Word using VBA.
    If these links don't prove immediately helpful, please feel free to give specifics on the sort of operations you are interested in automating, and I'll see if I can post an example that addresses it.
    Regards,
    Eric Adamson
    Lansing, Michigan
    PS: I do hope, as people read my posts, with every other acronym being VBA, that they are not mistakenly hearing a call to learn Visual Basic. I say this, not because I believe learning VB would be a Bad Thing, but because I assume that few of us feel we have the time to learn a new programming language. Despite having come to the Oracle camp already knowing VB/VBA, and having acquired a fair bit of experience with automating Office applications as an Access developer, I remain confident that what I am suggesting people attempt does not rise to the level of learning a language. What I am suggesting is that they learn enough of the language to get by.
    *VB vs. VBA
    Just a quick word on this, as readers may wonder why I seem to use these terms interchangeably. Visual Basic (VB) can refer to either a development platform or a programming language. Visual Basic for Applications (VBA) is a language -- more precisely, it is a subset of the Visual Basic language. One purchases VB, usually quite intentionally. VBA is included with Microsoft Office, as is VBA's development environment, the VBA IDE. The key distinction between VB and VBA is that VBA cannot be used to create self-contained executables. Rather, VBA relies on VBA-enabled applications, such as Microsoft Office applications, to serve as a container for VBA code, and to provide a runtime environment for that code. For the purposes of discussing OLE Automation, VB and VBA are quite interchangeable.

  • How do I quickly update the ActiveX automation references in my VIs when the ActiveX interface changes?

    Hello all,
    I joined a test automation team in the middle of a large project and
    inherited a huge set of VIs (over 700) and associated architecture for
    this automation (not to mention the several thousand TestStand
    sequences).  Another part of the project is being developed by our
    customer, who is using VB 6.0 to create ActiveX components which we
    need to use in LabView to access their hardware.  They've already
    invested a large amount of time developing these ActiveX components,
    and they are not finished -- meaning the ActiveX interfaces will be
    changing.  Every time they send updated ActiveX components, I have to
    re-write many, many VIs including updating a couple strict typdefs. 
    This process takes way too much time and is mind-numbing and prone to
    error or omission.
    Unfortunately I can't post any of the VIs because of a NDA.  But
    perhaps a bit more detailed explanation would help.  TestStand calls a
    VI to open and get an ActiveX reference for automation (which it stores
    in a variant).  It will pass this reference into any VI it calls to
    perform specific functions through this ActiveX interface.  For
    example, one VI that may be called passes this automation refnum into
    another, which passes it to another, which passes it into another to
    get the actual ActiveX reference stored in that variant (through a
    Variant To Data call with a strict typedef of the ActiveX component
    wired to the type input).  [See the attached image of this sample VI
    hierarchy: the far left icon would represent TestStand, and the far
    right is the strict typedef.]  Any of the VIs in the chain might use
    ActiveX Property or Invoke nodes, and it can break at any one of those
    when the ActiveX component changes.  It's easy to fix each one, but
    since there are so many VIs it takes a very long time.
    Is there any way at all to do a massive search/replace or something to
    make the ActiveX references update?  I realise that even though
    property or method names stay the same from one version to the next,
    they are different references.  Is there a way to update these based on
    name if you give it the base ActiveX reference?
    Thanks in advance for any help!
    Tom Williams
    Attachments:
    hierarchy.GIF ‏6 KB

    Ben,
    Unfortunately I can't post any VIs that would demonstrate the problem
    because the ActiveX components are confidential.  I'll try to develop
    my own ActiveX dll that will demonstrate it, but in the meantime, in
    hopes that another picture will help, I've attached an image of a block
    diagram (with some names changed to protect confidential information)
    of one of the lower level VIs from the hierarchy I posted.  In this
    example, the "Automation Refnum IN" is an input with a type definition
    linked to the strict typedef based on the ActiveX automation dll that
    has changed.  I updated that typedef, but as you can see the output to
    the "Class1" indicator is broken.  If I delete the "Class1" indicator
    and select Create->Indicator from the Class1 property node, and then
    wire the new "Class1" indicator to the connector pane, the VI is fixed
    -- at least at compile time.  In most cases there is also a runtime
    problem where the reference obtained by one of the intermediate
    property nodes is null, so the property or method node that uses it
    fails (e.g. "_VNManager.Networks" property returned is 0, so the
    "_Networks.Network1" property node fails).  To fix this problem, I have
    to delete the wires between the property nodes, and one by one select a
    different property/method, then select the correct property/method and
    re-wire.  There seems to be a bit of "jiggling the handle" to get it to
    work though.
    I don't know if the ActiveX developer changed anything in this class,
    but if he did, he didn't change the name of this class.  I would like
    to have to modify the VI only if a class, property or method has
    changed name or been removed.
    Does that all make sense?  Thanks for any pointers or help!
    Tom
    Attachments:
    Class1_Path.GIF ‏7 KB

  • BPC 7.5NW: Hierarchy Upload from BW - Sort Order

    Hi,
    we are currently updating from BPC 7.0NW to 7.5 NW SP10. (BW has been upgraded to 7.02 SP09)
    As master data and hierarchies had been uploaded using the coding from 'HowTo Upload automated...' so far, we now have to use standard Data Manger packages.
    Maintaining packages and package links was successful. Everything works fine so far.
    The only problem are Hierarchies, better the sort order of hierarchie nodes. At the moment they are always sorted in an alphabetical order.
    We introduced property MBR_SEQ to all dimension using program UJA_MIGRATE_MBR_SEQ.
    We loaded hierarchies with different settings.
    Searching SDN and SAP Notes lead to notes 1603352 or 1581331.
    But manually changing hierarchies each time, new members are assigned, is not an option!
    Do I miss any option in the selection screen of the Data Manager package?
    Are there any options in transformation or conversion file?
    Thanks and regards
    Steve

    For your Information...
    We were now adviced to include parameter DM_KEEP_SRC_SEQ with value Y in AppSet parameters (Web-Administration).
    Please have a look at note '1626929 - Keep hierarchy sequence for Load Hierarchy from BW package'.
    It works!
    For the first hierarchy to be uploaded...
    If there are more than one hierarchy defined for upload, only the first hierarchy is sorted correctly, all following ones are sorted alphabetically again.
    Regards
    Steve

Maybe you are looking for

  • Time Machine - A bag of hurt with RAID 0 volumes

    Here's my situation: Mac Pro with 4 internal Hard Drives. 2 of them are in RAID 0 and they are the boot volume. The 2 others are also in RAID 0 and are used as a Time Machine volume. Both volumes have a capacity of 1TB. I had a problem with the boot

  • How to compile to version 1.0?

    I want to compile for version 1.0 (IE Browser, etc.). But my javac SDK 1.5 only compiles for newer versions? So is it impossible to comple Applets???

  • Unable to order prints on iPhoto

    I had been using my old Mac for years to order prints from iPhoto with no problems. Late last year, I upgraded my Mac to a 24" iMac with the newest version of iPhoto. Since I've had this machine, I've had trouble ordering prints. It usually gets part

  • When i click new tab i want it to be blank, i don's see an option to change this

    everytime i click on new tab this "babylon" search thing comes up. i never asked for this i dont know where it came from. i tried changing it. there are no option to change it. i uninstalled and reinstalled mozilla still same problem. please help. i

  • WRT54G V5 firmware

    Hi All, Can anyone tell me why the web site at linksys is now showing firmware version 1.00.9 for WRT54G V5 dated May 2006? I have been to the site and picked up firmware version 1.01.1 dated Nov 2006 around Christmas. I went to check today to see if