cancel
Showing results for 
Search instead for 
Did you mean: 

Create Dynamic Strucuter

ipravir
Active Contributor
0 Kudos

Hi,

I have a requirement, where through oData service I have to send a table data.

And the same i have to display in UI5 interface.

The table columns are not fixed, let give an example.

If user select month, that could be one or more, then i have to arrange data as like below.

Week1_month1_year     Week2_month1_year     week3_month1_year      week4_month1_year     Week1_Month2_year .......and so on.

Is there any possibilities, where we can send table data in dynamic way.

Regards,

Praveer.

Accepted Solutions (0)

Answers (3)

Answers (3)

kammaje_cis
Active Contributor
0 Kudos

Praveer,

In one sentence, answer is No. You cannot have a dynamic model and I have not seen a genuine requirement for it so far.

What you really require is an Entity with three properties. Week, Month and Year(may be all of them keys). You can send back single record or multiple records based on $filter.

Your model structure/definition should be driven by the UI. So I am curious to know if the UI developer asked for this dynamic content?

Thanks

Krishna

EkanshCapgemini
Active Contributor
0 Kudos

Hi Praveer,

The solution of this lies in how you will be accepting the input. If you are using FMs, you will define some table which will accept the values. That table may not have any type associated with it to make it dynamic in FM but then you can not use this to map the properties in SEGW transaction (since there are no fixed properties defined).

If the table is having some defined type, then you would be having all those fields declared. As Ashwin mentioned, you have to choose all the possible fields while selecting the properties in SEGW. This way you will be passing values to only those fields which are required as per your business logic.

Regards,

Ekansh

ipravir
Active Contributor
0 Kudos

Hi Ekansh,

overall we cannot create a dynamic table for oData service because it's working based on static objects, right?

Regards,

Praveer.

EkanshCapgemini
Active Contributor
0 Kudos

You can pass a dynamic table to your FM but with the code based service implementation.

You may change the metadata dynamically but not with the SEGW tool.

Having a look at these may help:

AshwinDutt
Active Contributor
0 Kudos

Hello Praveen,

GW Model will be static. Properties which are defined in model can only be used in service and can be seen as part of GW response.

We need to add all the possible properties which end use user may use/select in the UI Application and hence can make it accessible in the GW level for processing.

Regards,

Ashwin