cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple row selection in table

Former Member
0 Kudos

Hi,

1) Is it possible to select multiple rows in table. If so how to do that?

2) How to add status (the button which will be green for success and red for failure) field in table.

Note: you can find such status buttons in any FM, In transaction se 37, import tab, the last field(long text) has such button.

Thanks in advance

Regards

Shanthi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shanthi,

For the multiple row selection keep the Value of the SelectionMode property as Auto or Multi .

Get the multiple records selected from the table context with the code below.

DATA: lt_temp TYPE wdr_context_element_set,

lo_nd_users TYPE REF TO if_wd_context_node.

lo_nd_table_data = wd_context->get_child_node( name = wd_this->wdctx_tablename ).

CALL METHOD lo_nd_table_data->get_selected_elements

RECEIVING

set = lt_temp.

Regards,

Arpan

Former Member
0 Kudos

Hi,

1. Set the selection mode property for table UI element as Multi orMultiNoLead

2. You have to use the IMAGES and based on the condition you need to place that image.

This column should be of tyep IMAGE

Check out my reply in this thread-

Try to use the same for TABLE

Create a context attribute STATUS of type string in the node to which the table UI is bound to.

ICON_GREEN_LIGHT

ICON_RED_LIGHT

ICON_YELLOW_LIGHT

And before binding check this code -

LOOP AT lt_table ASSIGNING <fs_table>.
    MOVE-CORRESPONDING <fs_table> TO ls_table_temp.
    IF <fs_table>-status IS INITIAL.
      ls_table_temp-status = `~Icon/Failure`.   "Have Green or Red
    ELSE.
      ls_table_temp-status = `~Icon/CheckedOk`. 
    ENDIF.
    APPEND ls_table_temp TO lt_table_temp.
  ENDLOOP.

bind the lt_table_temp to the node

Regards,

Lekha.

Edited by: Lekha on Aug 26, 2009 6:31 PM