cancel
Showing results for 
Search instead for 
Did you mean: 

WD ABAP uiElement to represent data in table-like format

matteo_montalto
Contributor
0 Kudos

Hi gurus,

I have a simple layout that I must replicate into a WD ABAP.

In particular, I have to represent some data in a kind of table. This table has just 2 rows and three columns... and the first one is just populated with labels.

Here's a schema:

Title column1Title column2Title column3
Label for inputfield AInputfield A (bound to a context attribute)inputfield B (bound to a context attribute)
Label for inputfield CInputfield C (bound to a context attribute)Inpufield D (bound to a context attribute)

So basically I have in my context a node (cardinality 0:1) which contains, amongst other fields;

Node

- ...

- A

- B

- C

- D

- ...

I'm wondering what would be the best uiElement to represent such a layout. Could anyone help me out suggesting a nice solution?

Thanks experts

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Matteo,

This really isn't tabular data that you want to display but rather a grid of unrelated context attributes. One option would be to just create the Labels and InputFields in a Matrix layout.

If a Table is really needed, take a look at table cell variants, which would allow you to display different context attributes in a column for each row. Here is a walk-through demo, Using Cell Variants to Dynamically Assign Search Helps in a Table.

Cheers,

Amy

matteo_montalto
Contributor
0 Kudos

Hi Amy,

true that, it's not tabular data but rather a grid presentation of indipendent data.

Is there any Layout that allows me to:

- differenciate the header row w.r.t. the following rows;

- make the "grid" visible.

Thanks again for your help

amy_king
Active Contributor
0 Kudos

Hi Matteo,

Web dynpro doesn't provide an "HTML table" sort of element where you could essentially draw a grid with a border and put whatever you want into its cells. Try the table cell variant option. Based on your mock-up this would get you closest to your desired result.

If you are on NW 7.3, the HTML Island element is introduced which may help you draw a bordered-grid. I'm on NW 7.02 so haven't played with this new element.

Cheers,

Amy

venkat_ratnam3
Explorer
0 Kudos

Hi Matteo,

i have done a similar requirement using a row-repeater UI element .

you can try using row repeater UI element and control the no of rows in the UI element property now of rows = 2 .

in row repeater which allows you to create a row and repeat that for no of times .

in a row you can choose any type of UI elements like input fields .

Thanks ,

Venkat Ratnam  Naidu

Answers (1)

Answers (1)

former_member222068
Active Participant
0 Kudos

Hi Matteo,

label for input field would be title of the column, then why do you need seperate column for it.

Table UI element : is used to represet data in a tabular format.

Based on the given input, we are displaying the data in the table.

Note: If your requirement is something different, reply to this what you are expecting.

Thanks & Regards,

Sankar Gelivi

matteo_montalto
Contributor
0 Kudos

Hi Sankar,

I know CL_WD_TABLE uiElement but unfortunately it doesn't meet the requirement.

Data are not stored in a multiple node (as per table binding) but in a node with cardinality 0,1.
Moreover, each element in a single column doesn't  refer to the same attribute, as shown in the main thread post:

Column1:

inputfield A

inputfield B

where A and B are two distinct and different attribute of the Context's node.

Hope it's quite clear now, thanks anyway for your help

EDIT: what I'm looking for is an equivalent uiElement to the TEMPLATE element used in Smartforms.

Basically a grid in which I can put every uiElement (inputfield, label and so on) in each specific position... but did not found anything similar in WD ABAP Context.