2018 Aug 04 3:17 PM
I created a programme with top include.
I defined my variables in top include and created a subscreen in a tabstrip control,
while defining a radio button group constisting of 2 radio buttons and after assigning a function code to both radiobuttons ,I initialized the value of them in PBO and in PAI I tried to check their values according to the user command/input.
For a reason , I check the radio button and it doesn't check. It reverts to the checked state of the first radio button.
got stuck for 2 days ,tried everything
kind regards
Spyros
2018 Aug 04 4:25 PM
2018 Aug 05 5:18 AM
Hi Spyros,
Select the two radio buttons(keep the cursor on the screen hold down and drag a rectangle) in the screen layout ->right click -> radio button group -> Define.
2018 Aug 05 5:20 AM
2018 Aug 05 5:23 AM
2018 Aug 05 12:45 PM
2018 Aug 05 12:45 PM
it does not work again,I ve drawn many rectangular objects to define a radio group , still does not work...
I ll try again...
2018 Aug 05 8:33 AM
I made a whole programme and it works,all tabstrip subscreens work to rule including text editors,modulethat assign the screen number to the dynpr, modules that check values etc
The sole problem I have is that radio buttons are not selected/checked.
might be sth petty...got stuck
i.e if I do not assign a function code to the radio button ,I can select/check it,
but then the PAI of the subscreen is not triggered ...
might be sth wrong while defining the radiobutton group?i mean have to keep ctrl pressed and click the second radio button at the same time?
2018 Aug 06 6:42 AM
First, if you declare radio button in top include, then you will be able to select radio button, check this please.
Second, to check function code in PAI, define them as group with fcode and check fcode + radio button value in PAI.
2018 Aug 06 8:12 AM
unfortunately I 've done all that allready!
i.e data: arad(1) type c ,"in top include declaration
brad(1) type c .
then assigned a funcion code
then check in PAI
but when select it won't get checked.
should it be helpful that it only gets checked if i do not assign a function code?(eventually the PAI is not triggered)
thanks for your feedback ..
2018 Aug 07 1:39 AM
its strange because i do the same thing and everything work fine...one more thing i can guess is you might be forgot to set OK_CODE in screen elements...
i upload my simple test program here incase you want to cross check:
main:
sub:
top:
CONTROLS MYTABSTRIP TYPE TABSTRIP.
DATA: OK_CODE TYPE SY-UCOMM,
SAVE_OK TYPE SY-UCOMM.
DATA: OPT1, OPT2.
MYTABSTRIP-ACTIVETAB = 'TAB1'.
command:
MODULE USER_COMMAND INPUT.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
IF SAVE_OK = 'OPT'.
CASE 'X'.
WHEN OPT1.
MESSAGE 'opt1' TYPE 'I'.
WHEN OPT2.
MESSAGE 'opt2' TYPE 'I'.
ENDCASE.
ENDIF.
ENDMODULE.