Adding function code dynamically for radio buttons

Hi Experts,
         I have two  radio buttons in standard screen which when clicked my custom logic should be executed.
The issue here is the standard screen radio button does not have a Fcode assigned in the field properties because of this no event is triggered when the radio button is selected.
Thank You,
Anupama.

Hi anu,
     Try the following procedure,
- Combine all the radio buttons into a group. T
- Create a common function code for all the radio buttons. F
- Assign all the radio buttons to the same modification group. F
- Enclose all entire radio button in a frame. F
Also check the website it help u as u need,
[http://help.sap.com/saphelp_nw04/Helpdata/EN/3d/c3b23782a9cc68e10000009b38f8cf/content.htm]
Hope it helps u....
Regards,
Annevit

Similar Messages

  • Func- Code for Radio-button in Module-pool Prg.

    Hi Friend's.
    I have define 2 Radio button
    on Module-pool screen.
    I am not been able to triger the Radio button in
    Pai .
    How can i assign the function code for
    radio-button in module-pool.
    pls can any one help me

    Hi,
    For radion buttons, what ever the name you will give that name only will hold that value ( Either selected or not ). But this variable should be declared as global variable in main program.
    Still if you want to assign function code, you can assign one like other fields on the screen.

  • Dynamic-actions/expressions for Radio button in VC

    Hi,
    I would like to know whether dynamic actions for radio-buttons are possible in VC??
    I have a situation where, i have to display/hide an input-field according to the radio-button that i select.
    Is this possible in VC??
    Because, i do not find any place where i can write expressions for a radio-button so that it can take actions accordingly.

    Actually its possible.
    Here is the sample code for this.
    tables : kna1.
    parameters : chk1 radiobutton group g1 user-command abc,
                 chk2 radiobutton group g1.
    parameters : chk3 type kunnr.
    at selection-screen output.
    loop at screen.
      if chk1 = 'x' and screen-name = chk3.
          chk3-active = '0'.
      endif.
    endloop.
    In this way you can hide a input-field on the screen.

  • Why not autoskip for radio buttons? and the  update_allowed FALSE issue

    I would so dearly love there to be autoskip for radio buttons. (forms 11.1.1.4 jre 6...24) There is no autoskip property for the radio group nor for the individual buttons.
    I don't find an easy way to emulate it either. Or am I missing something?
    Anyone else solve this problem already? When the user selects a radio choice I want the focus to move
    to the next enabled item on the form. You can do this with text items but not with radio groups. (In some cases the radio group has a when-radio-changed trigger
    that enables/disables following items). This would all be a lot easier if radio groups just had autoskip. I wonder why they don't?
    BTW the following has cost me a huge amount of time. In 6i it was the case in my experience that if you
    disabled an item like this:
    PROCEDURE disable_item (myitem in varchar2) IS
    BEGIN
         copy(null,myitem);
            set_item_property(myitem,enabled,property_false);
         set_item_property(myitem,visual_attribute,'DISABLED');
    END;Then that could be reversed as so (the weird thing was you had to set navigable also despite not
    having changed it yourself.
    PROCEDURE enable_item (myitem in varchar2) IS
    BEGIN
      set_item_property(myitem,enabled,property_true);
      set_item_property(myitem,navigable,property_true);
      set_item_property(myitem,visual_attribute,'ENABLED');
    END;But in 11.1.1.4 I had lots of trouble with Lov's not rising after the item had been disabled and then
    re-enabled. No error message. Just didn't do it. Eventually I figured out that what happens is that
    after disabling an item the item as also non-updateable. This was not the case in 6i. So then
    the enable item code has to be something like this: [Note despite that not update_allowed it did not
    automatically grey out the item firefox 3.6.17 and it still has to be done programmatically.]
    PROCEDURE enable_item (myitem in varchar2) IS
    BEGIN
      set_item_property(myitem,enabled,property_true);
      set_item_property(myitem,navigable,property_true);
      set_item_property(myitem,visual_attribute,'ENABLED');
      set_item_property(myitem,update_allowed,property_true);
    END;

    Well right now 11.1.1.4 for autoskip for radio buttons this seems to be working ok. Crossing my fingers!
    a block level when-radio-changed trigger with after scope (where item level when-radio-changed triggers
    have before scope) with a simple next_item in there.
    Where I was having problems before was next_item-ing onto disabled items. There was some kind of issue
    with lov's. I'm having less trouble raising the lov programmatically. but also I had the problem that
    items were getting set non-update_allowed without my realization.
    when new item instance:
    declare
         currfield varchar2(70) := null;
    begin     
         currfield := :system.trigger_field;
    if (get_item_property(currfield,UPDATE_ALLOWED) = 'TRUE')
         and (get_item_property(currfield,UPDATE_PERMISSION) = 'TRUE') then
           list_values;
    else
         mess(currfield || ' UPDATE not allowed');
    end if;
    end;(mess is my program to display alerts.)

  • Want to create F1 Help for radio button in my report

    Hi All,
          I want to create F1 Help for radio button in my report program. Which function module should i call in <b>at selection screen on help-request</b>
          Also do I need to define the texts somewhere or I can pass it directly to the function module.

    Try DYN_FIELD_F1_HELP,
    ~Suresh
    that is only for Dic fields..
    Pl take alook at this<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/34a243d9b511d1950e0000e8353423/frameset.htm">SAP Help</a>
    ~Suresh
    Message was edited by: Suresh Datti

  • Global binding for radio buttons needs tweaking

    When selecting global binding for a text or numeric field, its corresponding field with the same name also changes to global binding.
    However when doing this for radio button exclusion groups, the other radio button groups don't automatically change to global. You have to do it manually.

    Found the problem in another topic:
    scott sheck - 1:30am Jun 29, 07 PST (#6 of 7)
    A pasted radio button is automatically added to an existing exclusion group if the last added item was a radio button. This is in the help.
    I wish there was a default to turn this off because I don't want to add a temporary item just to get a new exclusion group.

  • Need to fetch function code value of push button into BUS

    He expert,
                       I have created one custom screen in standard transaction IQ02.where I am populating some values into screen and one push button is there.I want to trigger the workflow only when user press this push button.I am using BUS DEVICE for that.
    Is it possible to fetch function code value of push button into the BUS object by creating custom attributes.So i can put the function code value as a condition before triggering workflow.or is there any other way to  to implement the above functionality.
    Please suggest.

    Hi,
    I'd say you need to delegate the std DEVICE object to your own ZDEVICE, where you define a custom event. Then generate the DEVICE.CUSTOMEVENT event when the user clicks on your pushbutton (eg. with SAP_WAPI... function module).
    In your workflow remove the standard triggering event and use your custom event instead.
    Cheers,
    Patrick

  • How to set value for radio button in sap crm survey suite

    Hi ,
    I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
    Thanks & Regards,
    Seshu

    Hi,
    I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
    Regards,
    Seshu

  • ADF 10.1.3 -  Default value for radio button

    Hi
    How to set the default value for Radio button?
    I have Yes and No fixed values for a radio button, and couldn't find any option to set the default value.
    How can I set Yes as default value?
    Appreciate your help.

    FrameworkSpl,
    What are you using for the model layer? If you are using ADF Business Components, simply set the default value for the attribute upon which you are basing the radio buttons.
    John

  • Numeric Value for Radio Buttons

    This should be easy for the experts:
    I got a bunch of 10 exclusion groups containing 3 radio buttons each. Every radio button got a numeric value associated, meaning the user is picking a numeric value by selecting a given radio button pretty much like the tests on the magazines in which the people pick options like "single= 10 points, married=5 points, engaged=1 point)
    In the bottom part of the same form I got a table of one one column and 10 raws sumarizing the 10 already mentioned above.
    The aim: to place the value coming from the radio button in the specific cell of the table.... in short, I want a script that allows me to palce the value of the selected radio button somewhere else in the same form, a numeric field for example.
    Thanks,

    Hi try67,
    Thank you so much for your help. Your code has brought me one step closer, I would never have gotten even this far without it!
    Initially, it was giving me and error, so I added a ")" and now it does display "Mastery", but I cannot get it to display the other two ("Acquiring" and "Practicing"), it just displays a blank space but does not give me an error.  I tried to fix it on my own by searching for some help, so I found and started playing around with jsbeautifier.org and JSLint. However, since I really don't know much about coding or syntax I hope these were not harmful. So now the code looks like this:
    // name for the text box field;
    var cTextBox = "Firm-Wide Talent Strategy Knowledge - Totals";
    // get the value of the field with the name in cTextBox;
    var sTextBox = +this.getField(cTextBox).value;
    if (sTextBox >= 1 && sTextBox <= 2) {
        event.value = "Acquiring";
    if (sTextBox >= 3 && sTextBox <= 4) {
        event.value = "Practicing";
    if (sTextBox >= 5 && sTextBox <= 6) {
        event.value = "Mastery";
    } else {
        event.value = "";
    Do you know what I might be missing that prevents "Acquiring" and "Practicing" from displaying? 
    Thank you so much again for your help,
    Chris

  • Assign values dynamically to radio button

    I am creating an online test. I will need to display answer choices from the table. I created radio buttons for these answer choices and I could put the labels dynamically by using      
    Set_Radio_Button_Property('block_name.radio_group_name', 'radio_button1',LABEL,cursor_name.field_name);
    Now I have problem to set radio button values dynamically. Should I use when_radio_changed event?
    Any help would be appreciated.

    I really appreciate your help.
    My intention is to display the test on the screen.
    That means I need to display all questions and answer
    choices for each one dynamically. Based on the answer
    choice type (radio button or checkbox or drop down
    etc) I will need to assign the values to them and
    display on the screen. So far I could display
    questions and answer choices on the screen and set
    the label property for each radio button.
    Do you know what is the syntax to assign value to
    each radio button? First I will need to store user's
    answers in a table. For that I need to know what
    answer they selected. I wasn't sure how to do that.
    ThanksAs I said, the values cannot be assigned dynamically. Thus you will store the answers in code (perhaps in an array?) and your radio buttons will be 1,2,3,4 etc.
    In WHEN-RADIO-CHANGED you can retrieve the value from the array using the radio button value. Then store that value.
    e.g. Your screen shows
    What is the sound of one hand clapping?
    o Blue
    o Yes
    o 12
    These labels will be set dynamically, but the values for the radio buttons will be 1,2,3. If they pick "Yes", your radio button will be 2. You then get the value you really want from answer_array(2), where you put it when you retrieved the question details. Then you insert that into your users_answers table.

  • Is "AutoPostback" property valid for Radio button control in RCDC

    Hi,
    I have been trying to add "Autopostback" property to a radio button control, but it doesnt seem to be working.
    Below is the code:
    <my:Control
    my:Name="Activation"
    my:TypeName="UocSimpleRadioButton"
    my:Caption="{Binding
    Source=schema, Path=ADActivation.DisplayName}"
    my:Description="{Binding
    Source=schema, Path=ADActivation.Description}"
    my:AutoPostback="true"
    my:RightsLevel="{Binding
    Source=rights, Path=ADActivation}">
    <my:Properties>
    <my:Property
    my:Name="TrueText"
    my:Value="ADActive"/>
    <my:Property
    my:Name="FalseText"
    my:Value="NotActive"/><my:Property
    my:Name="SelectedItem"
    my:Value="{Binding
    Source=object, Path=ADActivation, Mode=TwoWay}" /></my:Properties></my:Control>
    Dolly

    Dolly,
    What do you expect the AutoPostback property to do?
    AutoPostback: This is an optional,
    Boolean-type attribute. The default value is false.
    If set to false, refreshing
    the page may not refresh the control. For information about AutoPostback,
    look for the Microsoft ASP.NET UI control property of the same name. -- FIM RCDC Reference
    According to MSDN:
    Set this property to true if the server needs to capture the selection as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from a list
    control.
    This property can be used to allow automatic population of other controls on the Web page based on a user's selection from a list.
    Blain Checkley illustrates its use with his blog post: http://identityminded.wordpress.com/2011/10/14/fim2010-semi-dynamic-rcdc-operations/
    David Lundell, Get your copy of FIM Best Practices Volume 1 http://blog.ilmbestpractices.com/2010/08/book-is-here-fim-best-practices-volume.html

  • NO-DISPLAY option for Radio buttons

    Hi All,
    I want to hide the 2 radio buttons on the selection screen using the NO-DISPLAY option. when i worked with that its giving an error like 'no-display and radio button group can be specified together'.
    my question was is it possible to use NO-DISPLAY option with radio buttons?
    Thanks
    Kumar.

    See this sample code
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-h01.
    *Radio button for Process PO invoice
    PARAMETERS :   rb_po   RADIOBUTTON GROUP inv USER-COMMAND rad.
    " PO Invoice
    *Radio button for FI Invoice
    PARAMETERS :   rb_fi   RADIOBUTTON GROUP inv.
    " FI Invoice
    *Radio button for Process PO & FI Invoice
    PARAMETERS :     rb_pofi   RADIOBUTTON GROUP inv.
    " PO & FI Invoice
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS:
                    s_bukrs   FOR  rbkp-bukrs,       "Company Code
                    s_ekorg   FOR  ekko-ekorg NO INTERVALS MODIF ID md2,
                                                 "Purchasing Org.
                s_ekgrp   FOR  ekko-ekgrp NO INTERVALS MODIF ID md2,
                                                     "Purchasing Group
                s_werks   FOR  rseg-werks NO INTERVALS MODIF ID md2,
                                           "Plant
                    s_lifnr   FOR  rbkp-lifnr NO INTERVALS,
                                                     "Vendor
                s_matkl   FOR  ekpo-matkl NO INTERVALS
                                              MODIF ID md1,
                                                     "Material Group
                s_belnr   FOR  rbkp-belnr NO INTERVALS,
                                                     "Invoice Number
                    s_ebeln   FOR  rseg-ebeln NO INTERVALS MODIF ID md2,
                                                     "Purchasing Document No
                    s_gjahr   FOR  rbkp-gjahr NO INTERVALS,
                                                    "Fiscal year
                s_budat   FOR  rbkp-budat NO INTERVALS,
                                                    "Posting date
                    s_blart   FOR  bkpf-blart NO INTERVALS,
                                                    " Document Type
                    s_bldat   FOR  bkpf-bldat NO INTERVALS,
                                                    " Invoice Date
                s_usnam   FOR  rbkp-usnam NO INTERVALS.
    "User
    *Report type
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN BEGIN OF LINE.
    *Radio button for User Report
    PARAMETERS :     rb_user  RADIOBUTTON GROUP za DEFAULT 'X' <b>USER-COMMAND rad MODIF ID md2.</b>"User report
    SELECTION-SCREEN COMMENT 3(20) text-003 FOR FIELD rb_user MODIF ID md2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    *Radio button for Managing Report
    PARAMETERS :     rb_man   RADIOBUTTON GROUP za
                                          <b>MODIF ID md2.</b>
    "Management Report
    SELECTION-SCREEN COMMENT 3(20) text-004 FOR FIELD rb_man
                                            MODIF ID md2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END  OF BLOCK b2.
    SELECTION-SCREEN END  OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
    * Checking Radiobuttons and modifing Material Group field  .
      PERFORM f13000_check_radio.
    FORM f13000_check_radio.
    * When the FI button is selected hide the fields under group md1 and MD2
      LOOP AT SCREEN.
        IF screen-group1 = 'MD2'
        OR screen-group1 = 'MD1'.
          IF rb_fi  = c_x
          OR rb_pofi = c_x.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    * If the user output radiobutton is checked then make the screen
    * input of Material Group off
    <b>  LOOP AT SCREEN.
        IF screen-group1 = 'MD1'.
          IF rb_user = 'X'.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.</b>
      IF rb_user = 'X'.
    *   When display for material group is off
    *   then refresh the select option for material
    *   group
        REFRESH s_matkl.
      ENDIF.
    ENDFORM.      " f13000_check_radio
    hope this helps.

  • Run code when a radio button is clicked

    I have a radio group with various radio buttons in there
    named date, time,
    reg etc
    When I click on a button I need the following:
    Which radio button was pressed
    The value of that button eg date, time, reg etc
    Then run some code (I will use the value to run a MYSQL
    query)
    The idea is to be able to sort a table based on the header
    that was clicked.
    Cheers
    SteveW

    Thanks for the help so far.
    I am using dreamweaver 8. ASP VBScript
    I would rather not use javascript as our operators have PDA's
    and we are
    trying to use the same interface for everyone.
    What I am trying to do is re-sort a Table by either reg,
    date, user order
    etc. by clicking on the radio buttons.
    The table is populated with MYSQL have a look at
    http://80.5.54.164/swiff/contact.asp
    user 1 password 1
    Unless there is another way to achieve this
    Cheers
    SteveW
    "bregent" <[email protected]> wrote in
    message
    news:elithk$a5n$[email protected]..
    > >Then run some code (I will use the value to run a
    MYSQL query)
    >
    > >The idea is to be able to sort a table based on the
    header that was
    > >clicked.
    >
    > Are you trying to sort the table by resubmitting a new
    sql query, or sort
    > the
    > table client side? I would suggest the latter.
    >

  • 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

Maybe you are looking for