cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom sorting with BW 7.3 source system at Webi 4.3

siva_ram20
Participant
0 Kudos
448

Hi Everyone

I must implement custom sorting based on the depth of Hirearch nodes, yet the source system is BW7.3. X

The Data was displayed in the Hierarchy node level as mentioned in the below format
Country---> State--> Cities--> Town 
Whenever the user enters the prompt value for the country example India, it should display data in custom sorting-based hierarchy nodes. Please find attached a reference screenshot of the data 
Current Hirearichy nodes in Webi 

Country Name country .depth 
India 1
     Telangana2
         Hyderabad 4
             Warangal 5
Tamil Naidu 4
           Chennai 4
            Coimbatore5
Maharashtra 2
             Mumbai4
               Pune5
            Navi Mumbai6
Kerala 5
         Thiruvananthapuram4
                Kochi4
              Kollam4
New Dehil 3
  Nodia 8
Gokal Pur8

Expected output 

Country Name country .depth 
India 1
     Telangana2
         Hyderabad 4
             Warangal 5
Maharashtra 2
             Mumbai4
               Pune5
            Navi Mumbai6
New Dehil 3
  Nodia 4
Gokal Pur5
Tamil Naidu 4
           Chennai 4
            Coimbatore5
Kerala 5
         Thiruvananthapuram4
                Kochi5
              Kollam6

Accepted Solutions (0)

Answers (1)

Answers (1)

vishalakshmi
Contributor
0 Kudos

Create new webi report and new document and select BW query as datasource.

Insert the data for the objects Country, state, city, town and depth into the report.

Custom Sorting Logic in Webi:

Create the SortKey variable with the formula: [Depth] & [Country] & [State] & [City] & [Town].

Apply sorting using the SortKey variable to ensure the hierarchical data is displayed correctly.