Radion buttons under a radio button.

Hi-
I have a selection screen with two radio buttons.
I have the requirement where when I select the first radio button two other radio buttons under the selected radio button should appear.
Can anyone help me to acheieve this functionality.
Thanks.
Ramesh.

Take a look at this...
type-pools: icon.
data: switch.
selection-screen begin of block b2 with frame title text-001.
parameters: radio radiobutton group rnd user-command test default 'X',
            radio2 radiobutton group rnd.
selection-screen end of block b2.
selection-screen begin of block b1 with frame title text-001.
parameters:
           test type bkpf-belnr modif id sc1.
selection-screen end of block b1.
selection-screen begin of block b3 with frame title text-001.
parameters:
           test1 type bkpf-belnr modif id sc2.
selection-screen end of block b3.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
  IF SCREEN-GROUP1 = 'SC1' AND RADIO EQ 'X'.
    SCREEN-ACTIVE = '0'.
    MODIFY SCREEN.
    CONTINUE.
  ELSEIF SCREEN-GROUP1 = 'SC2' AND RADIO2 EQ 'X'.
    SCREEN-ACTIVE = '0'.
    MODIFY SCREEN.
    CONTINUE.
  ENDIF.
ENDLOOP.
start-of-selection.
Kindly stealed from Rich Heilman -;)
Greetings,
Blag.

Similar Messages

  • How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?

    How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
    I’m creating a form where the user has three options to make a payment.
    1. charge to my credit card
    2. charge associated costs to bank account
    3. By cheque or money order
    My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
    Thanks in advance guys

    You will have to use custom JavaScript to access the various properties of the field object.
    The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
    Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
    Disabling (graying-out) Form Fields
    >> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
    Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
    If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
    If you want actual code you need to provide a lot more details.
    It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas.

  • How does the copy button work in safari for ipad (copy button under facebbok share button)?

    How does the copy button work in safari for ipad (copy button under facebbok share button)?

    On a website ...  
    Tap the Action icon bottom of that window. (white square with a right facing arrow) then tap Facebook.
    You should see the following depending on the what content the website can share.
    Copy / Mail / Message / Twitter / Print  / Bookmark

  • Change Button content when Radio button clicked...

    Within my BSP code I have an OnClientClick event against the Radio button tag.
    What I need to do is to have some kind of Javascript that changes the context (text) or colour of a button if the Radio button is clicked.
    I know very little of how to achieve this and would relish any guidance about how I can get this to work.
    I understand that I need to use a reference/handle to the button and change it's values via javascript, but how can I embed this code into my BSP code, what code do I use, and more importantly how can I obtain this reference/handle on the buttion?.
    Jon

    Hi Jon,
    below an Example to do this
    (due to security forum restriction replace scrip t with script and o nclick with onclick)
    <html>
    <head>
    <scrip t>
    function change_button_text(v_object){
    var button = document.getElementById("id_button");
    var new_text = v_object.value + ' Clicked!';
    if (button.childNodes[0])
            button.childNodes[0].nodeValue=new_text;
        else if (button.value)
            button.value=new_text;
    </scrip t>
    </head>
    <body>
    <form>
    <input type="radio" name="***" value="male" o nclick="change_button_text(this)"/> Male<br />
    <input type="radio" name="***" value="female" o nclick="change_button_text(this)"/> Female
    </form>
    <button id="id_button">Button Text</button>
    </body>
    </html>
    Edited by: alessandro spadoni on Apr 28, 2011 9:56 AM

  • Autofill a radio button using other radio buttons

    I would like a question on my form "Q24 Decrease Smoke" (set of "Yes"/"No" radio buttons) to auto fill with a response of "No" if the user selects "Not at all" to 3 other questions (also sets of radio buttons).  If the user selects any other response to any of these 3 questions, I want the user to be able to manually select either "Yes" or "No". This is the code that I've tried, under the Mouse Up event of the "No" radio button option for Q24:
    var a = getField("Q20 Smoke Cig").value;
    var b = getField("Q22 Smoke other forms").value;
    var c = getField("Q23 chew/snuff").value;
    if(a=="Not at all" && b=="Not at all" && c=="Not at all") event.value = "On";
    I'm new to Javascript, so am not entirely sure I am on the right track or what might be wrong here. Any help would be greatly appreciated. Thanks!

    Have you tried to the set the value to to "No"?
    The "Mouse Up" action only works when there is a "Mouse Up" action for the field.
    I would look at using the script in the 'On Blur" action for the 3 fields with adjustments for the fields as needed for the field where the script is used.

  • Add radio button when a radio button is selected (pop up)

    How do you Add a 2 radio buttons when (pop up when d1 is
    selected)
    For example d1a and d1b
    When d1 is selected.
    <cfoutput>
    <cfif isdefined("url.msg")>
    #urldecode(url.msg)# <BR />
    </cfif>
    </cfoutput>
    <table border="0" cellpadding="5">
    <form id="form1" name="form1" method="post"
    action="index.cfm?action=actSearch">
    <tr>
    <td>please enter id no: </td>
    <td><input type="text" name="nbr" /></td>
    </tr>
    <tr>
    <td>B1: </td>
    <td><input type="Radio" name="bd" value="b1"
    checked="checked"></td>
    </tr>
    <tr>
    <td>D1: </td>
    <td><input type="Radio" name="bd"
    value="d1r"></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="submit" name="Submit"
    value="Submit" /></td>
    </tr>
    </form>
    </table>

    As you may already know, ColdFusion code runs on the server.
    It's not sent out to the web browser. It sends out HTML to the
    browser. And what you want to do here is regonize a change that
    occurs in the web browser without submitting the form. The way you
    can do this is AJAX. If you haven't already done so, check out the
    ColdFusion / AJAX library here :
    http://ajaxcfc.riaforge.org/.
    This will give you a good framework of code to use to do this so
    you won't have to reinvent the wheel.

  • Using Back button issue for radio button

    Dear All,
    My initial screen has 2 radio buttons, on selecting will take to a selection screen with few fields, i have enabled the back button using MODULE user_command AT EXIT-COMMAND.
      when i select a Radio Button 1 which takes to the Selection Screen 1, if the user clicks back button it works fine, even thou we got a mandatory field, it goes back,
    however when i click Radio Button 2 it still takes me to Selection Screen 1, its the same vice versa.
    Is there anyway i can change the screen based on radio button entry

    Hi Krishan,
    You can call your desire selection screen based on the button click.
    if you are working on report program (SE38), then say you have two radio button p1 and p2 and also you have created two selection screen block B1 and B2 and each block has some selection screen elements i.e fields.
    Now if you want that after radio button click b1, you want the only selection screen block B1 and while clicking radio button b2 click ,you want only selection screen block B2.
    Two acheive this in report programming, use the event AT SELECTION-SCREEN OUTPUT.
    so a demo code for the same,
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-049.
    PARAMETERS: p_header RADIOBUTTON GROUP asim USER-COMMAND s DEFAULT 'X',
                                p_item RADIOBUTTON GROUP asim.
    SELECTION-SCREEN END OF BLOCK lim.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-051.
    PARAMETERS : p_vbeln TYPE vbak-vbeln MODIF ID sc1,
                  p_audat TYPE vbak-audat MODIF ID sc1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-050.
    PARAMETERS : p_vbeln1 TYPE vbap-vbeln MODIF ID sc2,
                                 p_posnr TYPE vbap-posnr MODIF ID sc2.
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
       IF p_header EQ 'X'.
         LOOP AT SCREEN.
           IF screen-group1 = 'SC1'.
             screen-active = '1'.
           ELSEIF screen-group1 = 'SC2'.
             screen-active = '0'.
           ENDIF.
           MODIFY SCREEN.
         ENDLOOP.
       ELSEIF p_item EQ 'X'.
         LOOP AT SCREEN.
           IF screen-group1 = 'SC2'.
             screen-active = '1'.
           ELSEIF screen-group1 = 'SC1'.
             screen-active = '0'.
           ENDIF.
           MODIFY SCREEN.
         ENDLOOP.
       ENDIF.
    If you are working with Module POOL, then code in the PAI of the screen, and call your respective screen while respective button click.
    code:
    MODULE user_command_900 INPUT.
         IF p1 EQ 'X'.
              CALL SCREEN 9001.
         ELSEIF p2 EQ 'X'.
              CALL SCREEN 9002.
         ENDIF.
    NOTE: your screen 9001 have some screen input fields and 9002 have some screen input fields.
    Thanks & Regards
    Syed

  • How to enable/disable an image button when one radio button is checked?

    The checked radio needs to equated with some value , if it returns true, then the Image button for submit should be disabled.otherwise, it needs to be disabled always.please help me to pass th' this requirement.
    Thanks in Advance

    look for a function like setActive or setDisable

  • Radio button in bdc multiple transaction

    hi,
        i m working on two dependent transactions in bdc(using call transaction method) on ie01 and ko01 transactions where in in the selction screen i used two radio buttons under one group for calling each transaction,but i m unable to call ko01 transaction when i click to ko01 radiobutton and press execute its going into ie01 transaction,can any one explain how we can write the code to call two transactions seperately and upload data seperatly for both under single radio button group in single pgm......

    Hi Raj,
         Can you please send me the BDC code which you have written for tcode ko01.  I am getting the following problem in BDC code for uploading internal orders in KO01 tcode.
       I want to enable a field in BDC program for ko01 tcode.
    In this tcode, based on order type the business area field is enabling and disabling. If it is enabled then we have to enter business area bcaz its a mandatory field. Business area will be disabled if system generates a value into that field based on order type.
    How can do it in BDC program of this disabling and enabling technique.
    I want to enable the business area irrespective of order type and i will pass the value to it,bcaz in my flat file business area value is given for all order types.
    Its an urgent issue.
    Thanks in Advance.
    Regards,
    Swapna

  • Acrobat 9-forms-Radio buttons print different than check boxes

    I am using Acrobat Pro 9 to create forms.
    I've used both radio buttons and check boxes (that are circles).
    Forms were designed in InDesign with Zapf Dingbats as the open circles to be filled in.
    I used radio buttons when the user had to pick one over the other.
    I used check boxes when there were multiple choices or I wanted the user to be able to uncheck a box. (I used the circle style so they would look like radio buttons).
    The radio buttons are printing differently than the check boxes. It looks almost like there is an overlay on top of the actual open circle created by Zapf Dingbats.
    I checked the "appearance" window and there is no border or fill color on the radio buttons (same for the check boxes).
    Under the <general> tab, <common properties> is visible. I'm assuming it should be in order for the radio button to appear on the form.
    I would appreciate any input as to how to fix this.
    Thansk!
    Maureen

    That's just the way radio buttons are, and one reason I rarely use them in preference to check boxes. If Adobe wanted to, they could allow you to use any appearance you want for both the selected an unselected state of a check box or radio button, but they've actually further restricted your options over the years.

  • Hide/Show Radio Buttons

    Hi friends,
    I have a radio button page item which is showing two values like
    <li>4 Stars
    <li>5 Stars
    I need to show these two radio buttons according to the employee number that is firing on the field Employee Number.
    Suppose, for an example i need to show 4 Stars if he is an ordinary employee. If he is an CEO means then it has to show both 4 Stars and 5 Stars button.
    How i can achieve it friends..
    For that i tried by using DA, but it failed. I have the query to restrict the radio buttons according to the employee number which is working fine in sql developer at the back end. But im going wrong in implementing it in APEX via DA, as it is not working over there.. This is the query
    SELECT '5/Stars' d, '5/Stars' r
    FROM DUAL
    WHERE (:P85_EMP_NUMBER) = (SELECT employee_number
    FROM apps.xxhy_ams_details_v
    WHERE UPPER (job_name) = 'CEO')
    UNION
    SELECT '4/Stars' d, '4/Stars' r
    FROM DUAL
    WHERE (:P85_EMP_NUMBER) IN
    (SELECT employee_number
    FROM apps.xxhy_ams_details_v
    WHERE grade_name BETWEEN 1 AND 4
    OR (:P85_EMP_NUMBER) =
    (SELECT employee_number
    FROM apps.xxhy_ams_details_v
    WHERE UPPER (job_name) = 'CEO'))
    UNION
    SELECT '4/Stars' d, '4/Stars' r FROM DUALBrgds,
    Mini

    Hello
    Are you using a Select List or other LOV item for employee selection?
    If you are you can use cascading lov under the radio button
    - you add <emplyee select list item> to Cascading LOV Parent Item(s) and to Page Items to Submit
    - and then on the List Value Definition you use something like:
    SELECT '5/Stars' d, '5/Stars' r
    FROM DUAL
    WHERE :P2_EMPLOYEE = (SELECT EMPNO FROM EMP WHERE JOB LIKE 'PRESIDENT') --:P2_EMPLOYEE is select list
    UNION
    SELECT '4/Stars' d, '4/Stars' r FROM DUAL
    If you are receiving employee number on your page you can just use List Value Definition of radio button like:
    SELECT '5/Stars' d, '5/Stars' r
    FROM DUAL
    WHERE :P2_EMPLOYEE2 = (SELECT EMPNO FROM EMP WHERE JOB LIKE 'PRESIDENT') --:P2_EMPLOYEE is text field or hidden
    UNION
    SELECT '4/Stars' d, '4/Stars' r FROM DUAL

  • How to define  parameters with radio button

    HI
      How to define  parameters with radio button, but that radio button should display in front of the variable name not after variable name. and under that radio button variable I hve to define parameters, select-options and some other radiobutton varibles.
            I don't know how to paste figures here, otherwise i will provied u the figure for more details.
    Regards.

    PARAMETERS : r1 RADIOBUTTON GROUP radi.
    Go to --> text elements --> selection text
    R1    <your text>
    You can change the program selection screen lay out in screen painter (se51) .
    screen number for your selection screen is 1000.
    Regards,
    Santosh reddy
    Edited by: Santosh Reddy on Dec 9, 2008 11:21 AM

  • Radio Buttons, Global Binding, and Change Event

    I have a pair of radio button groups with the same name that I have set to Global binding.  The radio buttons in these radio button groups have script in the change event.  The problem is, when I click on a button in one group, it doesn't fire the change event in the other one, even though the corresponding button changes.  I can work around this, but I'm curious why this doesn't work.

    ocen12 is correct - the change event will only fire when a user clicks on the radiobutton. It will not fire when a script changes the value. I tried it here and found that the radio buttons on both groups act like they are under the same exclusion group. Do you see the same thing? If I select a value in the second exclusion group any value I had in the 1st one is gone.
    Paul

  • Why does is not show the radio buttons

    I want to display the buttons in a row then radio button in a row under the button and then log scroll pane under the radio buttons. This is my code:
            //Add the buttons and the log to this panel.
            add(buttonPanel, BorderLayout.PAGE_START);
            add(radioPanel, BorderLayout.CENTER);
            add(logScrollPane, BorderLayout.CENTER);When i run it it display the buttons and the logsrollpane. Why does it not display the radio buttons?

    Thanks guys.
    This is my problem. We have a big system that produce lots of log files and the software testers have to manually have to go through the logs file and look for a certain XML tags in the log file.
    What I want to do is help the software testers my developing a small tool that will allow them to open a log file and then click on a radio button corresponding to a xml tags that they are looking for and automatically highlight the tags in the file in yellow color .
    I am not sure how feasible this is and I am stuck.
    This is what I have done so far.
    Can you please guys help me go forward.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FileChooserDemo extends JPanel
                                 implements ActionListener {
        static private final String newline = "\n";
        JButton openButton;
        JButton clearButton;
        JTextArea log;
        JFileChooser fc;
        // Radio Buttons
        static String em01 = "EM01";
        static String em07 = "EM07";
        /*static String dogString = "Dog";
        static String rabbitString = "Rabbit";
        static String pigString = "Pig";*/
        public FileChooserDemo() {
            super(new BorderLayout());
            //Create the radio buttons.
            JRadioButton em01Button = new JRadioButton(em01);
            em01Button.setMnemonic(KeyEvent.VK_B);
            em01Button.setActionCommand(em01);
            em01Button.setSelected(true);
            JRadioButton em07Button = new JRadioButton(em07);
            em07Button.setMnemonic(KeyEvent.VK_C);
            em07Button.setActionCommand(em07);
            //Group the radio buttons.
            ButtonGroup group = new ButtonGroup();
            group.add(em01Button);
            group.add(em07Button);
            //Register a listener for the radio buttons.
            em01Button.addActionListener(this);
            em07Button.addActionListener(this);
            //Put the radio buttons in a column in a panel.
            JPanel radioPanel = new JPanel(new GridLayout(0, 1));
            radioPanel.add(em01Button);
            radioPanel.add(em07Button);       
            //Create the log first, because the action listeners
            //need to refer to it.
            log = new JTextArea(40,60);
            log.setMargin(new Insets(5,5,5,5));
            log.setEditable(false);
            JScrollPane logScrollPane = new JScrollPane(log);
            //Create a file chooser
            fc = new JFileChooser();
            //Uncomment one of the following lines to try a different
            //file selection mode.  The first allows just directories
            //to be selected (and, at least in the Java look and feel,
            //shown).  The second allows both files and directories
            //to be selected.  If you leave these lines commented out,
            //then the default mode (FILES_ONLY) will be used.
            //fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            //fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
            //Create the open button.  We use the image from the JLF
            //Graphics Repository (but we extracted it from the jar).
            openButton = new JButton("Open File");
            openButton.addActionListener(this);
            //Create the save button.  We use the image from the JLF
            //Graphics Repository (but we extracted it from the jar).
            clearButton = new JButton("Clear Text Area");
            clearButton.addActionListener(this);
            //For layout purposes, put the buttons in a separate panel
            JPanel buttonPanel = new JPanel(); //use FlowLayout
            buttonPanel.add(openButton);
            buttonPanel.add(clearButton);
            //Add the buttons and the log to this panel.
            add(buttonPanel, BorderLayout.PAGE_START);
            add(radioPanel, BorderLayout.LINE_START);
            add(logScrollPane, BorderLayout.CENTER);
        public void actionPerformed(ActionEvent e) {
            //Handle open button action.
            if (e.getSource() == openButton) {
                int returnVal = fc.showOpenDialog(FileChooserDemo.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                     log.setText("");
                    File file = fc.getSelectedFile();
                    try{
                         BufferedReader in = new BufferedReader(new FileReader(file));
                             String data;
                             while ((data = in.readLine()) != null) {
                                  log.append(data + newline);
                    }catch(IOException ioe){
                log.setCaretPosition(log.getDocument().getLength());
            //Handle save button action.
            }else if (e.getSource() == clearButton) {
                  log.setText("");
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("PROGRESS Message Viewer");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new FileChooserDemo();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

  • Transaction with 3 Radio Buttons

    Hi All,
    In a transaction i have a three radio buttons in which
    When the user selects first radio button, the field under first radio button should be input-enabled. Else, they should be input disabled. User should enter only one of the two fields.
    When the user selects second radio button, the field should be input-enabled. Else, it should be input disabled.
    When the user selects Third radio button, the field should be input-enabled. Else, it should be input disabled.
    There should be a pushbutton on the screen,  The text on the pushbutton should vary depending on the radio button checked.
    could any one please help me
    Regards,
    sathish

    Hi,
    Use the below code.
    selection-screen: begin of block blk1 with frame.
    selection-screen: begin of line.
    parameters: p_r1 radiobutton group rad1 default 'X' user-command rusr.
    selection-screen position 10.
    parameters: p_text1(20).
    selection-screen: end of line.
    selection-screen: begin of line.
    parameters: p_r2 radiobutton group rad1.
    selection-screen position 10.
    parameters: p_text2(20).
    selection-screen: end of line.
    selection-screen: begin of line.
    parameters: p_r3 radiobutton group rad1.
    selection-screen position 10.
    parameters: p_text3(20).
    selection-screen: end of line.
    selection-screen: end of block blk1.
    DATA flag(1) TYPE c.
    SELECTION-SCREEN:BEGIN OF LINE.
    SELECTION-SCREEN:PUSHBUTTON 2(10) v_text USER-COMMAND cli1.
    SELECTION-SCREEN:END OF LINE.
    at selection-screen output.
      v_TEXT = 'Rad1'.
    if p_r1 = 'X'.
    v_TEXT = 'Rad1'.
    clear: p_text2, p_text3.
    loop at screen.
      if screen-name = 'P_R1' or
         screen-name = 'P_R2' or
         screen-name = 'P_R3'.
      continue.
      endif.
      if screen-name = 'P_TEXT2' or
         screen-name = 'P_TEXT3'.
         screen-input = 0.
      endif.
      modify screen.
    endloop.
    endif.
    if p_r2 = 'X'.
    v_TEXT = 'Rad2'.
    clear: p_text1, p_text3.
    loop at screen.
      if screen-name = 'P_R1' or
         screen-name = 'P_R2' or
         screen-name = 'P_R3'.
      continue.
      endif.
      if screen-name = 'P_TEXT1' or
         screen-name = 'P_TEXT3'.
         screen-input = 0.
      endif.
      modify screen.
    endloop.
    endif.
    if p_r3 = 'X'.
    v_TEXT = 'Rad3'.
    clear: p_text1, p_text2.
    loop at screen.
      if screen-name = 'P_R1' or
         screen-name = 'P_R2' or
         screen-name = 'P_R3'.
      continue.
      endif.
      if screen-name = 'P_TEXT1' or
         screen-name = 'P_TEXT2'.
         screen-input = 0.
      endif.
      modify screen.
    endloop.
    endif.
    if p_r1 = 'X'.
      clear: p_r2, p_r3.
      loop at screen.
      if screen-name = 'P_TEXT2' or
         screen-name = 'P_TEXT3'.
         screen-input = 0.
      elseif screen-name = 'P_TEXT1'.
         screen-input = 1.
      endif.
      modify screen.
      endloop.
    elseif p_r2 = 'X'.
    clear: p_r1, p_r3.
      loop at screen.
      if screen-name = 'P_TEXT1' or
         screen-name = 'P_TEXT3'.
         screen-input = 0.
      elseif screen-name = 'P_TEXT2'.
         screen-input = 1.
      endif.
      modify screen.
      endloop.
    elseif p_r3 = 'X'.
      clear: p_r1, p_r2.
      loop at screen.
      if screen-name = 'P_TEXT1' or
         screen-name = 'p_TEXT2'.
         screen-input = 0.
      elseif screen-name = 'P_TEXT3'.
      screen-input = 1.
      endif.
      modify screen.
      endloop.
    endif.

Maybe you are looking for