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

how do i fetch radiobutton text from internal table??

Former Member
0 Likes
1,039

I am trying to make an examination system using sap abap as my project.

I have created a z table with question text and the four options and the correct option.

But on the selection screen I am not able to write the options with the radiobuttons.

I want that on selection screen the question is displayed and then the four options be displayed with radiobutton where the user can choose one correct option. kindly help .

any other approach for examination system will be helpful!!

2 REPLIES 2
Read only

former_member288834
Participant
0 Likes
697

Hi Manish,

Its difficult to display the dynamic text for radio button in executable report(type 1)

It is possible using module pool(type M) screen, create screen and place radio buttons and I/O fields, it will work.

Regards

Guru Prasad.

Read only

DoanManhQuynh
Active Contributor
697

You can use selection-screen comment:

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: answer1 RADIOBUTTON GROUP rad.
SELECTION-SCREEN COMMENT (10) text1 FOR FIELD answer1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: answer2 RADIOBUTTON GROUP rad.
SELECTION-SCREEN COMMENT (10) text2 FOR FIELD answer2.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
  text1 = 'answer 1'.
  text2 = 'answer 2'.

or you can build a dynamic selection screen with cl_ci_query_attributes:

cl_ci_query_attributes=>generic(
  EXPORTING
    p_name       =  CONV #( sy-repid )
    p_title      =  'Test'
    p_attributes =  VALUE #( ( kind = 'R'
                                text = 'Anwser 1'
                                button_group = 'MOD'
                                ref = REF #( lv_mode_open ) )
                              ( kind = 'R'
                                text = 'Answer 2'
                                button_group = 'MOD'
                                ref = REF #( lv_mode_close ) ) )
      p_display    = abap_false ).