cancel
Showing results for 
Search instead for 
Did you mean: 

How can u give a value to node at runtime?

Former Member
0 Kudos

Hi All,

in my ALV report i have a column of checkbox.i want to give the value to that attribute at runtime.How can i do this?

Regards,

ravi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi ravi...

read the attribute that is bound to the checkbox and pass the value 'x' to it usitn det_attribute method.

---regards,

alex b justin

Former Member
0 Kudos

Hi alex,

what i need is,I have a column of checkbox in my ALV.if user select any of checkbox that value must be updated to node as X.

How can i achieve this?

DATA:lr_node_ep_sch_info type ref to IF_WD_CONTEXT_NODE.

lr_node_ep_sch_info = WD_CONTEXT->GET_CHILD_NODE( WD_THIS->WDCTX_EP_SCH_INFO ).

lr_node_ep_sch_info->get_attribute( exporting name = 'CHK_BOX' ).

is it work?

Regards,

Ravi

Former Member
0 Kudos

hi ravi.....

when you bind an attribute to check box, the attribute automatically gets filled with the value, when the user clicks it. you need not give any code for that. if you want to check the box without any clicking then the code is

 lr_node_ep_sch_info->set_attribute( exporting name = 'CHK_BOX' 
value = 'X' ).

---regards,

alex b justin

Former Member
0 Kudos

Hi,

if your 'CHK_BOX' attribute is of the type wdy_boolean,

it will bedome X when checked and initial when unchecked automatically.

When this is now of character type, try to change it.

grtz,

Koen

Former Member
0 Kudos

hi ravi.....

you should also give an importing parameter. best is to use the code wizard to read the attribute.

---regards,

alex b justin

Former Member
0 Kudos

Hi alex,

just i have to get the checked checkbox value as ' X' .AND it has bind to the node.

then what i wrote is enough for that?

Regards,

ravi

Former Member
0 Kudos

Hi alex ,

another issue what i am facing is,i want to display column of CHECKBOXes in my ALV.

for that i declare atrribute of type CHECKBOX.

And i write the following code.

lr_column_settings ?= l_value.

lt_columns = lr_column_settings->get_columns( ).

  • loop over table - in each loop another column can be modified

LOOP AT lt_columns INTO ls_column.

IF ls_column-id = 'CHK_BOX'.

CREATE OBJECT lr_chk_box

EXPORTING

checked_fieldname = ls_column-id.

lr_chk_box->set_read_only( ABAP_FALSE ).

  • lr_chk_box->set_read_only_fieldname( 'ALV_FINAL_STATUS' ).

ls_column-r_column->set_cell_editor( lr_chk_box ).

even i cant able to get checkbox in my ALV.

IT is displaying as general field.

what can i do?

Regards,

Ravi

Former Member
0 Kudos

hi ravi.....

your coding is missing the importing parameter.

lr_node_ep_sch_info->get_attribute( exporting name = 'CHK_BOX'

importing

value = <value_name> ).

---regards,

alex b justin