cancel
Showing results for 
Search instead for 
Did you mean: 

Row / line number as first column in table

alejandro_bindi
Active Contributor
0 Kudos

Does the table UI element provide some means to achieve this requirement? I know I can have an additional attribute for this and update it myself each time an element is added or deleted, but this would be nicer if provided automatically by the element.

Maybe this option is hidden and I couldn't see it.

If not, does anyone know if there are any plans by SAP to add such functionality?

To be clear, what I'm refering to is something like the column marked with "X" below:


-----------------------------------------------------
| | X |  Col1  |  Col2  |  ...       |  Coln
-----------------------------------------------------
| | 1 |  data1 |  data2 |  ...       |  datan
-----------------------------------------------------
| | 2 |  data1 |  data2 |  ...       |  datan
-----------------------------------------------------
| | 3 |  data1 |  data2 |  ...       |  datan
-----------------------------------------------------
| | 4 |  data1 |  data2 |  ...       |  datan
-----------------------------------------------------

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't believe there is anything in the table UI element that would display the row number. You would have to add this as your own data column to the table. I can pass that along to product definition that you would like to see that feature, but for it to be added I'm sure it would need more support than just one customer. What is the business use case for such a feature? It will be a bit of a hard sell, since it is fairly easy for the application developer to add their own column with the same information.

If you want a more Excel-Like experience for your data display - you can use Excel In Place via the Office UI element and it displays the row numbers. That is probably the closest Option I could think of without simply adding the column of data yourself.

alejandro_bindi
Active Contributor
0 Kudos

I have a main view with a table where the user creates and deletes items. He can delete them from anywhere in the table (and may later request to insert them anywhere also), so, for the line number to be consecutive at all times, the entire node should be checked from deletion point to the last element at each delete operation, to recalculate line numbers leaving no gaps in the middle. As of now i'm not showing line number yet so I calculate them at saving time (they are the "itm_number" field in the table sent to the BAPI).

I know it's not difficult at all to do though, but I was afraid this would hurt performance a bit (on a second thought I don't think it'll really make a big difference since the items will not be so many).

Anyway, I wanted to know if the feature was available or in plans to be done before doing it myself - i'm definitely not requesting it!

As always, many thanks.

Regards