Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Re: how to call a radiobutton from radiobutton and how to add in webdynpro abap

$
0
0

DEAR HAWKINS,

                                          how can i solve it..pleasee help me to  resolve this


select of first radio buttoon rgp method,

 

method ONACTIONON_SELECT .

   DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.

   DATA lo_el_radio_a TYPE REF TO if_wd_context_element.

   DATA ls_radio_a TYPE wd_this->Element_radio_a.

   DATA lv_radio1 TYPE wd_this->Element_radio_a-radio1.

 

   DATA lo_el_context TYPE REF TO if_wd_context_element.

   DATA ls_context TYPE wd_this->Element_context.

   DATA lv_visibility TYPE wd_this->Element_context-visibility.

 

* navigate from <CONTEXT> to <RADIO_A> via lead selection

   lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).

 

* @TODO handle non existant child

* IF lo_nd_radio_a IS INITIAL.

* ENDIF.

 

* get element via lead selection

   lo_el_radio_a = lo_nd_radio_a->get_element( ).

* alternative access  via index

* lo_el_radio_a = lo_nd_radio_a->get_element( index = 1 ).

* @TODO handle not set lead selection

**  IF lo_el_radio_a IS INITIAL.

**  ENDIF.

 

* get single attribute

   lo_el_radio_a->get_attribute(

     EXPORTING

       name `RADIO1`

     IMPORTING

       value = lv_radio1 ).

 

 

* get element via lead selection

   lo_el_context = wd_context->get_element( ).

 

   IF lv_radio1 = 'x'.

     lv_visibility = 02.

   else.

     lv_visibility = 01.

 

   ENDIF.

 

* @TODO handle not set lead selection

**  IF lo_el_context IS INITIAL.

**  ENDIF.

 

* @TODO fill attribute

* lv_visibility = 1.

 

* set single attribute

   lo_el_context->set_attribute(

     name `VISIBILITY`

     value = lv_visibility ).

 

endmethod.



select of second radio button nrgp

method ONACTIONON_SELECT1 .

 

      DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.

      DATA lo_el_radio_a TYPE REF TO if_wd_context_element.

      DATA ls_radio_a TYPE wd_this->Element_radio_a.

 

*    navigate from <CONTEXT> to <RADIO_A> via lead selection

      lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).

 

*    @TODO handle non existant child

*    IF lo_nd_radio_a IS INITIAL.

*    ENDIF.

 

*    get element via lead selection

      lo_el_radio_a = lo_nd_radio_a->get_element( ).

 

       ls_radio_A-key_to_select = ' x '.

       ls_radio_A-radio1 = '  '.

       ls_radio_A-radio2 = ' x '.

 

*    @TODO handle not set lead selection

**     IF lo_el_radio_a IS INITIAL.

**     ENDIF.

 

*    @TODO fill static attributes

*    ls_radio_a = xxx->get_yyy( ).

 

*    set all declared attributes

      lo_el_radio_a->set_static_attributes(

         static_attributes = ls_radio_a ).

 

endmethod.

 

and THE WDDOINIT METHOD

 

method WDDOINIT .

      DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.

      DATA lo_el_radio_a TYPE REF TO if_wd_context_element.

      DATA ls_radio_a TYPE wd_this->Element_radio_a.

      DATA lv_radio1 TYPE wd_this->Element_radio_a-radio1.

 

*    navigate from <CONTEXT> to <RADIO_A> via lead selection

      lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).

 

*    @TODO handle non existant child

*    IF lo_nd_radio_a IS INITIAL.

*    ENDIF.

 

*    get element via lead selection

      lo_el_radio_a = lo_nd_radio_a->get_element( ).

 

       ls_radio_A-key_to_select = ' x '.

       ls_radio_A-radio1 = ' x '.

       ls_radio_A-radio2 = '  '.

 

*    @TODO handle not set lead selection

**     IF lo_el_radio_a IS INITIAL.

**     ENDIF.

 

*    @TODO fill static attributes

*    ls_radio_a = xxx->get_yyy( ).

 

*    set all declared attributes

      lo_el_radio_a->set_static_attributes(

         static_attributes = ls_radio_a ).

 

 

 

 

 

 

 

*      navigate from <CONTEXT> to <RADIO_A> via lead selection

        lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).

 

*      @TODO handle non existant child

*      IF lo_nd_radio_a IS INITIAL.

*      ENDIF.

 

*      get element via lead selection

        lo_el_radio_a = lo_nd_radio_a->get_element( ).

*      alternative access  via index

*      lo_el_radio_a = lo_nd_radio_a->get_element( index = 1 ).

*      @TODO handle not set lead selection

*       IF lo_el_radio_a IS INITIAL.

*       ENDIF.

 

*      get single attribute

        lo_el_radio_a->get_attribute(

          EXPORTING

            name `RADIO1`

          IMPORTING

            value = lv_radio1 ).

 

endmethod...

 

radiobutton error1.jpg


Viewing all articles
Browse latest Browse all 8644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>