Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select all button property in webdynpro

Former Member
0 Likes
559

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
473

*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

3 REPLIES 3
Read only

Former Member
0 Likes
473

Hi!

You can go through this liknk...

Regards

Read only

Former Member
0 Likes
473

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

Read only

Former Member
0 Likes
474

*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.