How to modify hierarchical data with JavaAPI?

Hi
we have a hierarchical structure for "Categories" of products. Its a simple Table of type "Hierarchy".
Now I need to add new entries to the Tree, or move existing entries to some different parents. But I can neither find a command like ModifyHierarchyTree nor is there a method to set the parent record on a HierNode instance.
How can I set the parent node of a hierarchy node with JavaAPI 2?
(Patch level is 5.5.42.65)
Thanks in advance!

Hi Roger,
I think you can modify the Data Groups hierarchy directly from within the Add Objects dialog, by clicking the Edit button to open the Edit Data Groups dialog and then using the context menu as in any editable tree to add siblings and children, and to delete and rename existing nodes
You can also edit the Data Groups hierarchy by choosing Objects ® Edit Data Groups from the main menu.
Whereas other trees allow non-unique node names as long as sibling nodes do not have the same name, data group names must be unique across the entire Data Groupshierarchy.
Hope it helped.
Regards,
Krutarth

Similar Messages

  • How to modify master data with BPS

    Hi experts,
    Our customer would like have the posibility to enable/disable the materials they are using for planning.
    Disabled materials should not be available for planning.
    To do that we are thinking in adding another characteristic into the cube as a flag to determinate which material is enable or disable, and later use that infoobject to filter the planning layout.
    We wonder how can we change the values for a characteristic using BPS. Is that possible? So far, we are only able to modify keyfigures.
    Thanks in advance,
    Pablo

    To disable a material from getting planned, proceed as follows:
    1. Have material in the area and also in level and package.
    2. Create a data slice on material and set the material that you wish not to be planned by the planners and save the model.
    This configuration will meet your requirements.
    Ravi Thothadri

  • How to validate a date with time

    Hi All,
    How can I validate date with time?
    Here is my code:
    var tempDate:Date = new Date();
    if (tempDate < '09/18/2012 7:30:00 AM'){
         doSomething
    Thanks in advanced

    I think i got it to work.
    var tempDate:Date = new Date();
    var oldDate:Date = new Date('09/18/2012 7:30:00 AM');
    if ( Number(tempDate) < Number(oldDate) ){
         doSomething
    Best,

  • How to seperate the data with comma seperator ??

    Hi,
      How to seperate the data with comma seperator ??
    E.g i havea row like
    Userid,number of days,Total Records
    user1,10,100000
    So,i will get 10,10000 in the same field and i need to seperate 10 and 10000 so what is the abap function for that
    Praff

    like this ...
    SPLIT field AT ',' INTO
       userid
       days
       records.
    is this what you need?
    Mike

  • How to delete hierarchical data?

    Hello,
    I have a table with hierarchical data. I want to delete data based on a condition, but maybe this condition is only present in the topmost hierarchy.
    In my example I have rows identified by id and a changed_by containing the id of the row that replaced (invalidated) this row. From these I want to delete data where descr in the leaf nodes is 'A'.
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    DROP TABLE test_del;
    CREATE TABLE test_del (
         CONSTRAINT pk_del PRIMARY KEY (id)
        ,id         NUMBER
        ,changed_by NUMBER
         CONSTRAINT fk_del
         REFERENCES test_del (id)
        ,descr      VARCHAR2(10)
    INSERT INTO test_del (id,changed_by,descr)
    VALUES (3,NULL,'A');
    INSERT INTO test_del (id,changed_by,descr)
    VALUES (2,3,'A');
    INSERT INTO test_del (ID,changed_by,descr)
    VALUES (1,2,NULL);
    INSERT INTO test_del (id,changed_by,descr)
    VALUES (6,NULL,'A');
    INSERT INTO test_del (id,changed_by,descr)
    VALUES (5,6,'A');
    INSERT INTO test_del (id,changed_by,descr)
    VALUES (10,NULL,'B');
    INSERT INTO test_del (id,changed_by,descr)
    VALUES (9,10,'B');
    INSERT INTO test_del (id,changed_by,descr)
    VALUES (8,9,'B');
    COMMIT;
    SELECT  *
    FROM    test_del
    CONNECT BY PRIOR id = changed_by
    START WITH descr = 'A' AND changed_by IS NULL;
            ID CHANGED_BY DESCR
             3            A
             2          3 A
             1          2
             6            A
             5          6 A
    DELETE FROM test_del WHERE descr = 'A';
    ORA-02292: integrity constraint (FE.FK_DEL) violated - child record found
    Of course I get ORA-02292 in this case, but how can I write a correct statement that deletes the data shown by the select?
    Regards
    Marcus

    You need to follow the hierarchy:
    DELETE FROM test_del
          WHERE ROWID IN (
              SELECT ROWID
                FROM test_del
             CONNECT BY PRIOR id = changed_by
               START WITH descr = 'A'
                      AND changed_by IS NULL);

  • How to compare current date with past date

    Sample code for comparing current date with past date
    i dont want to Calender.set method to compare it.
    How can i do it?

    PLEASE stay with ONE thread:
    http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0

  • How to include print date with time on SkillBuilders Schedule Plug In?

    Hi,
    Do you have an idea how to include and get the print date with time on the SkillBuilders Plug In? It shows me the date only, time not included. Have tried to put "HH24:MI", "HH24MI" or Tochar(HH24:MI)? No result??
    select p.fullname, sbip_schedule.start_date(e.event_schedule) start_date
    , sbip_schedule.end_date(e.event_schedule) end_date
    , sbip_schedule.duration_seconds(e.event_schedule) duration_seconds
    , sbip_schedule.calendar_summary(e.event_schedule) calendar_summary
    from app_events e
    Thanks!

    I forget to clarify I am looking for the answer is how to get the print of date with time, Start date with time and End Date with time.

  • How to compare Sale data with Previous data

    Hi Guys,
        Any one tell me how we will compare Sales data with Last year Sale data. Is there any T.Code or any kind of Report in the SAP. If available please suggest the same.
    Thanks & regards,
    Naveen Bhatia

    Hi Naveen,
    Did yo ucheck t-code SD01
    Regards
    Rohit.

  • How to Share BPM Data with iTunes Match?

    To ensure my Songs have current lyrics and reasonably accurate 'beats per minute (BPM)' data I've regularly used 3rd party tools.  Using one of the computers with my complete library this data is updated typically on adding new Songs / Albums.  Have noted recently that the lyrics, BPM and so on immediately updates on the library concerned.  However, these updates do not appear to be replicated with iTunes Match?
    Whilst the Songs are immediately listed for download on all other libraries, the additional data is not being shared.  How can iTunes Match be tempted to share such data?
    [I do have an inelegant method under a post for Metadata from early '12 but hoping that a neater solution has now been identified?]

    After careful assessment it appears that there are no improved methods for reliable sharing of Song data with iTunes Match beyond the basic method identified in this thread.
    Investigation by beaTunes reached the following conclusion:
    Even if beaTunes updated those privileged fields - I don't think that guarantees that all other fields are also synced.
    Sounds to me like iTunes Match is fundamentally flawed :-("
    It would be very helpful if Apple would allow users of iTunes Match and 3rd party developers to signal when Song data has been updates such that iTunes Match can ensure Songs across the (up to) 10 devices are synchronised.
    Until such time, only adding Songs with iTunes Match off, updating Song data as needed prior to switching iTunes Match on seems the pragmatic route forward.  For Songs otherwise imported they need to be removed and re-added in this style to yield consistent Song data.

  • How to model hierarchical data?

    I need a way to model hierarchical data. I have tried using an object so far, and it hasn't worked. Here is the code for the class I made: http://home.iprimus.com.au/deeps/StatsGroupClass.java. As you can see, there are 4 fields: 1 to store the name of the "group", 2 integer data fields, and 1 Vector field to store all descendants. Unfortunately, this this not seem to be working as the Vector get(int index) method returns an Object. This is the error I get:
    Test.java:23: cannot resolve symbol
    symbol  : method getGroupName  ()
    location: class java.lang.Object
          echo("Primary Structure with index 0: " + data.get(0).getGroupName());
                                                            ^
    1 error I figure I can't use the approach I have been using because of this.
    Can anyone help me out?

    Test.java:23: cannot resolve symbolsymbol  : method getGroupName  ()location: class java.lang.Object      echo("Primary Structure with index 0: " + data.get(0).getGroupName());                                                        ^1 errorYou need to cast the return value from get(0):
    ((YourFunkyClass)data.get(0)).getGroupName();Be aware that you're opening yourself up to the possibility of a runtime ClassCastException. You could consider using generics if you can guarantee that the data Vector will contain only instances of YouFunkyClass.
    Hope this helps

  • How to sign the data with DHPrivateKey

    I am testing DH key exchange protocol. When I run the following code, it works.
    import java.io.*;
    import java.math.BigInteger;
    public class DH2 {
        private DH2() {}
        public static void main(String argv[]) {
            try {
                String mode = "USE_SKIP_DH_PARAMS";
                DH2 keyAgree = new DH2();
                if (argv.length > 1) {
                    keyAgree.usage();
                    throw new Exception("Wrong number of command options");
                } else if (argv.length == 1) {
                    if (!(argv[0].equals("-gen"))) {
                        keyAgree.usage();
                        throw new Exception("Unrecognized flag: " + argv[0]);
                    mode = "GENERATE_DH_PARAMS";
                keyAgree.run(mode);
            } catch (Exception e) {
                System.err.println("Error: " + e);
                System.exit(1);
        private void run(String mode) throws Exception {
            DHParameterSpec dhSkipParamSpec;
            if (mode.equals("GENERATE_DH_PARAMS")) {
                // Some central authority creates new DH parameters
                System.out.println
                    ("Creating Diffie-Hellman parameters (takes VERY long) ...");
                AlgorithmParameterGenerator paramGen
                    = AlgorithmParameterGenerator.getInstance("DH");
                paramGen.init(512);
                AlgorithmParameters params = paramGen.generateParameters();
                dhSkipParamSpec = (DHParameterSpec)params.getParameterSpec
                    (DHParameterSpec.class);
            } else {
                // use some pre-generated, default DH parameters
                System.out.println("Using SKIP Diffie-Hellman parameters");
                dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
                                                      skip1024Base);
            System.out.println("ALICE: Generate DH keypair ...");
            KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
            aliceKpairGen.initialize(dhSkipParamSpec);
            KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
            System.out.println("ALICE: Initialization ...");
            KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
            aliceKeyAgree.init(aliceKpair.getPrivate());
            byte[] alicePubKeyEnc = aliceKpair.getPublic().getEncoded();
            KeyFactory bobKeyFac = KeyFactory.getInstance("DH");
            X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec
                (alicePubKeyEnc);
            PublicKey alicePubKey = bobKeyFac.generatePublic(x509KeySpec);
            DHParameterSpec dhParamSpec = ((DHPublicKey)alicePubKey).getParams();
            System.out.println("BOB: Generate DH keypair ...");
            KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
            bobKpairGen.initialize(dhParamSpec);
            KeyPair bobKpair = bobKpairGen.generateKeyPair();
            System.out.println("BOB: Initialization ...");
            KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
            bobKeyAgree.init(bobKpair.getPrivate());
            byte[] bobPubKeyEnc = bobKpair.getPublic().getEncoded();
            KeyFactory aliceKeyFac = KeyFactory.getInstance("DH");
            x509KeySpec = new X509EncodedKeySpec(bobPubKeyEnc);
            PublicKey bobPubKey = aliceKeyFac.generatePublic(x509KeySpec);
            System.out.println("ALICE: Execute PHASE1 ...");
            aliceKeyAgree.doPhase(bobPubKey, true);
            System.out.println("BOB: Execute PHASE1 ...");
            bobKeyAgree.doPhase(alicePubKey, true);
            byte[] aliceSharedSecret = aliceKeyAgree.generateSecret();
            int aliceLen = aliceSharedSecret.length;
            byte[] bobSharedSecret = new byte[aliceLen];
            int bobLen;
            try {
                bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 1);
            } catch (ShortBufferException e) {
                System.out.println(e.getMessage());
            bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 0);
            System.out.println("Alice secret: " +
              toHexString(aliceSharedSecret));
            System.out.println("Bob secret: " +
              toHexString(bobSharedSecret));
            if (!java.util.Arrays.equals(aliceSharedSecret, bobSharedSecret))
                throw new Exception("Shared secrets differ");
            System.out.println("Shared secrets are the same");
            System.out.println("Return shared secret as SecretKey object ...");
            bobKeyAgree.doPhase(alicePubKey, true);
            SecretKey bobDesKey = bobKeyAgree.generateSecret("DES");
            aliceKeyAgree.doPhase(bobPubKey, true);
            SecretKey aliceDesKey = aliceKeyAgree.generateSecret("DES");
            Cipher bobCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
            bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
            byte[] cleartext = "This is just an example".getBytes();
    //        Signature signature = Signature.getInstance("SHA1withDSA");
    //        signature.initSign(bobKpair.getPrivate());
    //        signature.update(cleartext);
    //        byte[] data = signature.sign();
            byte[] ciphertext = bobCipher.doFinal(cleartext);
            Cipher aliceCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
            aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey);
            byte[] recovered = aliceCipher.doFinal(ciphertext);
            if (!java.util.Arrays.equals(cleartext, recovered))
                throw new Exception("DES in CBC mode recovered text is " +
                  "different from cleartext");
            System.out.println("DES in ECB mode recovered text is " +
                "same as cleartext");
            bobCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
            bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
            cleartext = "This is just an example".getBytes();
            ciphertext = bobCipher.doFinal(cleartext);
            byte[] encodedParams = bobCipher.getParameters().getEncoded();
            AlgorithmParameters params = AlgorithmParameters.getInstance("DES");
            params.init(encodedParams);
            aliceCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
            aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey, params);
            recovered = aliceCipher.doFinal(ciphertext);
            if (!java.util.Arrays.equals(cleartext, recovered))
                throw new Exception("DES in CBC mode recovered text is " +
                  "different from cleartext");
            System.out.println("DES in CBC mode recovered text is " +
                "same as cleartext");
    }I want to sign the data with Signature,So i add the following code to the sample.
            byte[] cleartext = "This is just an example".getBytes();
         Signature signature = Signature.getInstance("SHA1withDSA");
            signature.initSign(bobKpair.getPrivate());
            signature.update(cleartext);
            byte[] data = signature.sign();
            byte[] ciphertext = bobCipher.doFinal(cleartext);Run the code again, the output is
    Error: java.security.InvalidKeyException: No installed provider supports this key: com.sun.crypto.provider.DHPrivateKey
    What's wrong with the code, It seems that the bob's private key is not instance of DSAPrivateKey but DHPrivateKey.
    what's your comment? thanks a lot.

    slamdunkming wrote:
    thank sabre150 for your reply. But the key pair is generated when I use DH to exchange the secret key. Yes! It is a DH key pair and cannot be used for signing. The DH key pair can only be used for secret sharing.
    If I can not use this private key to sign the data, what can i do?Do I have to generate another key pair for signature? In that way, I will have two key pair. Yep. You can generate a DSA or an RSA key pair to be used for signing.
    Because I use http protocol to exchange the key to get the shared secret key, Yep.
    If I generate another key pair, how can i send the public key to server? Since public keys are 'public' then you can send them in the open to anyone you like. In fact, if you don't publish your public keys then they are pretty much a waste of time. The biggest problem one has with public key is proving 'ownership' - if someone sends me a public key how do I know that the sender is actually who they say they are?.
    I am confused.Some reading might help. A pretty good starting point is "Beginning Cryptography with Java" by David Hook published by Wrox.

  • How to import Spacial Data with mapviewer into Database?

    I have deployed mapviewer10133wls with oc4j and able to see mapviewer home page but don't know how to get started with mapviewer like what configuration it needed and how to import sapcial data into Database with mapviewer. please help with reply.
    Thanks,
    Suchetana.

    If its the Oracle Spatial option you're after, its not included in XE http://download.oracle.com/docs/cd/B25329_01/doc/license.102/b25456/toc.htm#BABJIJCJ
    For GIS data, I'll be no help at all someone else here may have experience with it. If its something that can fit into RDBMS tables there is probably a way to do it without Spatial, but that's just a guess :(

  • How to submit the Data with Business rule auto executed with VBA in excel?

    Anyone knows how can I submit the data into planning with the business rule auto executed in planning?
    Currently, I am using HypExecuteCalcScriptEx () + HypSubmitData() in my program that auto executed the business rule prior saving the data into planning.
    However when it try to run HySubmitData(), the Business rule window pops up again and ask user to run the business rule again.
    Therefore, is there a way that I can submit the data with auto execute the business rule?
    many thanks, highly appreciate !!!!!!

    Hi Rafeek,
    One solution is to set the column width after manually or programmatically refresh the PivotTable, for example:
    Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
    Dim ws As Worksheet
    Set ws = Application.ActiveWorkbook.ActiveSheet
    ws.Columns("A").ColumnWidth = 10
    End Sub
    Another option is to set the column width, then protect the columns from been updated by the user, before refreshing the PivotTable, unprotect the worksheet. For example:
    Public Sub LockColumnA()
    Dim ws As Worksheet
    Set ws = Application.ActiveWorkbook.ActiveSheet
    ws.Columns("A").ColumnWidth = 10
    ws.Columns("A").Locked = True
    ws.Protect "123"
    End Sub
    Public Sub UnprotectWorksheet()
    Dim ws As Worksheet
    Set ws = Application.ActiveWorkbook.ActiveSheet
    ws.Unprotect ("123")
    End Sub
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to export table data with coloring of cell according to value.

    Hi all,
    I am using jdeveloper 11.1.1.6
    i want to export table data with lot of formatting. like with coloring of cell according to value and so many.How to do that?

    Hi,
    like with coloring of cell according to value and so many.How to do that?
    Answer is, you can't
    Frank

  • How can I load data with Scripts on *FDM* to a HFM target System????

    Hi all!
    I need help because I can´t find a good guide about scripting on FDM. The problem I have is the next one.
    I have on mind to load my data with data load file in FDM to a HFM target system, but I would like to load an additional data using an event script, ie after validate. I would need any way to access to HFM system though FDM Scripts, is it possible??
    If so, It would be wonderful to get a data from HFM with any Point of View, reachable from FDM Scripts in order to load or getting any data.
    I´ve looking for a good guide about scripting in FDM but I couldn´t find any information about accessing data on HFM target system, does it really exist?
    Thanks for help

    Hi,
    Take a look at the LOAD Action scripts of your adapter. This might give you an idea.
    Theoretically it should be possible to load data in an additional load, but you need to be very careful. You don't want to corrupt any of the log and status information that is being stored during the load process. The audit trail is an important feature in many implementations. In this context it might not be a good idea to improve automation and risk compliance of your system.
    Regards,
    Matt

Maybe you are looking for