‎2019 May 29 8:13 AM
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!!
‎2019 May 29 5:19 PM
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.
‎2019 May 30 2:13 AM
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 ).