cancel
Showing results for 
Search instead for 
Did you mean: 

Composite Binding on Fixed Asset?

fceylan_hs
Participant
0 Kudos

I would like to navigate Fixed Asset screen from another screen(e.g Service Products). Fixed assets has composite ID mapping.

Tried to create ovs navigation with usual id field configuration in SAP UI Designer but it gaves me following error with empty screen;

So can how I achieve this in SDK?

Accepted Solutions (0)

Answers (1)

Answers (1)

vishalakshmi
Contributor

Hello Fatih,

  • In your SDK project, you'll need to create a custom navigation action that triggers the navigation to the Fixed Asset screen.
  • In the custom navigation action, define the necessary parameters to pass the required information to the Fixed Asset screen. Since Fixed Assets have composite ID mapping, you'll likely need to pass multiple parameters corresponding to the components of the composite ID.
  • Within the custom navigation action implementation, use the parameters you defined to construct the URL or perform the necessary logic to navigate to the Fixed Asset screen. This might involve querying the Fixed Asset data based on the composite ID components and then opening the Fixed Asset screen with the relevant data preloaded.
  • Ensure you test the navigation thoroughly to handle any potential errors or exceptions. Check for valid composite ID components and handle scenarios where Fixed Assets may not exist.
  • If you want to integrate this custom navigation action with the UI Designer, you can create a button or link on the Service Products screen and associate it with the custom navigation action you created.
  • The error message "Composite binding has no model" typically indicates an issue with binding data to a composite ID. Ensure that your custom navigation action correctly binds the model data to the composite ID components before navigating to the Fixed Asset screen.

Sample code like this:

var params = {

CompanyCode: "ABC",

AssetNumber: "12345"

};

var navService = applicationContext.getService("Navigation");

var target = {

BO: "FixedAsset", // Replace with the actual BO name

// Map the parameters to the composite ID components

Node: "FixedAssetCollection",

Element: params

};

navService.navigate(target);

Can you refer to the below link:

https://sapui5.hana.ondemand.com/sdk/#/topic/a2fe8e763014477e87990ff50657a0d0

Thanks,

Lakshmi.