Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Best practice configuration data


is there a kind of best practice to handle global configuration data?

I want to load the data once from server and store it e.g. on App scope, so I can access the model from any page?

Or is using the cache the only proper solution?



Hi Markus

There is two ways to handle global configuration data using the cache:

Let's use an object named GlobalConf for our example.

1) Inside one App, can be accessible from all pages using the model object: modelGlobalConf.oData.VKORG

2) Between Apps, needs to enable globalCache and the object needs to be named the same in all App's. Then you can access from all Apps and Pages the same object: modelGlobalConf.oData.VKORG

In both cases set the enableCache = true and setInitLoad = cache.

In NAD 3.1 SP01 we also introduced a new Database for larger dataset. This can also be used, but I recommend solution 2 for this requirement.


Ole Andre 

Hi Ole Andre,

thank you for your reply, I'm not totally sure how this will work.

Is GlobalConf bound to an component? How do I get data into this object?

I tried to do it with a direct $ajax call, but then I saw that the binding to the response values is done by reading the mapped structure from the component field (which is filled in the designer, which is absolut logical), so I have no change to transfer a certain structure without having a field with an assigned model?



Hi Markus

The GlobalConf is a object (container) like page,box,panel etc. Really does not matter that much, but needs to be a container and bind it to the structure for the configuration data.

The Ajax object will be the one to generate the needed javascript to send/get data from SAP. Remember to press on Additional Send/Receive models and set the GlobalConf to receive.


Ole Andre 

Login or Signup to post a comment