2009 Aug 24 7:26 AM
Hi,
I have to implement "Select-All" property, of a button in normal report programming, in webdynpro.
Can somebody help me in this regard.
Regards,
Soumya
2009 Aug 26 7:42 AM
*need to have a button and this is the corresponding action triggered when u press that button.
method ONACTIONDESELECTALL .
data:
Node_Zrfc type ref to If_Wd_Context_Node,
Node_Changing type ref to If_Wd_Context_Node,
Node_Itab type ref to If_Wd_Context_Node,
Elem_Itab type ref to If_Wd_Context_Element,
Stru_Itab type If_Zview=>Element_Itab .
navigate from <CONTEXT> to <ZRFC> via lead selection
Node_Zrfc = wd_Context->get_Child_Node( Name = IF_ZVIEW=>wdctx_Zrfc ).
navigate from <ZRFC> to <CHANGING> via lead selection
Node_Changing = Node_Zrfc->get_Child_Node( Name = IF_ZVIEW=>wdctx_Changing ).
navigate from <CHANGING> to <ITAB> via lead selection
Node_Itab = Node_Changing->get_Child_Node( Name = IF_ZVIEW=>wdctx_Itab ).
data: size type i,
var type i.
size = node_itab->get_element_count( ).
var = 1.
do size times.
node_itab->set_selected( flag = abap_false index = var ).
var = var + 1.
enddo.
endmethod.
Hi,
I have to implement "Select-All" property, of a button in normal report programming, in webdynpro.
Can somebody help me in this regard.
Regards,
Soumya
2009 Aug 24 11:18 AM
2009 Aug 24 1:10 PM
Hi Soumya .
You can use the following code :
itab :- internal table with a field check -->value of field Check = X if checked .
The ok_code associated with Select all button is SELECTALL
In user command following code :-
IF OK_CODE eq 'SELECTALL'.
LOOP AT itab.
itab-check = 'X'.
MODIFY itab.
ENDLOOP.
endif.You can also refer to the following link .
Hope this helps .
Thanks and Regards
Aditi Wason
2009 Aug 26 7:42 AM
*need to have a button and this is the corresponding action triggered when u press that button.
method ONACTIONDESELECTALL .
data:
Node_Zrfc type ref to If_Wd_Context_Node,
Node_Changing type ref to If_Wd_Context_Node,
Node_Itab type ref to If_Wd_Context_Node,
Elem_Itab type ref to If_Wd_Context_Element,
Stru_Itab type If_Zview=>Element_Itab .
navigate from <CONTEXT> to <ZRFC> via lead selection
Node_Zrfc = wd_Context->get_Child_Node( Name = IF_ZVIEW=>wdctx_Zrfc ).
navigate from <ZRFC> to <CHANGING> via lead selection
Node_Changing = Node_Zrfc->get_Child_Node( Name = IF_ZVIEW=>wdctx_Changing ).
navigate from <CHANGING> to <ITAB> via lead selection
Node_Itab = Node_Changing->get_Child_Node( Name = IF_ZVIEW=>wdctx_Itab ).
data: size type i,
var type i.
size = node_itab->get_element_count( ).
var = 1.
do size times.
node_itab->set_selected( flag = abap_false index = var ).
var = var + 1.
enddo.
endmethod.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |