Radio Buttons + Required Input/Output Fields in Dialog Programming

Hi All,
Please find the below issue.
I have 2 Radio buttons
RB1 and RB2 defined in group RG.
And by default RB1 is selected.
I also have 3 Input.Output Fields.
F1 , F2  & F3.
Now before displaying the Screen for the end user,
I need to display as follows:
A)   
RB1 = X -
> Selected.
RB2  = Space -
>Not Selected.
F1 -
> Visible.
F2 & F3 -
>Invisible.
B)
RB1 = space -
> Not Selected.
RB2  = X -
>Selected.
F1 -
>Invisible.
F2 -
>Visible.
F3 -
>Visible.
When i am debugging, the value of RB1 is not X though it is selected on the screen (by default due to Radio Button Group) & hence the below code is not working.
*_PBO:_*
LOOP AT SCREEN.
IF RB1 = 'X' AND ( SCREEN-NAME = 'TXT2' OR SCREEN-NAME = 'TXT3' ).
         SCREEN-INVISIBLE = 1.
ELSEIF RB1 = 'X' AND ( SCREEN-NAME = 'F2' OR SCREEN-NAME = 'F3 ).
         SCREEN-ACTIVE = 0.
ENDIF.
Modify Screen.
ENDLOOP.
But when i select RB2 = X on the screen.
Value is getting populated .
Waiting for your hints/ideas/suggestions
Thanks
Sri.

Alright, you defined the radio buttons and grouped them. Did you also assign Fcode to the radio button group? if not already assigned the assign something to FctCode to the radio button. If you can double click on one and assign a name, this will automatically assign to other one. If you already did that... just ignore it.
Next, by defualt, RB1 will not be having 'X' though it shows selected but you can always make it by just writing the following statement in PBO (If you dont want to mislead anybody)
if RB1 = space and RB2 = space.
  RB1 = 'X'.
endif.
If you have already done that the next step would be.... Assign a screen group value to the fields F1, F2 and F3.
for example, double click on the field F1, add GR1 in groups in first box and do the same for field text/label if any. Same way, assign GR2 to F2 and F3.
Then add the following code in PBO. (Someone or you can write it better. This is just an example)
  LOOP AT SCREEN.
    if RB1 = 'X'.
       if screen-group1 = 'GR2'.
          screen-input = 0.
          screen-invisible = 1.
       endif.
    endif.
    if RB2 = 'X'.
       if screen-group1 = 'GR1'.
          screen-input = 0.
          screen-invisible = 1.
       endif.
    endif.
    MODIFY SCREEN.
  ENDLOOP.
Good luck... It is working code.,

Similar Messages

  • How to change height of Input/output field in dialog program

    How to change height of Input/output field in dialog program.
    I want to big message text box like e-mail message box.
    so could anybody help me on this please
    Thanks
    Basu

    Hi,
        This is not possible directly.Place the icon button in the table field.when u click on that button a popup window will appear in that window place the text editor there u can write text and u can save it ok..
    Award points if helpful.
    Kiran Kumar.G.A

  • Group Radio buttons controlling input fields

    Hi All ,
    I have 3 radio buttons which is grouped in teh form component . beside the 3 radio buttons i have 3 input fields , now i when i click the first radio button the input field beside the radio button should input enabled , rest of the input fields should be disabled ,
    Please share your ideas!!
    Thanks,
    Pradeep.

    Harsha ,
    This is the code in mu get_def method
    APPEND INITIAL LINE TO et_action_definition ASSIGNING <ls_action_definition>.
       <ls_action_definition>-id = 'ADDROW'.
       <ls_action_definition>-action_type = if_fpm_constants=>gc_action_type-validation_independent.
       <ls_action_definition>-imagesrc = '~Icon/AddRow'.
       <ls_action_definition>-VISIBLE = CL_WD_UIELEMENT=>E_VISIBLE-VISIBLE.
       <ls_action_definition>-enabled = abap_true.
    I need the buttons in my list as below
    And in List UIBB i have added 2 buttons
    in the get def i am getting 2 records for add and del but dont know why i am not getting the buttons on screen .
    i have a edit page screen in that i have 2 UIBB , 1st Form UIBB and 2nd LIST UIBB , but when i click the form UIBB its showing as section 1, and the LIST UIBB also in the section1 , i don't think it will be the issue .

  • How do you grey out a radio button if a text field is blank in Adobe Acrobat XI Pro?

    How do you grey out a radio button if a text field is blank in Adobe Acrobat XI Pro?
    So this what I'm trying to do:
    (     )   |TEXT FIELD|
    (     )   |TEXT FIELD|
    (     )   |                  |
    (     )   |TEXT FIELD|
    I have a radio button: (     )
    and a text field: |TEXT FIELD|
    The third text field is blank, and I would like for the radio button next to it greyed out (user can't click on it) since the text field is blank. Is this possible to achieve? I'm assuming I'll have to use javascript, but what would the code be and would it be entered in the javascript editor for the text field or the radio button?
    Thanks in advance guys

    Hey, thanks, but it didn't work
    I have the text fields as read only. Could that be why it's not working? Should I make the fields not read only?
    Thanks,

  • How to get center alignment of Input/Output field in Module Pool

    Hi Friends,
    I am using Input/Output field in my Module pool program. Dynamically i am submitting the text to Input/Output field. What i want is i want to display the submitted text as center. By default It is displaying left aligned.
    Thank U in advance.
    Mahender.

    Hi,
    Use syntax "Centered".
    take one variable push into the field
    write w_variable1 to w_variable2 centered.
    next push the varaible to Destination screen input/output Field .
    Make sure the Field the Character Type.
    Prabhud@s

  • Linking a radio button to a text field in a pdf form

    Forgive my ignorance but does anyone know how to link a radio button to a text field in an Acobat pdf form?
    I have a series of 4 radio buttons. If you click on one of them I would like to activate a text field which you then have to fill in. In addition it would be good to have it so that if you don't click on the radio button you're not able to fill in the associated text box.
    I am a designer not a programmer so I don't know much about javascript. Can anyone help?
    Many thanks

    You might want to look at Hiding and Showing Form Fields by Thom Parker. You might also want to clear the text field when the radio button changes.

  • How can i make the input/output field to a multiple lines in ModulePool...

    hi all...
    can any one please let me know, is there any possibility thru Module Pool program where i can make the input/output field to a multiple lines...
    say, when we drag & drop the input/output field on the screen - it'll come with single line display. so, how to make the same field to multiple lines field.
    rather i can say my question like, how to increase the height of the input/output field.
    Desired Functionality:
    • The user wants to display a long text.
    • now the input/output field should not display the record as a single line, now the field has to display the text in multiple lines (something like wrap option in ms excel).
    hope u got my question...
    please help me in this regards...

    hi Rengith, i'm not using Text Field, i'm using Inpu/Output Field to display the long text.
    If u mean text field as input/output field then can u let me know the process for this, how to do the same thru module pool program...
    Edited by: murashali on Mar 18, 2008 1:36 PM

  • Regarding input output field of the screen painter

    Hi Experts,
    I want to increase the height of the input output field in the screen painter.
    ie, multiline input output field.Is there any means?
    Or is there any alternative other than the input output field?
    Thanks & Regards,
    Soumya.

    hi,
    when u drag n drop some fields in the screen goto to one of the corners of dat fields drag to the extend u want to increase.
    or in attributes section  for u length n width of dat fields are available just increase to your wish.
    if helpful reward some points.
    with regards,
    Suresh Aluri.

  • Setting value of input/output field of screen in abap program

    I have a screen.I have added a input/output field in my screen.The purpose is i just want to display a text in that field upon PBO through my abap program.I m a newbie.PLS help me
    Also can i use textfield instead of input/output field for this purpose.if so then wats the difference between both of them

    Hi
    To display a text in I/O element, go to the PBO of this screen and
    assign the text to your I/O element.
    Lets say if TEXT_IO is the name of ur UI element, and you want to display "Hello" into it, do it as follows:
    TEXT_IO = 'Hello'.
    Must ensure that the type of this UI element is CHAR type and you define its lenght properly.
    to display "Hello", length would be 5.
    Hope it will solve ur query.

  • Radio Button to make other field Mandatory

    I have two Radio Buttons that I want when clicked on (either one) to make a Number Field mandatory. I have viewed many websites on setting a mandatory field but the script I am using will not work. I have tried a couple ways of writing it but I seem to be missing something.
    I have used this script in the Show of: click & change
    Here is the script that I'm using right now.
    if  (this.rawValue==1)   
    AssemblyNu-1.mandatory ="error";
    else
    AssemblyNu-1.mandatory ="disabled";
    And this one:
    if (this.rawValue==2)
    AssemblyNu-1.mandatory ="error";
    else
    AssemblyNu-1.mandatory ="disabled";
    Thanks,
    HHud5757

    So, I put a quick form together to test your code.
    On the change event of the radio button list (not the radio button itself), I added:
    if (this.rawValue == 1) tfTest.mandatory = "error";
    else tfTest.mandatory = "disabled";
    In my case, the radio button with the value of 1 is the one I want to make the field mandatory. If you want either button to make it mandatory, then use:
    if (this.rawValue == 1 || this.rawValue == 2) tfTest.mandatory = "error";

  • How do I create radio buttons which hide certain fields when selected?

    I have a set of two radio buttons, "Yes" and "No"
    When the "Yes" radio button is selected, I would like the "Bank Name", "Branch Number", "Institution Number" and the "Account Number" field to all be blocked from entering content into them.
    When the "No" button is selected, I would like for all of these fields to be available to be written in.
    I can do this currently with check boxes, but the problem with those is that both boxes can be checked at the same time, which is problematic.
    How can I make it so that the radio buttons control whether or not the fields can be written in!
    Thanks very much!

    Yes, I have done this. The buttons are mutually exclusive. The are in the group "Vendor EFT" - one is named "Yes", one is named "No".
    When the "Yes" radio button is selected, I would like the "Bank Name", "Branch Number", "Institution Number" and the "Account Number" field to all be blocked from entering content into them.
    When the "No" button is selected, I would like for all of these fields to be available to be written in.
    Not sure what code needs to be written for this.

  • Using radio button instead of text field

    Hi. I need to convert a text field for radio button. The conversion is as follows: the user will choose one of three options on the radio button (gif, png and jpeg). If the user chooses the image format such as jpeg, for example, how should I put in value? Put image/jpeg and does not work. This text field belongs to a form that was generated automatically by a WebService Data Control. Thanks

    remove the text field.
    drag and drop that attribute from data control, choose selectOneRadio
    in the wizard window, select fixed list and select this particular attribute and then type gif, png and jpeg one by one.
    in the pagedef it would be something like below:
        <list IterBinding="myIterator0" id="image" DTSupportsMRU="false"
              StaticList="true">
          <AttrNames>
            <Item Value="image"/>
          </AttrNames>
          <ValueList>
            <Item Value="gif"/>
            <Item Value="png"/>
            <Item Value="jpeg"/>
          </ValueList>
        </list>whatever you select that values goes to db.

  • Radio button names disappear in Fields menu

    I'm having this very odd experience in which the names of radio buttons I've created and grouped randomly disappear in the Fields menu.
    That probably doesn't describe it too well, so here's what I'm seeing:
    Notice how there's a gap between "Choice1" and "Choice3"? It should read "Choice2". If you look at the form itself, there are clearly five radio buttons.
    The 'invisible' buttons in the menu disappear randomly once I create more buttons. Sometimes it's "Choice2", sometimes it's "Choice5".
    Any thoughts/suggestions?
    Thanks!

    I had the same problem; hopefully my solution will be of help to anyone searching this problem via a search engine.
    http://forums.adobe.com/message/4347266#4347266
    Individual radio buttons cannot be named (only the overal exclusion group can be named) or else rawValues will not export.

  • Displaying radio button on report output

    hi folks,
             how to display radiobuttons on the report output.
           thanks,
           santosh.

    Declare parameter as RADIOBUTTON
    like
    Single radio button
    PARAMETER p_purch RADIOBUTTON.
    Two radio button with same group.
    PARAMETER p_sales RADIOBUTTON GROUP opt.
    PARAMETER p_purch RADIOBUTTON GROUP opt.
    Regards,
    Mahesh
    Edited by: Mahesh Guragol on Jan 23, 2008 4:12 PM

  • Error: input/output field not defined in subscreen.

    Hello Experts,
    I have defined a subscreen for transaction MM41 and when I try to put the statement: 'FIELD: MARA-ZZPARENT'
    there is an error saying input/output not defined. I already declared this in layout and it is there in element list.
    What causes this error? Thank you guys!

    Hi,
    What you can do is create a new ztop include from the existing top include.
    Define the field in ZTOP include.
    And in the main program change the statement for include top to include ztop.
    Hope this helps you.
    Regards,
    Tarun

Maybe you are looking for