cancel
Showing results for 
Search instead for 
Did you mean: 

Value of a checkbox before navigating from the screen ?

Former Member
0 Kudos

Hi All ,

I need to check the value of checkbox while navigating from a screen .

I have a few questions :

1 ) I tried doing this in the WDDOAFTERACTION . However , i was not getting the correct value .

Am i doing some mistake here ?

2) I thought I will create a event on this checkbox to read the value. ( its fine if i am able to read the value when user changes the status of the checkbox ) . But I am not able to create event on the chkbox . can we not create event on standard fields ?

Please advise .

Regards,

Ambar Patil.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

It did not work for me that way . What I could find was that the WDDOAFTERACTION is called only once , not always and that created problem for me .

However , I could find workaround for this .

Thanks guys for your support .

siongchao_ng
Contributor
0 Kudos

Hi Ambar,

This is how you can get the value of checkboxes:

DATA lo_nd_check_opt TYPE REF TO if_wd_context_node.

DATA lo_el_check_opt TYPE REF TO if_wd_context_element.

DATA ls_check_opt TYPE wd_this->Element_check_opt.

  • navigate from <CONTEXT> to <CHECK_OPT> via lead selection

lo_nd_check_opt = wd_context->get_child_node( name = wd_this->wdctx_check_opt ).

  • get element via lead selection

lo_el_check_opt = lo_nd_check_opt->get_element( ).

  • get all declared attributes

lo_el_check_opt->get_static_attributes(

IMPORTING

static_attributes = ls_check_opt ).

IF ls_check_opt-your_attribute_name = 'X'.

" do whatever you need here.

ENDIF.

Former Member
0 Kudos

normally what i would do is to get the value from the context attribute just before firing a plug .

Use the code generator to get the value of the context attribute.