Skip to Content

How to bind association in SAPUI5 on initial load?

Jun 16, 2017 at 08:10 AM


avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Tri Le Minh Jun 22, 2017 at 03:34 AM


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.

10 |10000 characters needed characters left characters exceeded
Sharath M G 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.


10 |10000 characters needed characters left characters exceeded