on 11-24-2011 9:13 AM
Hey there,
I have an Application with an WD_SALV Grid. The Grid contains two Fields, which have a CELL_EDITO set to DROPDOWN_BY_KEY.
At WDDOINIT the first field is filled with main-categories. That's all fine. In order of the choosen value, the second field should have the right valueset for the secondary categorietypes for the main category.
I catch the Event "CHANGE" of the DD_BY_KEY and read the choosen Category. Then I select the secondary categories for the choosen one and bring it over the NODE_INFO-Reference with SET_ATTRIBUTE_VALUE_SET to the Node at the right field. All is fine an no Error comes up. But in the ALV the DD-Field is empty.
What is my mistake? Can anyone help me??
Best regards
Heiner Tiling
why dont you write some code in ONSELECT action of first ddbk .
write code conditionally.....if first ddbk value is xxxx then one value set for second ddbk or if it is yyyy then another valuesset.
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, I tried to do this. But nothing happend. It's the Event "CHANGE" of the ALV-Grid (SALV_WD_TABLE). I wrote my Code to a separate Method and called this Message from various other Methods. From WDDOMODIFY, from the Eventhandler for the CHANGE-Event and at WDAFTERACTION.
The effect I want to get, I did'nt get.
I think, that you can only put new valuesets at WDDOINIT to a node. Is that right?
Best regards
Heiner Tiling
OK. Thanks for your quick answer!
Here is my code:
DATA: lr_nd_detail TYPE REF TO if_wd_context_node,
lr_nd_info TYPE REF TO if_wd_context_node_info.
DATA: lt_dd_value TYPE wdr_context_attr_value_list,
lt_kat TYPE /otto/mss_t_kat1tx,
lt_kat2 TYPE /otto/mss_t_kat2tx.
DATA: ls_dd_value TYPE wdr_context_attr_value,
ls_kat TYPE /otto/mss_kat1tx,
ls_kat2 TYPE /otto/mss_kat2tx.
Knoteninfo-Referenz
lr_nd_detail = wd_context->get_child_node( 'DETAIL' ).
lr_nd_info = lr_nd_detail->get_node_info( ).
Daten für Hauptkategorien lesen
SELECT * FROM /otto/mss_kat1tx INTO TABLE lt_kat
WHERE langu = sy-langu.
MOVE lt_kat TO wd_this->t_kat1.
LOOP AT lt_kat INTO ls_kat.
MOVE: ls_kat-id TO ls_dd_value-value,
ls_kat-text TO ls_dd_value-text.
APPEND ls_dd_value TO lt_dd_value.
ENDLOOP.
Werte in die Knoteninfo eintragen
lr_nd_info->set_attribute_value_set(
EXPORTING
name = 'KATEGORIE'
value_set = lt_dd_value ).
This I do at WDDOINIT. All is fine and the DropDown is filled!
At ON_CELL_ACTION of the ALV-Grid, I did the same for the second DD-Field, but the field is already empty. So where is my mistake?
Best regards
Heiner Tiling
hi,
please check the article below.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d4f5b6-fd1b-2e10-3190-823bcaff92d7
regards,
sahai.s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your link. It doesn't match my problem.
You see, I filled my DropDownbox, so I know how to set it up. But the second fields values should be in order of what you select at the first. But my DD-Field is empty after setting the valueset to the node.
Any other tips??
Best regards
Heiner Tiling
try using on_cell_action
for details follow the link below.
http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtotriggertheeventON_CELL_ACTIONin+ALV
or
on_data_check
http://help.sap.com/saphelp_nw70/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/content.htm
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
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.