Deleting hierarchy using IM22

Hi,
I am trying to use IM22 for deleting investment program hierarchy.When I do a BDC recording i get the nodes in terms of numbers ie like 05/16 guess the positions.Is there any way of identifying the posid for the corresponding so that I can generalise.
Thanks
Shyam

Folks....
Can I have some help on the above pls!!!!!!

Similar Messages

  • BP group hierarchy - delete hierarchy trees?

    Hello,
    I would like to delete hierarchy trees in transaction BPH, but I haven't found any function to do this. Is there a special program or report to delete a hierarchy tree completely or any other possibility to clean hierarchy trees?
    Thanks for helping!
    Regards,
    Georg

    Hi,
    This might help.
    http://help.sap.com/saphelp_crm40/helpdata/en/ae/b7cc9737a5442e83355df3c61a51c3/content.htm
    Usually you don't delete hierarchy tree, but stop using it by manipulating validity dates.
    Hope it helps.
    Regards,
    Kaushal

  • Not able to view Characteristic Hierarchy using Tcode KES3

    Hi everyone,
    I need to view the Characteristic Hierarchy using T-code KES3 in CO-PA. Ideally, once we are into KES3 screen, we need to select the characteristic and variant to display the hierarchy. But, when I select the characteristic and variant, it says that "Hierarchy doesn't exist".
    However, when I create a report for that particular characteristic using T-code KE31, I am able to view the hierarchy for that characteristic there.
    Can anyone please help me in this regard that why the characteristic hierarchy is not available in KES3, while it's picking up the hierarchy at the time of report creation.
    Thanks.
    Regards,
    Gaurav Tibrewal

    Hi Nikolas,
    I want to see the hierarchy of "Business Unit" characteristic. This characteristic is being maintained under "Referenced Characteristic" in T-code KE31. This characteristics is being maintained in Profitability Analysis (T-code KEA5).
    Also, I am not able to derive the source where the hierarchy is being maintained for that characteristic. Because, if hierarchy is coming while creating CO-PA reports. they must be maintained somewhere.
    Please let me know if you need any further input.
    Regards,
    Gaurav

  • Building Tree hierarchy Using nested loops and class cl_gui_column_tree

    Hello gurus,
    I want to create a tree report using custom container and class cl_gui_column_tree. I have read and understood the standard demo report which SAP has provided i.e. SAPCOLUMN_TREE_CONTROL_DEMO. But in this report all the levels nodes are created as constants and hardcoded. I want to create hierarchy using nested loops. For this i took one example of a hierarchy of VBAK-VBELN->VBAP-POSNR Like One sales order has many line items and each line item can have number of line items in billing plan.
    I have done some coding for it.
    FORM build_tree USING node_table TYPE treev_ntab
                                           item_table TYPE zitem_table.              " i created the zitem_table table type of mtreeitm in SE11.
      DATA: node TYPE treev_node,
                 item TYPE mtreeitm.
      node-node_key = root.
      CLEAR node-relatkey.
      CLEAR node-relatship.
      node-hidden = ' '.
      node-disabled = ' '.
      CLEAR node-n_image.
      CLEAR node-exp_image.
      node-isfolder = 'X'.
      node-expander = 'X'.
      APPEND node TO node_table.
      item-node_key = root.
      item-item_name = colm1.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Root'.
      APPEND item TO item_table.
      item-node_key = root.
      item-item_name = colm2.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Amount'.
      APPEND item TO item_table.
      LOOP AT it_vbeln INTO wa_vbeln.
        node-node_key = wa_vbeln-vbeln.
        node-relatkey = root.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = 'X'.
        node-expander = 'X'.
        APPEND node TO node_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-vbeln.
        APPEND item TO item_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-netwr.
        APPEND item TO item_table.
        LOOP AT it_posnr INTO wa_posnr.
        node-node_key = wa_posnr-posnr.
        node-relatkey = wa_vbeln-vbeln.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = ' '.
        node-expander = ' '.
        APPEND node TO node_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-posnr.
        APPEND item TO item_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-netpr.
        APPEND item TO item_table.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.
    Now this program compiles fine and runs till there is only one level. That is root->vbeln. But when i add one more loop of it_posnr it gives me runtime error of message type 'X'. The problem i found was uniqueness of item-item_name as all the sales order have posnr = 0010. What could be done? I tried giving item_name unique hierarchy level using counters just like stufe field in prps eg. 10.10.10, 10.10.20,10.20.10,10.20.20,20.10.10 etc.. etc.. but still i am getting runtime error when i add one more hierarchy using nested loop. Plz guide.
    Edited by: Yayati6260 on Jul 14, 2011 7:25 AM

    Hello all,
    Thanks the issue is solved. The node key was not getting a unique identification as nodekey. I resolved the issue by generating unique identification for each level. Thanks all,
    Regards
    Yayati Ekbote

  • Can I sync email between iPad mini, iPad, and MacBook so that if I delete email using one device, it will also be deleted from the other two?

    Can I sync email between iPad mini, iPad, and MacBook so that if I delete email using one device, it will also be deleted from the other two?

    You have to set up the email account using IMAP instead of POP.
    What type of email address is it? Yahoo, hotmail, gmail, etc?
    ~Lyssa

  • IPhone 6 won/t delete photos using iPhoto

    iPhone 6 won/t delete photos using iPhoto

    They are on the phone. I import them as usual, and then select to delete them off the phone. Then iPhoto says "deleting" but then the photos never come off of the phone.

  • I have entered a incorrect email address, so cannot update an app I purchased. The email does not exist. How do I delete and use my primary Apple ID

    I have used an incorrect email address for my Apple ID  when I punched an App. Cannot get updates. How do I delete and use my primary account email address?

    Delete and redownload that application when signed into the correct Apple ID. This may require repurchasing it.
    (127051)

  • Delete not using indexes

    Hi, I'm a fairly new user of Oracle XMLDB 9.2.0.4 so please bear with me. I registered a schema and inserted about 130k rows into an XMLType table. Retrieval time took a severe hit as expected, but I created some indexes and it seemed to solve the problem. Autotrace showed that indexes were working correctly.
    However, delete does not seem to use those indexes, and instead performs a full table scan. The only difference between the statements used were:
    SELECT * FROM <table> where existsNode(...)
    DELETE FROM <table> where existsNode(...)
    Does anyone know how to alleviate full table scans on deletes?
    Thanks in advance,
    Justin

    Thanks for your time Mark.
    I messed around with 9.2.0.4 a little more, and realized that delete will use the index if it's an element that is indexed (like your example pointed out). However, delete doesn't seem to use indexed attributes.
    (Deleting based on an indexed element)
    explain plan for
    delete
    from purchaseorder x
    where existsNode ( value(x), '/PurchaseOrder/LineItems/LineItem[@ItemNumber="1"]/Part[@Id="715515011129"]') = 1
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | DELETE STATEMENT | | 1 | 19946 | 1 |
    | 1 | DELETE | PURCHASEORDER | | | |
    |* 2 | TABLE ACCESS BY INDEX ROWID| PURCHASEORDER | 1 | 19946 | 1 |
    |* 3 | INDEX RANGE SCAN | IPURCHASEORDERUSER | 2 | | 1 |
    (retrieving based on an indexed attribute)
    explain plan for
    select value(x)
    from purchaseorder x
    where existsNode ( value(x), '/PurchaseOrder/LineItems/LineItem[@ItemNumber="1"]/Part[@Id="715515011129"]') = 1
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 1 | 24142 | 6 |
    |* 1 | INDEX RANGE SCAN | SYS_IOT_TOP_35381 | 1 | 2038 | 2 |
    |* 2 | INDEX RANGE SCAN | SYS_IOT_TOP_35386 | 1 | 4214 | 2 |
    | 3 | NESTED LOOPS | | 1 | 24142 | 6 |
    | 4 | SORT UNIQUE | | | | |
    |* 5 | INDEX UNIQUE SCAN | SYS_IOT_TOP_35386 | 1 | 4216 | 2 |
    |* 6 | INDEX RANGE SCAN | ILINEITEMPARTNUMBER | 1 | | 2 |
    |* 7 | TABLE ACCESS BY INDEX ROWID| PURCHASEORDER | 4 | 79704 | 1 |
    |* 8 | INDEX UNIQUE SCAN | SYS_C003455 | 102 | | |
    Predicate Information (identified by operation id):
    1 - access("SYS_NT5e0stCgbSQ6Dg7Md7+/Y0A=="."NESTED_TABLE_ID"=:B1)
    2 - access("SYS_NTyLtUmo5HRjCEB+0PWmS+kA=="."NESTED_TABLE_ID"=:B1)
    5 - access("SYS_NTyLtUmo5HRjCEB+0PWmS+kA=="."ITEMNUMBER"=1)
    filter("SYS_NTyLtUmo5HRjCEB+0PWmS+kA=="."SYS_NC00011$"='715515011129')
    6 - access("SYS_NTyLtUmo5HRjCEB+0PWmS+kA=="."ITEMNUMBER"=1)
    7 - filter(SYS_CHECKACL("SYS_ALIAS_4"."ACLOID","SYS_ALIAS_4"."OWNERID",xmltype(''<
    privilege xmlns="http://xmlns.oracle.com/xdb/acl.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/xdb/acl.xsd
    http://xmlns.oracle.com/xdb/acl.xsd DAV:http://xmlns.oracle.com/xdb/dav.xsd"><read-pr
    operties/><read-contents/></privilege>''))=1)
    8 - access("SYS_NTyLtUmo5HRjCEB+0PWmS+kA=="."NESTED_TABLE_ID"="SYS_ALIAS_4"."SYS_N
    C0003400035$")
    Note: cpu costing is off
    (Deleting based on indexed attribute)
    explain plan for
    delete
    from purchaseorder x
    where existsNode ( value(x), '/PurchaseOrder/LineItems/LineItem[@ItemNumber="1"]/Part[@Id="715515011129"]') = 1
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | DELETE STATEMENT | | 1 | 19946 | 13 |
    | 1 | DELETE | PURCHASEORDER | | | |
    |* 2 | FILTER | | | | |
    |* 3 | TABLE ACCESS FULL | PURCHASEORDER | 1 | 19946 | 2 |
    |* 4 | COLLECTION ITERATOR PICKLER FETCH| | | | |
    Predicate Information (identified by operation id):
    2 - filter( EXISTS (SELECT /*+ */ 0 FROM
    TABLE(SYS_OP_ATG(SYS_OP_ATG(:B1,10,11,3),2,3,3)) "KOKBF$" WHERE
    SYS_OP_ATG(VALUE(KOKBF$),2,3,2)=1 AND SYS_OP_ATG(SYS_OP_ATG(VALUE(KOKBF$),4,5,3),2,3,2
    )='715515011129'))
    3 - filter(SYS_CHECKACL("SYS_ALIAS_4"."ACLOID","SYS_ALIAS_4"."OWNERID",xmltype(''<p
    rivilege xmlns="http://xmlns.oracle.com/xdb/acl.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/xdb/acl.xsd
    http://xmlns.oracle.com/xdb/acl.xsd DAV:http://xmlns.oracle.com/xdb/dav.xsd"><update/>
    <unlink-from/></privilege>''))=1)
    4 - filter(SYS_OP_ATG(VALUE(KOKBF$),2,3,2)=1 AND
    SYS_OP_ATG(SYS_OP_ATG(VALUE(KOKBF$),4,5,3),2,3,2)='715515011129')
    Note: cpu costing is off
    Thanks again,
    Justin

  • Problem deleting rows using JDBC

    Hi,
    I have a problem with the following code listed below. I am attempting to delete a user's details from a SQLServer db based on the user selected from a combobox. The code given below is just a section and relates to a JButton I have on the application that performs the delete command.
    public void deleteButton_actionPerformed(ActionEvent e) {
    try{
    String opName = (String)userNameBox.getSelectedItem();
    String deleteQuery = "select * from Operator where OperatorName = " + "'"+opName+"'";
    //Load Database Driver Class
    Class.forName(JDBC_DRIVER);
    //Establish a connection to the Database
    connection = DriverManager.getConnection(DATABASE_URL);
    //Create Select statement for returning all usernames to the combobox
    statement2 = connection.createStatement(java.sql.ResultSet.TYPE_SCROLL_SENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
    //dQuery.setString(1,opName);
    resultSet = statement2.executeQuery(deleteQuery);
    while (resultSet.next()){
    resultSet.deleteRow();
    catch(Exception exception){
    exception.printStackTrace();}
    To explain the code, to begin with a String holds the value of the selected field of the combobox i have in my app. I have the SQL select statement the using this variable as the where clause.
    The usual connection and statement objects are declared etc and then the query is executed. Within the While loop I then attempt to delete the row that the query has retrieved for me. However this results in the following error.
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid attribute/option identifier
    Any help is much appreciated.
    Thanks
    Alan

    Thanks for the reply. I understand your comment about
    using the delete statement and it seems I am making
    an obvious error. However I was using the select
    statement to generate a resultSet object with which I
    can delete elements from. Hence the reason for the
    use of the select statement.This is brain dead, the classic newbie mistake. The database vendor has optimized their code more than you ever will in making those deletes, so use their code. Not only will they do it faster than you will, but you'll save yourself (n+1) network roundtrips (1 for the SELECT, 1 for each DELETE you issue). Better to learn SQL and use a WHERE clause to do it on the database side.
    You have however solved the problem I had with
    directly executing the delete statement as an SQL
    String. I was using the following statement:
    String deleteQuery = "select * from Operator where
    OperatorName = " + "'"+opName+"'";
    The wildcard character is not required and it was
    this that gave me problems and made me look to using
    a select query and deleting results from a
    resultSet.Sounds like you need a SQL book. I recommend "SQL For Smarties".
    %

  • How to delete term using powershell?

    Hello
    I want to delete a particular term from termstore. I dont have termset name. Without termset name how can I delete term using powershell?
    Avi

    If you don't know the termset net it makes it tricky.
    In theory if you know the name of the term you could look through all termsets to find it. The catch of course is to ensure there is only one instance of the term otherwise you may delete terms you need.
    Which version of SharePoint?
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • How to delete database using sql

    I have to delete some databases from oracle 8i. I tried it using the Database Configuration Assistant and I get stuck indefinately as the message always says connecting but nothing happens.
    How can I delete databases using sql not thru the DCA?
    Thanks

    files related to the database and follow these steps:
    1.- shutdown the database
    2.- Delete all files ( Control Files, .dbf, Redo's, Archive�s, parameter file, password file )
    3.- Delete the entrance of this database from
    listener.ora and from tnsnames.ora files.
    and that's it.
    Joel P�rez

  • How to delete PostOffice using AdminTypeLibrary (C#)

    Is there any way to delete PostOffice using Admin Object API?
    Thank you in advance.
    Kahren

    In article <pus1d.8585$[email protected]>, kallak2000
    @hotmail.com says...
    > Is there any way to delete PostOffice using Admin Object API?
    >
    > Thank you in advance.
    >
    > Kahren
    >
    >
    >
    Hello, Kahren.
    Because of all the steps actually involved, and the complexity it is not
    possible to delete or create Post Offices, Domains or MTAs with the
    APIs.
    Regards,
    Shane

  • Is there possibility to add dimension value into hierarchy using dml or spl

    1 Is there possibility to add dimension value into hierarchy using dml or spl?
    If such possibility exists how to do that.
    2 Is it possible to sort dimension values inside one branch of the hierarchy?

    What version of OLAP are you using and how did you create your AW (e.g., AWM)?
    Assuming that you're used either AWM or the Java API for AWs in 10g, there isn't an OLAP DML for adding a dimension member to a dimension (and have all the meta data kept in sync); you must load dimension members using AWM the Java API for AWs.
    So, make your changes in the the dimension table and process that table.
    For sorting, you can add a sort attribute to the dimension. Add the sort attribute to the model, indicate that it's used for sorting, add the sort attribute to your dimension table and maintain the dimension.

  • ALV Tree Hierarchy using OOPS

    Hi all,
    I have developed a program for ALV Tree Hierarchy using OOPs.I followed the SAP demo program.I am not able to get the values in the output.Please can anyone guide me where to correct my program. I am placing the entire code so that you all can also debug and see what is wrong.
    *& Report  ZZHIERARCHY_TEST1
    REPORT  zzhierarchy_test1.
    DATA : alv_container TYPE REF TO cl_gui_custom_container,
           alv_tree      TYPE REF TO cl_gui_alv_tree,
           gt_fcat          TYPE lvc_t_fcat,
           gt_vbrk TYPE vbrk OCCURS 0.                             "Output Table
    DATA : gs_hirarchy_header TYPE treev_hhdr.
    START-OF-SELECTION.
    END-OF-SELECTION.
      CALL SCREEN 9100.
    *&      Module  STATUS_9100  OUTPUT
    MODULE status_9100 OUTPUT.
      SET PF-STATUS 'ALV_TREE'.
      IF alv_container IS INITIAL.
        PERFORM tree_dev.
      ENDIF.
    ENDMODULE.                 " STATUS_9100  OUTPUT
    *&      Form  tree_dev
          text
    FORM tree_dev .
      DATA lv_container_name(20) TYPE c.
      lv_container_name = 'ALV_TREE'.
      CREATE OBJECT alv_container
        EXPORTING
          container_name              = lv_container_name
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CREATE OBJECT alv_tree
        EXPORTING
          parent                      = alv_container
          node_selection_mode         = cl_gui_column_tree=>node_sel_mode_single
          item_selection              = 'X'
          no_toolbar                  = ''
          no_html_header              = 'X'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          illegal_node_selection_mode = 5
          failed                      = 6
          illegal_column_name         = 7
          OTHERS                      = 8.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      PERFORM build_hirarchy_header CHANGING gs_hirarchy_header.
      PERFORM buid_fieldcatalog.
      CALL METHOD alv_tree->set_table_for_first_display
        EXPORTING
          is_hierarchy_header = gs_hirarchy_header
        CHANGING
          it_outtab           = gt_vbrk               "Table Must be Empty
          it_fieldcatalog     = gt_fcat.
      PERFORM create_hierarchy.
      CALL METHOD alv_tree->frontend_update.
    ENDFORM.                    " tree_dev
    *&      Form  build_hirarchy_header
         <--P_GS_HIRARCHY_HEADER  text
    FORM build_hirarchy_header  CHANGING p_gs_hirarchy_header TYPE treev_hhdr.
      p_gs_hirarchy_header-heading   =  'Company Code'(001).
      p_gs_hirarchy_header-tooltip   =  'Comapny Code'(002).
      p_gs_hirarchy_header-width     =   35.
      p_gs_hirarchy_header-width_pix =   ''.
    ENDFORM.                    " build_hirarchy_header
    *&      Form  buid_fieldcatalog
    FORM buid_fieldcatalog .
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
         i_structure_name             = 'VBRK'
        CHANGING
          ct_fieldcat                  = gt_fcat
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT gt_fcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'NETWR'.
            ls_fcat-do_sum = 'X'.
            ls_fcat-h_ftype = 'MAX'.
        ENDCASE.
        MODIFY gt_fcat FROM ls_fcat.
      ENDLOOP.
    ENDFORM.                    " buid_fieldcatalog
    *&      Form  create_hierarchy
    FORM create_hierarchy .
      DATA : lt_vbrk TYPE TABLE OF vbrk,
             ls_vbrk TYPE vbrk.
      DATA : top_key     TYPE lvc_nkey,
             company_key TYPE lvc_nkey,
             bzirk_key   TYPE lvc_nkey.
      DATA : lv_bukrs     TYPE bukrs,
             lv_bukrs_prv TYPE bukrs,
             lv_bzirk     TYPE bzirk,
             lv_bzirk_prv TYPE bzirk.
      SELECT * FROM vbrk INTO TABLE lt_vbrk UP TO 500 ROWS.
      SORT lt_vbrk BY bukrs .
      CALL METHOD alv_tree->add_node
        EXPORTING
          i_relat_node_key     = ''
          i_relationship       = cl_gui_column_tree=>relat_last_child
          i_node_text          = 'Company Code'
        IMPORTING
          e_new_node_key       = top_key
        EXCEPTIONS
          relat_node_not_found = 1
          node_not_found       = 2
          OTHERS               = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT lt_vbrk INTO ls_vbrk.
        lv_bukrs = ls_vbrk-bukrs .
        lv_bzirk = ls_vbrk-bzirk .
        IF lv_bukrs <> lv_bukrs_prv.
          lv_bukrs_prv =  lv_bukrs.
          PERFORM add_node USING lv_bukrs
                                 top_key
                        CHANGING company_key.
        ENDIF.
        IF lv_bzirk <> lv_bzirk_prv.
          lv_bzirk_prv = lv_bzirk.
          PERFORM add_posnr USING lv_bzirk
                                  company_key
                         CHANGING bzirk_key.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " create_hierarchy
    *&      Form  add_node
         -->P_LV_BUKRS  text
         -->P_TOP_KEY  text
         <--P_COMPANY_KEY  text
    FORM add_node  USING    p_lv_bukrs    TYPE bukrs
                            p_top_key     TYPE lvc_nkey
                   CHANGING p_company_key TYPE lvc_nkey .
      DATA: l_node_text TYPE lvc_value,
            ls_vbrk TYPE vbrk.
      l_node_text = 'Company' .
      CALL METHOD alv_tree->add_node
        EXPORTING
          i_relat_node_key     = p_top_key
          i_relationship       = cl_gui_column_tree=>relat_last_child
          is_outtab_line       = ls_vbrk
          i_node_text          = l_node_text
        IMPORTING
          e_new_node_key       = p_company_key
        EXCEPTIONS
          relat_node_not_found = 1
          node_not_found       = 2
          OTHERS               = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " add_node
    *&      Form  add_posnr
          text
         -->P_LV_POSNR  text
         -->P_COMPANY_KEY  text
         <--P_POSNR_KEY  text
    FORM add_posnr  USING    p_lv_bzirk    TYPE bzirk
                             p_company_key TYPE lvc_nkey
                    CHANGING p_bzirk_key   TYPE lvc_nkey.
      DATA ls_vbrk TYPE vbrk.
      CALL METHOD alv_tree->add_node
        EXPORTING
          i_relat_node_key     = p_company_key
          i_relationship       = cl_gui_column_tree=>relat_last_child
          is_outtab_line       = ls_vbrk
          i_node_text          = 'Sales District'
        IMPORTING
          e_new_node_key       = p_bzirk_key
        EXCEPTIONS
          relat_node_not_found = 1
          node_not_found       = 2
          OTHERS               = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " add_posnr
    *&      Module  USER_COMMAND_9100  INPUT
    MODULE user_command_9100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
      CALL METHOD alv_container->free.
      LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9100  INPUT

    Check this forum there are many threads on this.

  • Delete ccmcache used space

    Hi All
    I have a question regarding client cache removal using a powershell script calling a com object
    My C drive contains 18 GB free space
    Total CCM Cache in c:\windows\ccmcache size is 10240
    Free Space = 8713  and used space = 1527
    I used the following powershell script to remove used space by using DeleteCacheElement function
    Though all folders were removed in cache but I still see used space even after using the script
    May I know the reason and how to delete the used space
    $UIResourceMgr = New-Object -ComObject UIResource.UIResourceMgr
    $Cache = $UIResourceMgr.GetCacheInfo()
    $CacheElements = $Cache.GetCacheElements()
    foreach ($Element in $CacheElements)
            Write-Host "Deleting CacheElement with PackageID $($Element.ContentID)"
            Write-Host "in folder location $($Element.Location)"
     If (!(Test-Path $($Element.Location)))
       md $($Element.Location)
           $Cache.DeleteCacheElement($Element.CacheElementID)
    $Cache = $UIResourceMgr.GetCacheInfo()
    Write-Host "The total Cache size = $($Cache.TotalSize)"
    Write-Host "The total Cache free size after execution of script= $($Cache.FreeSize)"
    Write-Host "The total Cache used size after execution of script = $(($Cache.TotalSize) -($Cache.FreeSize))"

    Though all folders were removed in cache but I still see used space even after using the script
    How? Are you talking about this line of the script? Write-Host "The total Cache free size after
    execution of script= $($Cache.FreeSize)"
    Torsten Meringer | http://www.mssccmfaq.de

Maybe you are looking for

  • Trying to optimize this simple query

    Hi, I am trying to optimize this simple query but the two methods I am trying actually make things worse. The original query is: SELECT customer_number, customer_name FROM bsc_pdt_account_mv where rownum <= 100 AND Upper(customer_name) like '%SP%' AN

  • Mail- wrong sender address stuck in outgoing que that will never be sent

    I can't believe 'no one' has ever had this problem... When I got my new iPod I was of course excited, and messed up my Mail account sender address setup. Of course, I tried sending a couple of test E-mails before I figured it out. I 'fixed' it, now i

  • Problems with signatures and text tools

    When I open forms none of the 'fill and sign' 'comment' tools are available (all grayed out). Others in my office use these forms so it is particular to my software / machine. Any thoughts why these features are turned off / broken. I have completely

  • Dead bug behind screen!

    My ipod seems to have made a new friend! A small insect has somehow crawled into my ipod classic 160 (which has never been taken apart) and decided to die right in the middle of the screen. It seems quite stuck there and wont budge. I have even tried

  • Unable to SYNC with Yahoo

    Up until perhaps ten days ago, when I used BB Desktop Mgr to sync my Storm II with my Yahoo data, all was well. All of a sudden in the middle of the sync I get a message "CONNECTION TO YAHOO SERVER LOST". It seems not to be snyching my calendar data.