Skip to Content
avatar image
Former Member

How to bind association in SAPUI5 on initial load?

Hello experts,

I need your help for this, too. This is my second problem regarding the post goods receipt app with completion date 30.06.17! Please check my first question for additional information as well, it's not solved yet: How to post table data from front-end (SAPUI5) to back-end (OData/ERP)?

I am trying to bind via association the possible storage locations for a plant which are coming from a customizing table. It works fine if I choose another plant from the list so that the onChange method is triggerd. But when loading the app the first time it fills only plant '1270' (because it's the first item in the list i guess) without triggering the association. How can I trigger this on initial load? Do I need the dropdown objects in master or in detail view? I attech an image after inital load for you:

initial-load.jpg (132.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 22, 2017 at 03:34 AM

    Hello,

    You could implement the same logic of onChange function for onInit of detail page.

    So it is supposed to load the same logic on initial load.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 22, 2017 at 01:20 PM

    Try the previous answer of manually triggering the method getting the data for the selected plant.

    Else, load the dropwons and default it with a static "Select Plant" or "Select" option into the dropdown. So, the user is forced to select a plant and in return you get the related data.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded