Developing hierarchy !!

Hello SDN,
Could somebody please help or guide me to know how can i develop a hierarchy to search for profit centre (Customer Fields)?
i need to develop something like we have in SAP GUI in R/3 in t-code KE53 for profit centre.
even the FM used in the search help exit for profit centre in R/3 are not available in CRM.
thanks
Pankaj

Hi Doshi,
Texual Node is generally taken as the first or root node & the rest of the nodes will be infoobject.Even that textual node represent 0hiernode infoobject.

Similar Messages

  • Hierarchy ALV in ABAP OOPS

    Hi FOlks,
                Have a requirement to develop Hierarchy ALV with two levels. As we need to make the columns as editable we are going for ALV OOPS. Is there any way of doing Hierarchy ALV in OOPS...if so, could you please suggest me which Class and method to be used.....
                                    Thanks in advance,
                                     Shyam.

    Look at sample programs in R3 
    SALV_DEMO_TREE_DATA_UPDATE     Demonstration Program for ALV OM Tree: Changed Data   
    SALV_DEMO_TREE_EVENTS          Demonstration Program for ALV OM Tree: Events         
    SALV_DEMO_TREE_FUNCTIONS       Demonstration Program for ALV OM Tree: Functions      
    SALV_DEMO_TREE_METADATA        Demonstration Program for ALV OM Tree: Metadata       
    SALV_DEMO_TREE_SELECTIONS      Demonstration Program for ALV OM Tree: Selections     
    SALV_DEMO_TREE_SETTINGS        Demonstration Program for ALV OM Tree: Settings       
    SALV_DEMO_TREE_SIMPLE          Demonstration Program for ALV OM Tree                 
    Regards,

  • Territory Wise Sales Report

    I want to generate territory wise sales report using sql server reporting services from sap b1.  How can I define the hierarchy where my state will be the top group, the territories will be the sub groups and the executive name and sales value will be the details.  How can I transform the parent, child relation into a group, sub group option in a report.  Kindly provide sample sql query for the same.
    Thanks in advance.

    Dear Gordon,
    As advised by you i have created territory hierarchy in the territory setup, where zone is the first level, state is the second level and territory (district) is the third level and in the BP master territory field this third level is picked. I am finding it difficult to develop hierarchy wise report where the report when run should show the zone wise net sales summary (net in the sense, minus all the sales returns and credit notes, etc) and when drilled should show the state wise total and in the last level the territory wise sales and if possible one more drill where the BP under that territory with sales amount will be shown.  Request you to kindly help me with a base query wherein i can modify the same to develop many variation of the same report.  Thanks in advance.

  • Pages hijacked my Word files

    I manage a few hundred MacBooks running 10.6.3. I'm not sure what happened, but whenever you double click a Word document, Pages opens it. I'm looking for a way to change that file association back to Word. Here's the kicker--I need it to be command line. GUI tools are not an option.
    I've tried rebuilding the LaunchServices database, but that didn't work. I imagine the issue can be fixed by tweaking the LaunchServices database or using lsregister, but documentation is hard to come by.
    Any help would be appreciated.
    Thanks.

    TomCrawford wrote:
    whenever you double click a Word document, Pages opens it. I'm looking for a way to change that file association back to Word. Here's the kicker--I need it to be command line.
    An invocation of "man -k plist" results in a mention of something called "PlistBuddy", which can "read and write values to plists". It has its own man page in section 8, evidently the "BSD System Manager's Manual". Unfortunately, it's not on the path on my system nor in the Developer hierarchy. Perhaps you can find a copy somewhere.
    Using the Property List Editor to open ~/Library/Preferences/com.apple/LaunchServices.plist shows a number if entries, each containing items "LSHandlerContentType" and "LSHanderRoleAll". The last one on my system has values of "com.microsoft.work.doc" and "com.microsoft.word". So one part of the exercise would be to identify exactly what values to put in that file for Word.

  • C++ mac compiler

    Just started a beginning C++ class. the instructor is assuming use of windows and visual studio. (which i know hardly anything about)
    however I'd like to learn how to do this on my mac as well as that is where i want to be in the long run even though i'm stuck in windows for the class.
    so is there a good free C++ compiler for mac??? i'm using a powerbook g4 and 10.3.9
    any recommendations??
      Mac OS X (10.3.9)  

    Kevin--
    interesting that xcode can't be dragged to the trash
    to delete it. In the spirit of learning, is there
    anything you can tell me briefly as to why that is
    the case
    When you install the developer tools, there are a bunch of support files that get installed as well. And they're kind of splattered in different places around the computer. Some go in the /Developer hierarchy. Others go in /System/Library/Framworks. And there are still others. So that's why you need an uninstall script.
    and under what circumstance (besides needing
    drive space) someone would want to delete it.
    I suppose it's possible that you might need to revert to a previous version if you had a really complex project that wouldn't build because of some changes in an update. Or maybe there's a bug in a framework in one version of the tools, but not another. But probably the most common reason is just to get the disk space back.
    charlie

  • How to download hierarchy from production system & recreate it development.

    Hi Gurus,
    I am working on a requirement where the updated hierarchy is present in production system & I have to create the same hierarchy with the same data in development system.
    Could you please suggest me the best way to download the same hierarchy in a file from production & create it in development system with the same data.
    Thanks & Regards
    Mayank Tyagi

    it is solved now!!!!!
    Thanks alott....

  • Hierarchy transport from developement to Quality?

    Dear SDN,
    Hierarchy transport from developement to Quality.
    I have created one balance sheet Hierarchy on 0Account infoobject.
    Could you please tell me how to transport hierarchy from development to Quality.
    Waiting for response.
    Thanks & Regards,
    Kiran

    Hi Kiran,
    Kiran Hierarchy data can be loade from source system, flat file or manually maintained in system.
    since you have done manulally you can do the same in other  systems also, but you need authrizations to maintain manually
    I have manually created my balance sheet hierarchy using RSH1 transaction code.
    you have do the same in quality also, since all required infoobjects are available in quality system, manulally create balance sheet hierarchy using RSH1 transaction code in Quality system.
    check whether you have authorization to manually create in Quality system. you have to do the same procedure in production also i guess.
    Regards
    Daya Sagar

  • Problem with image in Hierarchy Viewer component

    Hi All,
    I am using Hierarchy Viewer component in my application developed in Jdeveloper 11.1.1.6.0
    Actually, my requirement is to pick the name of the "content id" stored as a value in a field in the table. Hence written code as follows, which is not showing the image.
    <af:image id="img3"
    inlineStyle="border-color:Black; border-width:1px; width:85px;height:120px;"
    source="#{documentsService.latestReleasedVersionURL['UUCM#dDocName:#{node.EmpImage}']}"
    rendered="true"/>
    Please help me out ....
    Thanks & Regards
    Sneha
    Edited by: 1002482 on Jun 6, 2013 12:46 AM
    Edited by: 1002482 on Jun 6, 2013 12:48 AM

    Timo,
    It is supposed to pick up the image from the content server and display on the page.
    I have tried the following, it worked.
    1) Checked in the image in the content server with content id : SAMPLE_IMG
    2) modified the code as
    <af:image id="img3"
    inlineStyle="border-color:Black; border-width:1px; width:85px;height:120px;"
    source="#{documentsService.latestReleasedVersionURL['UUCM#dDocName:SAMPLE_IMG']}"
    rendered="true"/>
    Now that, I want to store the value "SAMPLE_IMG" in a field in a table, and want my application to pick up that value.
    Sneha

  • Standard SAP report for vendor hierarchy

    Hi Gurus,
    Does SAP have standard report for vendor hierarchy?  We want to use vendor hierarchy to capture all the expense to a list of vendors and wondering if we can utilize some standard report to see the total supply or we should develop custom reports to handle them?
    Thanks a lot

    Hi,
    Check this link
    http://help.sap.com/saphelp_45b/helpdata/en/12/084635470311d1894a0000e8323352/frameset.htm
    Thanks
    suresh

  • Top_of_page is not working in ALV hierarchy?

    Hi,
          I have written following code for top_of_page using event but which is not working...This report is developed for interactive report.
    Note: passed the it_events into ALV hierarchy functional module.
    FORM build_event_tab .
       CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
         EXPORTING
           i_list_type = 1
         IMPORTING
           et_events   = it_events[].
       READ TABLE it_events INTO wa_events WITH KEY form = 'TOP_OF_PAGE'.
       IF sy-subrc = 0.
         wa_events-form = 'TOP_OF_PAGE'.
         APPEND wa_events TO it_events.
       ENDIF.
    ENDFORM. "Get_events
    FORM top_of_page USING document TYPE REF TO cl_dd_document.
       DATA: dl_text(255) TYPE c,
             lv_cutime TYPE sy-uzeit,
             lv_cudt(20) TYPE c.
       lv_cudt = sy-datum.
    *--Passing Date----*
       WRITE  lv_cudt TO dl_text.
       CONCATENATE 'Date : ' lv_cudt+6(2) '-'
                             lv_cudt+4(2) '-'
                             lv_cudt+0(4) INTO dl_text.
       CALL METHOD document->add_text
         EXPORTING
           text = dl_text.
       CLEAR : dl_text.
       CALL METHOD document->add_gap
         EXPORTING
           width = 50.
       WRITE 'Company Name' TO dl_text.
       CALL METHOD document->add_text
         EXPORTING
           text         = dl_text
           sap_emphasis = cl_dd_area=>heading
           sap_style    = cl_dd_area=>heading
           sap_color    = cl_dd_area=>list_total_inv.
       CLEAR : dl_text.
       CALL METHOD document->add_gap
         EXPORTING
           width = 150.
       lv_cutime = sy-uzeit.
       CONCATENATE 'Time : ' lv_cutime+0(2) ':'
                             lv_cutime+2(2) ':'
                             lv_cutime+4(2) INTO dl_text.
       CALL METHOD document->add_text
         EXPORTING
           text = dl_text.
       CALL METHOD document->add_gap
         EXPORTING
           width = 60.
       WRITE 'Title' TO dl_text.
       CALL METHOD document->add_text
         EXPORTING
           text         = dl_text
           sap_emphasis = cl_dd_area=>heading
           sap_style    = cl_dd_area=>heading
           sap_color    = cl_dd_area=>list_total_inv.
       CLEAR : dl_text.
       CALL METHOD document->add_gap
         EXPORTING
           width = 50.
    ENDFORM.                    "html_top_of_page
    Thanks
    Shree

    PERFORM build_fieldcat.
      PERFORM build_event_tab.
      PERFORM alv_display.
    *---Build fieldcat
    FORM build_fieldcat.
      wa_fieldcat-tabname = 'IT_VENDOR'.
      wa_fieldcat-fieldname = 'LIFNR'.
      wa_fieldcat-col_pos   = '2'.
      wa_fieldcat-seltext_l = 'SUPPLIER'.
      wa_fieldcat-outputlen = 20.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_VENDOR'.
      wa_fieldcat-fieldname = 'NAME1'.
      wa_fieldcat-col_pos   = '2'.
      wa_fieldcat-seltext_l = 'VENDOR NAME'.
      wa_fieldcat-outputlen = 40.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'WERKS'.
      wa_fieldcat-col_pos   = '1'.
      wa_fieldcat-seltext_l = 'Plant'.
      wa_fieldcat-outputlen = 5.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'AWKEY'.
      wa_fieldcat-col_pos   = '2'.
      wa_fieldcat-seltext_l = ' Document'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-outputlen = 16.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'BELNR'.
      wa_fieldcat-col_pos   = '3'.
      wa_fieldcat-seltext_l = 'A/c Document'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-outputlen = 16.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'BUDAT'.
      wa_fieldcat-col_pos   = '4'.
      wa_fieldcat-seltext_l = 'PJ Date'.
      wa_fieldcat-outputlen = 16.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'XBLNR'.
      wa_fieldcat-col_pos   = '5'.
      wa_fieldcat-seltext_l = 'Inv'.
      wa_fieldcat-outputlen = 16.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'BLDAT'.
      wa_fieldcat-col_pos   = '6'.
      wa_fieldcat-seltext_l = 'PJ Date'.
      wa_fieldcat-outputlen = 16.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'DMBTR'.
      wa_fieldcat-col_pos   = '7'.
      wa_fieldcat-seltext_l = 'Bill.Amount'.
      wa_fieldcat-outputlen = 19.
      wa_fieldcat-do_sum   = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'IT_FINAL'.
      wa_fieldcat-fieldname = 'HKONT'.
      wa_fieldcat-col_pos   = '8'.
      wa_fieldcat-seltext_l = 'Cost Ctr'.
      wa_fieldcat-outputlen = 16.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    "Build_fieldcat
    *----ALV Display-----*
    FORM alv_display.
      key-header01 = 'LIFNR'.
      key-item01   = 'LIFNR'.
      DELETE ADJACENT DUPLICATES FROM it_vendor.
      DELETE ADJACENT DUPLICATES FROM it_final.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'PFSTATUS'
          it_fieldcat              = it_fieldcat[]
          i_tabname_header         = 'IT_VENDOR'
          i_tabname_item           = 'IT_FINAL'
          it_events                = it_events[]
          is_keyinfo               = key
        TABLES
          t_outtab_header          = it_vendor[]
          t_outtab_item            = it_final[].
    ENDFORM.                    "alv_display
    *----interactive method--
    FORM user_command USING r_ucomm TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          READ TABLE it_final INTO wa_final INDEX rs_selfield-tabindex.
          IF sy-subrc = 0.
            IF rs_selfield-fieldname = 'BELNR'.
              SET PARAMETER ID 'BLN' FIELD wa_final-belnr.
              SET PARAMETER ID 'BUK' FIELD pa_bukrs.
              SET PARAMETER ID 'GJA' FIELD pa_gjahr.
              CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
            ELSEIF rs_selfield-fieldname = 'AWKEY'.
              SET PARAMETER ID 'RBN' FIELD wa_final-awkey.
              SET PARAMETER ID 'GJR' FIELD pa_gjahr.
              CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
            ELSEIF rs_selfield-fieldname = 'LFBNR'.
              SET PARAMETER ID 'BLN' FIELD it_bsak-lfbnr.
              SET PARAMETER ID 'BUK' FIELD pa_bukrs.
              SET PARAMETER ID 'GJA' FIELD pa_gjahr.
              CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
            ELSEIF rs_selfield-fieldname = 'EBELN'.
              SELECT SINGLE
                     ebeln
                     INTO wk_ebeln
                     FROM ekko
                     WHERE ebeln = it_bsak-ebeln
                     AND bstyp = 'F'.
              IF sy-subrc EQ 0.
                SET PARAMETER ID 'BES' FIELD it_bsak-ebeln.
                CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
              ELSE.
                SET PARAMETER ID 'VRT' FIELD it_bsak-ebeln.
                CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
              ENDIF.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    FORM pfstatus USING ut_extab TYPE slis_t_extab.
      SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'.
    ENDFORM.                    "pfstatus
    *---Authorization check---
    FORM bukrs_check.
      SELECT SINGLE
             butxt "Name of the Company Code / Company
             ort01 "City
             INTO (wk_company, wk_city) FROM t001
             WHERE  bukrs = pa_bukrs.
      IF sy-subrc <> 0.
        MESSAGE 'create your own message' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " BUKRS_CHECK
    FORM build_event_tab.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = it_events[].
      READ TABLE it_events INTO wa_events
         WITH KEY name = 'SLIS_EV_TOP_OF_PAGE'.
      IF sy-subrc = 0.
        wa_events-form = 'TOP_OF_PAGE'.
        MODIFY it_events FROM wa_events INDEX sy-tabix.
      ENDIF.
      READ TABLE it_events INTO wa_events WITH KEY name =
                    'SLIS_EV_END_OF_PAGE'.
      IF sy-subrc = 0.
        wa_events-form = 'END_OF_PAGE'.
        MODIFY it_events FROM wa_events INDEX sy-tabix.
      ENDIF.
    ENDFORM. "Get_events
    FORM end_of_page.
      DATA: it_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader.
      wa_header-typ = 'S'.
      wa_header-key = 'MATERIAL'.
    *  wa_line-info = p1.
      APPEND wa_header TO it_header.
      CLEAR wa_header.
    *  READ TABLE it_maktx WITH KEY matnr = p1.
      wa_header-typ = 'S'.
      wa_header-key = 'DESCRIPTION'.
    *  wa_line-info = it_maktx-maktx.
      APPEND  wa_header TO it_header.
      CLEAR wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
         EXPORTING
    *      i_logo             = 'ENJOYSAP_LOGO'
           it_list_commentary = it_header.
    ENDFORM.                    "END_OF_PAGE
    FORM top_of_page USING document TYPE REF TO cl_dd_document.
      DATA: dl_text(255) TYPE c,
            lv_cutime TYPE sy-uzeit,
            lv_cudt(20) TYPE c.
      lv_cudt = sy-datum.
    *--Passing Date----*
      WRITE  lv_cudt TO dl_text.
      CONCATENATE 'Date : ' lv_cudt+6(2) '-'
                            lv_cudt+4(2) '-'
                            lv_cudt+0(4) INTO dl_text.
      CALL METHOD document->add_text
        EXPORTING
          text = dl_text.
      CLEAR : dl_text.
      CALL METHOD document->add_gap
        EXPORTING
          width = 50.
      WRITE 'INCAP CON MFG SER (P) LTD' TO dl_text.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_style    = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_total_inv.
      CLEAR : dl_text.
      CALL METHOD document->add_gap
        EXPORTING
          width = 150.
      lv_cutime = sy-uzeit.
      CONCATENATE 'Time : ' lv_cutime+0(2) ':'
                            lv_cutime+2(2) ':'
                            lv_cutime+4(2) INTO dl_text.
      CALL METHOD document->add_text
        EXPORTING
          text = dl_text.
      CALL METHOD document->add_gap
        EXPORTING
          width = 60.
      WRITE 'Purchase Journal' TO dl_text.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_style    = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_total_inv.
      CLEAR : dl_text.
      CALL METHOD document->add_gap
        EXPORTING
          width = 50.
    ENDFORM.                    "html_top_of_page

  • VISA Write differs between TS Development System and LV Run-Time Engine

    Hi all
    I made an application on LabVIEW to test BERs (Bit Error Rates), and I used VISA Write between two COM ports to exchange data.
    Everything works fine using just LabVIEW.
    Afterwards, I used TestStand to call my application (VI). The LabVIEW adapters from TestStand were set to Development System by default, and everything works OK!!
    Finally, I needed to disable the development system, and set the LabVIEW adapters from TestStand to LabVIEW Run-Time Engine and I notice that the speed of the data exchange between the two COM ports decreased dramatically.
    The only difference was the speed...because all the data (changed slowly in this case) arrived correctly on the other COM port too.
    The symptom was the same as decreasing the baud rate...but the baud rate and all the other configurations remained the same. The only difference was the change between Develpment System to Run-Time Engine to notice this decreased speed between the exchanged data using VISA Write.
    Any solutions for this?
    Thanks in advance
    Joao
    Solved!
    Go to Solution.

    Joao,
    you state that using the LV Developement System as execution platform for your LV code modules result in faster datatransfer between the COM ports than using the LV Run-Time Engine.
    So i am pondering: Does this refer to TS at all?
    Please check the following:
    Run you communication using a sole LV application in LV Developement System. This should be fast. Now build an executable of this application and run that one. Do you see the same behavior?
    If there is no difference in a sole LV approach, there have to be some settings in the TS approach making this slow. So please let us know:
    Are there different modules involved in that data transfer (which in fact points to the reply Christophe made)?
    What about loading/unloading options of the modules?
    How big is the hierarchy of the modules, e.g. is it necessary for the RTE to load stuff the Dev Env has already in memory due to loading a lvproj.......?
    Could you provide a simple example sequence+modules showing this behavior?
    What versions of LV and TS are you using?
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Bex Hierarchy issue on Webi report

    Hello Experts,
    We are facing issues on use of Bex hierarchy in webi report,
    Issue statement: We have webi report on bex query which have table and chart with input control on year and month to filter the report, table and chart uses hierarchy object to disply data. When we refresh report table and chart shows data with hierarchy on first level but once we check or uncheck any value from input control hierarchy in table and chart gets expanded and shows as flat structure. to get correct behaviour we have to collaps hierarchy.
    Above behaviour happens for all report level filter like, block filter, drill filter, input control.
    Please help me to know this is a bug or something wrong happened with development.
    Regards,
    Priyank Bhayani

    Hello Everyone,
    I have got SAP note which states this is expected behaviour hence closing the discussion.
    1702356 - Hierarchy Nodes expanded automatically to all levels after selecting value in the input control in a webi report.
    Regards,
    Priyank Bhayani

  • Hierarchy Analysis Authorization does not work after transport

    Hi Gurus,
    I am facing a issue in hierarchy analysis authorization in quality system but the same authorization works perfectly fine in development.
    All hierarchy authorizations works in Quality except for this one. I found one old sap note describing this as program error but this note is not applicable in BW 7.3.
    I have checked the table RSECVAL, RSECHIER and authorization is active so everything looks good. Please advise if anyone faced this issue after transporting hierarchy auths to other systems
    Regards,
    Salman

    Salman,
    What I understood from your description is that you have same role+AA in Dev and QA, which provides access in Dev for all the nodes for said hierarchy but in QA, same role+AA provides access to the same hierarchy for all the nodes but one. Try to create a ZTEST analysis authorization in QA itself with access for the problematic hierarchy node and see if it works ? This will rule out the case if there is a difference in hierarchy in DEV & QA.
    Regards,
    Shivraj Singh

  • [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 can I hide a subvi in the hierarchy window?

    I want to hide a subvi of my top level vi in the hierarchy window. I know by calling it dynamically that it won't be in the hierarchy window until it is called but I want to keep it in the hierarchy. I just don't want to display it in the hierarchy window when a user looks at it. Kinda like an easter egg or like the multitude of vi's that NI hides. Can anyone give me a solution?
    BJD1613
    Lead Test Tools Development Engineer
    Philips Respironics
    Certified LV Architect / Instructor

    This is from the 1/14/03 info-labview digest:
    Hi, Tim
    As you know, to distinguish between public and private methods, GOOP uses the LLB-top-level flag. Public methods are top-level and private method are non-top level.
    But GOOP does one more thing with private method VIs. They are checked as "System VI", a property which make them invisible in the VI hierarchy and in the "VIs in Memory" application property, unless their panels are open. You can upgrade to the new GOOP wizard, downloadable from http://www.endevo.com/default.asp?lang=eng. It doesn't check VIs as system VIs. It is compatible backwards, so perhaps you can "repair" your existing GOOP objects if you use the new wizard, but I'm not sure. S
    ince you can store objects in both directories and in LLBs with the new wizard, perhaps it helps to convert from LLB to directory and back to LLB again.
    If the above doesn't work, you can use these two VIs to uncheck the "System VI" property:
    1) C:\PROGRAM\National Instruments\LabVIEW 6\project\goopwiz.llb\Hide System VIs.vi
    2) C:\PROGRAM\National Instruments\LabVIEW 6\vi.lib\utility\libraryn.llb\Librarian List.vi
    Use (2) to create a list of VIs in your GOOP object LLB. Then loop through all the VIs and use (1) to uncheck the property.
    If you want to read more about this, you can search for the string "Invisible VI ?!?" in http://www.searchview.net/, during 2001, in the info-labview archives. Then read the postings with the subject "Invisible VI ?!?".
    Hope this was helpful!
    Andreas

Maybe you are looking for