on 07-29-2010 10:03 AM
Hi everybody,
is it possible to make a single cell selectable in a table in Web Dynpro for ABAP?
In simple ABAP it is possible and you can catch the coordinate while raising an event (button).
In Web Dynpro when I am using "input fields" instead of "text view" for the cell editor I can go into a cell, but it isn't selected.
By the way the table should not be editable ...
Thanks for all answers ...
Hello,
TABLE cell selection is possible with TableSingleMarkableCell UI element.
Please refer to the following link:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/a5/b8fa41c915da6fe10000000a1550b0/content.htm
Hope this helps!
Regards,
Srilatha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srilatha,
it was a big help. But now I have another problem.
The sample shows that there must be a context element typed WDR_EXT_ATTRIBUTE_POINTER for the marked_cell.
When I read this context element at runtime after selection of a cell the parameter "attribute_name" is only filled with the column name.
How can I get the complete coordinate means column and row?
I've tried to get the selected row of the table element, but there is only a cell selected not a complete row.
Thanks for help...
Hi,
Do you mean in ALV?
try like this:
data: lr_link TYPE REF TO cl_salv_wd_uie_link_to_action.
CREATE OBJECT lr_link.
lr_link->set_text_fieldname( ls_column-id ).
ls_column-r_column->set_cell_editor( lr_link ).
and then you have your row which is clicked in the ON_ALV_CELL_ACTION.
regards,
John
Problem is solved.
Solution:
As described I have a context attribute "marked_cell" typed WDR_EXT_ATTRIBUTE_POINTER.
After selecting a cell my method behind the button could read the coordinates with the following code.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lo_marked_cell LIKE ls_context-marked_cell.
DATA lv_marked_column TYPE string.
DATA lv_marked_row TYPE string.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `MARKED_CELL`
IMPORTING
value = lo_marked_cell ).
* lo_marked_cell contains direkt the column
lv_marked_column = lo_marked_cell-attribute_name.
* Additionaly we need the row number the user selected
lv_marked_row = lo_marked_cell-element->get_index( ).
Hi Team,
I am facing the same issue in my application ...
I want to get the rows and column values on user action in a particular cell of a normal table ...
Can I get the snippet of code to achieve the same ..
Regards,
Karthik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.