on 08-22-2011 2:22 PM
Hello Friends,
I had a requirement of adding a drop down in ALV, i eventually got it but I have some questions about it
I used the following code and got the drop down
lr_column = lr_column_settings->get_column( 'BWART' ).
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = 'BWART'.
lr_column->set_cell_editor( lr_input_field ).
DATA : LR_DROPDOWN TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.
CREATE OBJECT LR_DROPDOWN EXPORTING SELECTED_KEY_FIELDNAME = 'BWART'.
LR_COLUMN->SET_CELL_EDITOR( LR_DROPDOWN ).
DATA: LT_VALUESET TYPE TABLE OF WDR_CONTEXT_ATTR_VALUE,
LS_VALUESET TYPE WDR_CONTEXT_ATTR_VALUE,
LR_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
LR_NODEINFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
LR_NODE = WD_CONTEXT->GET_CHILD_NODE( 'RETURN_NODE' ).
LR_NODEINFO = LR_NODE->GET_NODE_INFO( ).
LS_VALUESET-VALUE = '973'.
LS_VALUESET-TEXT = '973'.
APPEND LS_VALUESET TO LT_VALUESET.
LS_VALUESET-VALUE = '222'.
LS_VALUESET-TEXT = '222'.
APPEND LS_VALUESET TO LT_VALUESET.
LR_NODEINFO->SET_ATTRIBUTE_VALUE_SET( EXPORTING NAME = 'BWART' VALUE_SET = LT_VALUESET ).
My question is ... how does 1 know which class to use? how to use that class... most of concepts about OOPS are clear.. but i still cant figure out how does 1 find out which class to use.. is it all by expericence..
In short: Yes, by experience. Then again, for WD4A there is a class for each UI-Element available. Once you know this, you can easily search se24 for CLWD<UI-NAME>* or the like.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.