Navigate to the same screen lodaing new data (screen reuse)

  • Jens Schreyer
        Has successfully completed the online course Basics (100)
      1 year ago #35793

      We do have a database with a one to many relationship of an entity to itself using a parentId field. To display and edit the entity we created a screen, that includes a list of all child elements of the one shown. When users click on a child item to display the child item, the app performs the necessary connector calls, fills the global variables of the screen and immediately shows the new data in the same screen. But, without performing animation. As simplifier checks before navigating to a new screen, if the screen to navigate to is the same that is currently shown and does nothing, if that is the case.

      To overcome this, and have consistent screen navigation look and feel, we duplicated the screen.

      Is there a way to reuse the existing screen template for displaying parent and child items, maybe by having kind of a second instance or is there a way to navigate to the same screen, loading new data and with animation?

      Jennifer Häfner
          Has successfully completed the online course Intermediate (200)
          Has successfully completed the online course Advanced (300)
          Has successfully completed the online course Basics (100)
          Has successfully completed the online course Advanced (310)
          Has successfully completed the online course Advanced (320)
          Has successfully completed the Intermediate Certification
          Has successfully completed the Advanced Certification
        1 year ago #35814
        Up
        0
        Down
        ::

        Hi Jens,

        To display overview-detail data, we often use the sap.tnt.ToolPage. This widget has two important aggregations: in the sideContent, you can place your overview data (like a list of the parent and its child items). In the mainContent, you can construct the detail page where the data from the clicked child item is displayed.

        You can find an example of this construct in the FeedbackApp on our Marketplace, on the screen ‘TableWithDetails’.

        If you do not want to use the ToolPage, I recommend using either a designated detail screen (or a dialog), which displays the detail data of the clicked child item. Then, you can use the usual navigation shapes (navigateTo/navigateBack).

        If you want to stay on the same screen and just want to ‘fake’ loading data, you can use the Client-Side Business Object ‘ITIZ_Utilities’ – ‘setTimeout’, which takes the milliseconds that the timeout should last as input. Click on the shape in the Process Designer and set the switch ‘Show Busy Indicator’ on the right side to True. The shapes connected to this CSBO function will wait because of the timeout.

        I hope this helps, let me know if you have further questions!

      Viewing 2 posts - 1 through 2 (of 2 total)

      You must be logged in to reply to this topic.