on 07-09-2011 7:32 AM
Hi there,
I've got a Table where for a few columns I defined cell variants.
It all works okay.
The thing is that in a particular cell in which I already inserted a DropDownByIndex I now need to insert a label as well, so two objects inside the same cell.
In fact the content of the cell changes, sometimes it refers to datatype X and other times to datatype Y and the user must know what the values displayed refer to.
How can I implement this?
Thanks
Did you try table column grouping? This way, you can have two columns under one header...
You can refer this help link for details [SAP Help|http://help.sap.com/saphelp_nw70/helpdata/en/b5/ac884118aa1709e10000000a155106/frameset.htm]
Search the page with columngroup for info...
Also, it is not possible to use a label as cell editor, instead you can use a text view...
Best regards,
Nadh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
i am not getting exactly what you want? can you be more clear.
As per my understand.. you want two values in Dropdownindex. i mean X Y. you want to display like this?
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I thought I made myself clear enough.
I want to display a TransparentContainer into a CellVariant because, that way, I can insert a label + DDBIndex.
Otherwise I can only insert a DDBIndex but then the end-user doesn't know what that refers to. In fact the column heading wouldn't be self explanatory since it would contain a description like "Cost Object" but the actual content of the cell could be a cost center, an internal order or something else. So a label within the cell is necessary.
Thank you for your input.
I usually solve this by using two columns - one with the "technical" drop-down value and another column next to it with a textView (not modifiable by the user) showing the related text or "non-technical" value - say, the plant name or whatever.
Then, based on the value the user selects in the first column, I set the value of the text column. This can be done as follows:
method onaction_plant .
data lo_nd_plants type ref to if_wd_context_node.
data lo_element type ref to if_wd_context_element.
data lv_selected_row type i.
data: lr_element type ref to if_wd_context_element.
lo_nd_plants = wd_context->get_child_node( name = wd_this->wdctx_plants ).
Find which line was clicked - this is not necessarily the same as the one which is "selected"
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
lv_selected_row = lr_element->get_index( ).
lo_element = lo_nd_plants->get_element( index = lv_selected_row ).
if not lo_element is initial.
me->set_plant_name( lo_element ). "This method retrieves the value for column number 2 and sets it
endif.
endmethod.
Regards,
Trond
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.