cancel
Showing results for 
Search instead for 
Did you mean: 

Step by step radiobutton creation ABAP Web Dynpro

Former Member
0 Kudos

Hi Experts,

I got a question, I tried researching online but most of the tutorials I found do not make any sense to me, and the ones that do do not work. I need to radiobuttons created in my view in ABAP WD and make certains parts dissappear depending on which radio button is selected - Yest I am getting the error when trying to assign values from the context to the radio buttons. I tried both RadioButtonGroupByIndex and RadioButtonGroupByKey, and can't figure out how to use them. It does not matter to me which I will get working as long as it will not give me a dump.

Please help

Regards,

Hubert

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

You need to bind the context node as source for property texts in the radiobutton group. So now your radiobuttons will take values from the node.

As for the visibility you can try using an attribute of type boolean and bind them to the visible property of those elements.

Regards,

Taiyeb

Former Member
0 Kudos

I know about the visibility thank you. Would it be sufficient if I make internal table in the code, then populate it with my own values, and bind that internal table to the node?

Answers (2)

Answers (2)

Former Member
0 Kudos

Okay thank you solved the issue on my own I used Harsha's tutorial and modified it a little. It works perfectly now. Thank you everyone!

Former Member
0 Kudos

DATA:

           LO_ND_NODE type ref to IF_WD_CONTEXT_NODE,

           LO_EL_NODE type ref to IF_WD_CONTEXT_ELEMENT,

           LT_NODE type WD_THIS->ELEMENTS_NODE,

           LS_NODE type WD_THIS->ELEMENT_NODE,

           it_vals TYPE STANDARD TABLE OF STRING,

           wa_vals TYPE STRING,

           context_node TYPE REF TO if_wd_context_node.

   LO_ND_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_NODE ).

   wa_vals = 'dupa'.

   APPEND wa_vals TO it_vals.

   wa_vals = 'dupa2'.

   APPEND wa_vals TO it_vals.

   context_node = wd_context->get_child_node( name = 'NODE').

*                   Note: test_node' is the name you gave you new node

   context_node->bind_table( it_vals ).



This is the code I have and it's causing this error:




harsha_jalakam
Active Contributor
Former Member
0 Kudos

This is helpful but from my understanding one attribute is called 3 different names throughout the tutorial so it is difficult to understand what's going on. The tutorial is badly written and barely understandable - anyway I tried to do what's in the tutorial and I get that attribute SELETEXT could not be found, even though it's right there...