cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative way of retrieving bex variables in Lumira Designer SDK than passing it via ZTL function?

Martin-Pankraz
Active Contributor
0 Kudos

Dear reiner.hille-doering, dear community,

We are looking to retrieve all information of an assigned data source on the Lumira Designer SDK framework including bex variables. To our knowledge there is no configuration option to get the involved bex variables names and values on the runtime json. Our workaround requires the designer to extract the values on Lumira Designer Scripting and pass it via ZTL to the SDK component. Do you have any further input for us?

Kind regards

Martin

Accepted Solutions (1)

Accepted Solutions (1)

reiner_hille-doering
Active Contributor
0 Kudos

Hello Martin,

yes, you have to use scripting, but you don't need your component's user to write this code - you can do it in your component's ZTL.

The key is the feature "Binding Events to Design Studio Script Methods", especially maybe the "onBeforeRender" pseudo-event that I have described in https://archive.sap.com/documents/docs/DOC-58755.

Good luck,

Reiner.

Martin-Pankraz
Active Contributor
0 Kudos

Hi Reiner,

Thank you very much for the hint. However we found we cannot do it this way properly. We have the requirement to allow multiple data sources as input. Therefore we have a set of properties of type ResultSet, which are bindable. But for the standard method "getDataSource" to work we need to make the whole sdk component of type databound. That in turn is causing trouble during the initialization of the other resultset properties. All of them are fed the data set from the first data source.

So far the lifecycle behaves only correct for multiple data sources if the sdk component type is not databound.

Kind regards

Martin

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

Sure - if you use multiple data source and attach the result set via Property Binding, the SDK component doesn't know anything about the data source components.

You could e.g. have one or more properties where the user needs to specify the data sources.

Nicest approach is using the new "ComponentReference" property, because it give the user some input help:

<property id="datasSource1" title="Datasource 1" type="ComponentReference" visible="true" tooltip="..."> 
   <option name="type" value="DataSourceAlias"/> 
</property>

Once you have the names of the data sources, you can access the scriptable data source objects via

__COMPONENTS__[<name>]. With the result you can call any documented scripting API.

Martin-Pankraz
Active Contributor
0 Kudos

Wow, this was gold. All our requirements covered!

Thank you so much Reiner.

Kind regards

Martin