cancel
Showing results for 
Search instead for 
Did you mean: 

Create dynamic table in web dynpro abap

joerg_arndt
Participant
0 Kudos

Hi Friends,

I want to create several tables in a web dynpro. For this reason I have created a View, a group1 and a context node.

Now I want create a table for each characteristic group from cabn in the ui group1.

For this reason I want to use create_table_from_node and I have to craete dynamicly attributes in the node.

Is it the propper way or is there a different approach.

So in this case

1. I read the node

2. craete attribute for each characteristic group in this node

3. create a UI Table with create_table_from_node for each attribute

4. bind the data to the UI Table

Can I do the same without to craete attributes?

Thank in advance.

RG. Jimbob

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Jimbob,

I would suggest you to limit what you do dynamically, as it would take a toll on your performance.

If you want to create a table you could atleast add table ui element under rootuielementcontainer and then you could add table column dynamically.

You could also look into the option of changing the visibilty of ui elements.

Could you elaborate more about your requirement.

Regards

Anurag Chopra

joerg_arndt
Participant
0 Kudos

Hi Anurag,

I want to create several tables for a not known number of characteristic groups.

For each group one table is created, so I only know at runtime how many tables

has to created.

Rg. Jimbob

ChrisPaine
Active Contributor
0 Kudos

Hi Jimbob,

Have you looked at using the row-repeater UI element? You could then have as many tables as per your characteristic groups.

Although this would be more difficult if the attributes of each table were to also be only known at run-time. (I'm not sure that this is the case though from your description of the issue.)

so have a context of the form:

Context Root

--->node_characteristic_group (0..n)

-


>node_char_group_details(0...n) (non-singleton child node)

then bind your row repeater to node "node_characteristic_group " and bind the table inside the row repeater to node "node_char_group_details".

Each time you had a new element in the node_characteristic_group you would get a new table...

Much easier to support that anything dynamically created.

Cheers,

Chris

joerg_arndt
Participant
0 Kudos

Hi Chris,

row repeater is not a good choice because the tables have to be site by site.

Another possibility would be the multi pane.

I have a closer look on it.

Thanks for your suggestion.

Rg. Jimbob

Answers (2)

Answers (2)

Former Member
0 Kudos

Have a look at sample webdynpro component 'DEMODYNAMIC' in package SWDP_DEMO. It deals with dynamic creation of nodes, attributes, table columns etc.

Especially, have a look at its assistance class methods too.

Regards

Manas Dua

Former Member
0 Kudos

HI Bob,

your flow is almost correct , if you want any reference please find in sdn link.

<-- removed by moderator --> I dare you to put it back!

Edited by: Neil Gardiner on Nov 5, 2010 12:38 PM

joerg_arndt
Participant
0 Kudos

Thanks Lavanya,

but the link is Java.

Rg. Jimbob