Skip to Content
In Part 6 of this tutorial: “Complex-looking” code is sometimes the “simplest” (Dynamic RoadMaps:Part 6) When in doubt, de-multiplex! (Part 5 of Dynamic RoadMap Tutorial) Class-Data May be Cheating, but Who Cares? (Part 4 of Dynamic Road Map Tutorial) SAP UI Element Metadata: Gold or Fool’s Gold? (Part 3 of Dynamic RoadMap Tutorial) But how does the thermos bottle know? (Part 2 of Dynamic Road Map Tutorial) Exposing Critical SAP Code Paths as WebDynpro(ABAP) RoadMaps: One Case Where Dynamic UI Element Generation Might Be the Right Way to Go we found that we could remove quite a bit of irrelevant code from the create_aggregations_roadmap method of our local copy ZCL_WDR_ALL_IN_ONE_UIELEM, i.e. code that is not needed when building a RoadMap dynamically. This is not not the case with the create_aggregatee method called by create_aggregations: there is very little code in this method which does not apply to dynamic RoadMap creation. On the other hand, there is code in this method which builds the right-hand RoadMap navigation tree – the one we eventually want to replace with our own navigation tree (see Exposing Critical SAP Code Paths as WebDynpro(ABAP) RoadMaps: One Case Where Dynamic UI Element Generation Might Be the Right Way to Go of this tutorial). And therefore, it will be necessary to make a copy of create_aggregatee that we’ll call create_aggregatee_roadmap. To make this copy and revise it appropriately, all we have to do is: 1) declare our new method create_aggregatee_roadmap in the protected section of our local copy ZCL_WDR_ALL_IN_ONE_UIELEM: image 2) copy the code from create_aggregatee into our new method; 3) change create_aggregations_roadmap so that it calls our new method instead of create_aggregatee: image 4) remove this code from our new method create_aggregatee_roadmap (because it applies only to “LAYOUT’s”): image 5) comment out this code (because we’re going to build our own righthand-side navigation tree later on): image And once having done (1-5), we’re ready to start tweaking the various methods of our local copy ZCL_WDR_ALL_IN_ONE_UIELEM so that our component ZWDR_TEST_UI_ELEMENTS will display exactly the RoadMaps we want. In particular: 6) we want to make the “02 or 03” leg of “create_aggregations_roadmap” just call create_aggregatee_roadmap once: image 7) we want to display less road-map steps, so we comment-out/remove the do loop from create_data_node: image 8) we want to make sure we understand how to title the steps of our RoadMap, so to verify our understanding, we modify the get_default_value method like this: image At this point, the display looks like this: image And therefore, we “know that we know” how to make it look like whatever we want it to look like.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply