1 Reply Latest reply: Mar 27, 2018 7:27 AM by Rakesh Pareek RSS

    How to create Hierarchy ?

    Rakesh Pareek

      Hi,

       

      Below is my input data, in which I have main field PSPNR which is the main number of rows. In this data LEFT, Right, UP and DOWN are the position of the main number. Now I wants to create the hierarchy from this input.

       

      Input Data:

       

      PSPNR

      POSID

      OBJNR

      LEFT

      RIGHT

      UP

      DOWN

      209

      I0006

      PR00000209

      0

      0

      0

      210

      210

      I0006 1

      PR00000210

      0

      396

      209

      0

      396

      I0006 2

      PR00000396

      210

      477

      209

      0

      477

      I0006 3

      PR00000477

      396

      0

      209

      0

       

      Output Data 1:

       

      POSID1

      POSID3

      OBJNR

      I0006

      1

      PR00000210

       

      2

      PR00000396

       

      3

      PR00000477

       

      Output Data 2:


      POSID1

      POSID3

      OBJNR

      I0006

       

      PR00000209

      1

      PR00000210

      2

      PR00000396

      3

      PR00000477

        • Re: How to create Hierarchy ?
          Rakesh Pareek

          Other Big Example:

          Input:

           

          PSPNR

          POSID

          OBJNR

          LEFT

          RIGHT

          UP

          DOWN

          1757

          I0016

          PR00001757

          0

          0

          0

          1758

          1758

          I0016

          PR00001758

          0

          2056

          1757

          1759

          1759

          I0016

          PR00001759

          0

          1760

          1758

          0

          1760

          I0016

          PR00001760

          1759

          1761

          1758

          0

          1761

          I0016

          PR00001761

          1760

          1762

          1758

          0

          1762

          I0016

          PR00001762

          1761

          0

          1758

          0

          2056

          I0016

          PR00002056

          1758

          2058

          1757

          2057

          2057

          I0016

          PR00002057

          0

          2253

          2056

          0

          2058

          I0016

          PR00002058

          2056

          2128

          1757

          2059

          2059

          I0016

          PR00002059

          0

          3368

          2058

          0

          2128

          I0016

          PR00002128

          2058

          2129

          1757

          0

          2129

          I0016

          PR00002129

          2128

          2130

          1757

          0

          2130

          I0016

          PR00002130

          2129

          2816

          1757

          0

          2253

          I0016

          PR00002253

          2057

          2264

          2056

          0

          2264

          I0016

          PR00002264

          2253

          2265

          2056

          0

          2265

          I0016

          PR00002265

          2264

          2266

          2056

          0

          2266

          I0016

          PR00002266

          2265

          2601

          2056

          0

          2601

          I0016

          PR00002601

          2266

          2812

          2056

          0

          2812

          I0016

          PR00002812

          2601

          2813

          2056

          0

          2813

          I0016

          PR00002813

          2812

          3772

          2056

          0

          2816

          I0016

          PR00002816

          2130

          2819

          1757

          2817

          2817

          I0016

          PR00002817

          0

          2818

          2816

          0

          2818

          I0016

          PR00002818

          2817

          2881

          2816

          0

          2819

          I0016

          PR00002819

          2816

          2878

          1757

          2820

          2820

          I0016

          PR00002820

          0

          2821

          2819

          0

          2821

          I0016

          PR00002821

          2820

          2880

          2819

          0

          2878

          I0016

          PR00002878

          2819

          0

          1757

          2879

          2879

          I0016

          PR00002879

          0

          0

          2878

          0

          2880

          I0016

          PR00002880

          2821

          3332

          2819

          0

          2881

          I0016

          PR00002881

          2818

          3159

          2816

          0

          3159

          I0016

          PR00003159

          2881

          3328

          2816

          0

          3328

          I0016

          PR00003328

          3159

          3329

          2816

          0

          3329

          I0016

          PR00003329

          3328

          3330

          2816

          0

          3330

          I0016

          PR00003330

          3329

          3331

          2816

          0

          3331

          I0016

          PR00003331

          3330

          3394

          2816

          0

          3332

          I0016

          PR00003332

          2880

          3367

          2819

          0

          3367

          I0016

          PR00003367

          3332

          3782

          2819

          0

          3368

          I0016

          PR00003368

          2059

          3614

          2058

          0

          3394

          I0016

          PR00003394

          3331

          0

          2816

          0

          3614

          I0016

          PR00003614

          3368

          0

          2058

          0

          3772

          I0016

          PR00003772

          2813

          3773

          2056

          0

          3773

          I0016

          PR00003773

          3772

          3774

          2056

          0

          3774

          I0016

          PR00003774

          3773

          3807

          2056

          0

          3782

          I0016

          PR00003782

          3367

          3783

          2819

          0

          3783

          I0016

          PR00003783

          3782

          3784

          2819

          0

          3784

          I0016

          PR00003784

          3783

          0

          2819

          0

          3807

          I0016

          PR00003807

          3774

          0

          2056

          0

           

          Output1:

           

          POSID1

          POSID4

          POSID3

          OBJNR

          I0016

           

           

          PR00001757

          1

          1

          PR00001758

          1. 1.1

          PR00001759

          1. 1.2

          PR00001760

          1. 1.3

          PR00001761

          1. 1.4

          PR00001762

          2

           

           

          3

           

           

          4

           

           

          5

           

           

          6

           

           

          7

           

           

          8

           

           

          9

           

           

           

          Output2:

          POSID1

          POSID4

          POSID3

          OBJNR

          I0016

          1

          1.1

          PR00001759

          1.2

          PR00001760

          1.3

          PR00001761

          1.4

          PR00001762

          2

           

           

          3

           

           

          4

           

           

          5

           

           

          6

           

           

          7

           

           

          8

           

           

          9