Disabling button if the check box is uncheked

Hai all,
   I want to enable the button once checked the check box. Am using this code,
DATA lo_el_context TYPE REF TO if_wd_context_element.
    DATA ls_context TYPE wd_this->Element_context.
    DATA lv_check_button TYPE wd_this->Element_context-check_button.
lv_check_button = 'ABAP_TRUE'.
  get element via lead selection
    lo_el_context = wd_context->get_element( ).
  @TODO handle not set lead selection
    IF lo_el_context IS INITIAL.
    ENDIF.
  set single attribute
    lo_el_context->set_attribute(
      EXPORTING
        name =  `CHECK_BUTTON`
       value = 'lv_check_button' ).
Am getting it.
Once I uncheck the check box means the button has to be disabled. What can I do to resolve this. Pls give some suggestions.
Thanks in Advance,
Nalla.B

hai kris,
I did the same But if i uncheck the checkbox means that button is still enabled.....
I hav bounded that check attribute to the 'checked' propertyof the checkbox UI element......
Can u pls help me where i went wrong. Tis s my coding
DATA lo_el_context TYPE REF TO if_wd_context_element.
    DATA ls_context TYPE wd_this->Element_context.
    DATA lv_check TYPE wd_this->Element_context-check.
  get element via lead selection
    lo_el_context = wd_context->get_element( ).
  @TODO handle not set lead selection
    IF lo_el_context IS INITIAL.
    ENDIF.
  get single attribute
    lo_el_context->get_attribute(
      EXPORTING
        name =  `CHECK`
      IMPORTING
        value = lv_check ).
"IF lv_check EQ ' X'.
    "DATA lo_el_context TYPE REF TO if_wd_context_element.
   " DATA ls_context TYPE wd_this->Element_context.
    DATA lv_check_button TYPE wd_this->Element_context-check_button.
  get element via lead selection
    lo_el_context = wd_context->get_element( ).
  @TODO handle not set lead selection
    IF lo_el_context IS INITIAL.
    ENDIF.
if lv_check eq 'X'.
lv_check_button = 'ABAP_TRUE'.
else.
lv_check_button = 'ABAP_FALSE'.
endif.
  set single attribute
    lo_el_context->set_attribute(
      EXPORTING
        name =  `CHECK_BUTTON`
       value = 'lv_check_button' ).
Thanks in advance,
Nalla.B

Similar Messages

  • By clicking on  a button all the check boxes i have should be checked

    Hi all,
    Im having a button 'SELECT ALL', by clicking on that all the check boxes i have in my view should be checked.
    Help me out with procedure and the sample code.
    Thanks & Regards,
    Suresh

    Hi Sureshkumar,
    1. Create a value attribute named <b>select</b> of type boolean.
    2. Bind the <b>checked property</b> of all the checkboxes to this attribute.
    3. Create an action called <b>click</b> and bind it to <b>OnAction</b> event of the button(whose click will check all the checkboxes) and write this code in that action.
    <b>wdContext.currentContextElement().setSelect(true);</b>
    Warm Regards,
    Murtuza

  • I want to disable some of the check boxes on gl post form

    I am looking for form personalization that will disable the option to post some of the journal in GL Post form.
    The problem is that I managed to catch the new record event, this is operated only if the user chooses the line.
    But the user is standing on line 3 and checking line 1 2 and 4 .

    By searching for your answer in the forum.
    Rob

  • ALV GRID-how to select all the check boxes using push button

    Hai All,
    I displayed ALV grid & every record contains one check box as first column.
    If user clicks on one push button all the check boxes needs to selected.
    Could any one tell me how to do this?
    Regards,
    Bhaskar

    Hi Bhaskar,
       Try this code :
    *" Table declarations...................................................
    TABLES :
      spfli.                              " Flight Schedule
    *" Data declarations...................................................
    Work variables                                                      *
    DATA :
      w_checkbox  TYPE c,                  " Check Box
      w_checkbox1 TYPE c,                  " Check Box
      w_lineno    LIKE sy-lilli,           " Current Line No
      w_lines     TYPE i.                  " No. Of Records in Int.Table
    Internal table to hold Flight Schedule data                         *
    DATA :
       t_spfli LIKE
      STANDARD TABLE
            OF spfli.
    Structure to hold Function Codes                                    *
    DATA :
      fs_fcode LIKE LINE OF t_fcode.
                          TOP-OF-PAGE EVENT                             *
    TOP-OF-PAGE.
      PERFORM top_of_page.
                       START-OF-SELECTION EVENT                         *
    START-OF-SELECTION.
      PERFORM fetch_spfli_data.
      SET PF-STATUS 'YMENU1'.
      DESCRIBE TABLE t_spfli LINES w_lines.
      fs_fcode = 'EXIT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'SELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'DESELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'RETRIEVE'.
      APPEND fs_fcode TO t_fcode.
                        AT USER-COMMAND EVENT                           *
    AT USER-COMMAND.
      PERFORM user_command.
    FORM top_of_page .
      WRITE :/50 'Flight Schedule Information'(008).
      ULINE.
      FORMAT COLOR 1.
      WRITE :/10 'Carrier ID'(001),
              25 'Connection ID'(002) ,
              43 'Airport From'(003),
              59 'Airport To'(004),
              74 'Departure Time'(007),
              93 'Arrival Time'(011),
             106 space.
    ENDFORM.                               " FORM TOP_OF_PAGE
    FORM fetch_spfli_data .
      SELECT carrid                        " Carrier ID
             connid                        " Connection ID
             airpfrom                      " Airport From
             airpto                        " Airport To
             deptime                       " Departure Time
             arrtime                       " Arrival Time
        FROM spfli
        INTO CORRESPONDING FIELDS OF
       TABLE t_spfli.
      IF sy-subrc EQ 0.
        PERFORM display_spfli_data.
      ENDIF.                               " IF SY-SUBRC EQ 0
    ENDFORM.                               " FORM FETCH_SPFLI_DATA
    FORM display_spfli_data .
      SORT t_spfli BY carrid ASCENDING.
      LOOP AT t_spfli INTO spfli.
        FORMAT COLOR 2.
        WRITE :/2 w_checkbox AS CHECKBOX,
                  spfli-carrid   UNDER text-001,
                  spfli-connid   UNDER text-002,
                  spfli-airpfrom UNDER text-003,
                  spfli-airpto   UNDER text-004,
                  spfli-deptime  UNDER text-007,
                  spfli-arrtime  UNDER text-011.
      ENDLOOP.                             " LOOP AT T_SPFLI...
    ENDFORM.                               " FORM DISPLAY_SPFLI_DATA
    FORM user_command .
      CASE sy-ucomm.
        WHEN 'SELECT'.
          w_checkbox1 = 'X'.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'DESELECT'.
          w_checkbox1 = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'RETRIEVE'.
          w_checkbox = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox INTO w_checkbox.
            IF w_checkbox = 'X'.
              PERFORM fetch_sflight_data.
              PERFORM display_sflight_data.
            ENDIF.                         " IF W_CHECKBOX = 'X'
          ENDDO.                           " DO W_LINES TIMES.
      ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " FORM USER_COMMAND
    This report gives you the SPFLI Data and places a check box in front of each record. When u click on select all button it will select all the records. And if you click on deselect all it will deselect all the records. When you are trying this maintain the pf-status 'YMENU1' and give the function codes as in the code.
    Regards,
    Swapna.

  • Hiding or disabling the check boxes in Tableview  for perticular row

    Hi
       I created table view using ITAREATOR, as per my requirement i need to disable or hide the check box (which come by default) for perticular row.
       Can any body send me the code
    thanks in advance
    B.Umashankar

    Is there a hide-or-disable-checkboxes-in-a-tableView-row contest going on somewhere?
    Please check Leoiz Pas' "How to disable tableView default checkbox" and Marcel Gäbe's "TableView hide checkbox" postings earlier this week (even though there might not have been a final solution yet)!

  • Disable the check box

    Hi All,
    I have a requirement in which based on the profile option user should be able to change the value of check box.
    Name of profile option is acces_level. In this user level profile option two values are possible 'User' or 'Administrator' and there are two check boxes cb1 and cb2. I want that cb2 should be available only to the user, those have value of profile option as 'Administrator'. cb1 will be available for all.
    Thanks in advance.
    Looking forward onn this.

    I used now
    declare
    nProp varchar2(20);
    BEGIN
    nProp := fnd_profile.value('ACCESS_FOR_WISPER_PART_RESEND');
    if nProp = 'ADMINISTRATOR' then
    set_item_property('XXINFC_WISPER_PARTS_MASTER.INSPECTION_FLAG', enabled, 'property_true');
    else
    set_item_property('XXINFC_WISPER_PARTS_MASTER.INSPECTION_FLAG', enabled, 'property_false');
    end if;
    END;
    I am writing this in WHEN-NEW-FORM-INSTANCE trigger at data block level.
    Now there is only one problem. In the form I am displaying 15 values. All 15 values have there respective check boxes. Now except first check box all other check boxes are disabled. Do you have any clue why the first cbox is not disabled. There is one more thing when profile option is set with value USER (Now it should allow to update the check box) then If I change any cbox then it does not allow me to change any other check box.
    Looking forward for you reply.

  • How to change the check box with the push button in itrator table rows

    Hi all,
    I want to change the check box of the itrator table rows with push button/ some thing better as to give
    the table view more good look and user friendly.
    Does any one has tried any other option in table view in place of check box
    Thanks
    Bhagat

    There are various objects which you can create via iterators. Please see the application SBSPEXT_TABLE for more details.
    DATA: lo_text      TYPE REF TO cl_htmlb_textview,
            lo_ddlb      TYPE REF TO cl_htmlb_dropdownlistbox,
            lo_input     TYPE REF TO cl_htmlb_inputfield,
            lo_button    TYPE REF TO cl_htmlb_button,
            lo_chk_bx    TYPE REF TO cl_htmlb_checkbox.
      row_ref = p_row_data_ref.
      CASE p_column_key.
        WHEN 'EFF_DATE'. " Input field
          CREATE OBJECT lo_input.
          lo_input->id       = p_cell_id.
          lo_input->type     = 'DATE'.
          lo_input->showhelp = 'TRUE'.
          lo_input->width    = '60'.
          lo_input->invalid  = 'true'.
          p_class            = `ao`.
          lo_input->value     = get_column_value( p_column_key ).
          p_replacement_bee = lo_input.
        WHEN   'NEW_LOC'. " Drop down list box
          CREATE OBJECT lo_ddlb.
          GET REFERENCE OF gt_persa INTO lo_ddlb->table.
          lo_ddlb->id                =  p_cell_id.
          lo_ddlb->nameofkeycolumn   = 'NAME'.
          lo_ddlb->nameofvaluecolumn = 'VALUE'.
          lo_ddlb->selection         = get_column_value( p_column_key ).
          lo_ddlb->selection  = 'DUMMY'.
          p_replacement_bee          = lo_ddlb.
        WHEN 'MON' . " Check box
          CREATE OBJECT lo_chk_bx.
          lo_chk_bx->id = p_cell_id.
          lo_chk_bx->checked =  get_column_value( p_column_key ).
          p_replacement_bee  = lo_chk_bx.
        WHEN 'NEW_MGR_SRCH'. " Button
          CREATE OBJECT lo_button.
          lo_button->id            = p_cell_id.
          lo_button->text          = 'Search Mgr'.
          lo_button->onclientclick = 'script'.
          p_replacement_bee = lo_button.
        WHEN OTHERS. " Text
          CREATE OBJECT lo_text.
          lo_text->id       = p_cell_id.
          lo_text->wrapping = 'FALSE'.
          lo_text->text     = get_column_value( p_column_key ).
          lo_text->design   =  'STANDARD'.
          lo_text->textcolor = 'POSITIVE'.
          p_replacement_bee = lo_text.
      ENDCASE.
    Thanks
    A

  • Since updating to Firefox 3.6.15, I can no longer print coupons from SmartSource. The error message is that Java is not detected. The check box is longer showing in the Options/Content of this version of Firefox, so I can not enable it.

    # Question
    Since updating to Firefox 3.6.15, I can no longer print coupons from SmartSource. The error message is that Java is not detected. The check box is longer showing in the Options/Content of this version of Firefox, so I can not enable it.

    Same PC as I used to post the question. When I go to the "plug in check" page, it shows I am up to date and it is not disabled.
    Java(TM) Platform SE 6 U24
    Next Generation Java Plug-in 1.6.0_24 for Mozilla browsers 1.6.0.24

  • How to validate and pass a value stored in the Check box to a SQL report

    I have a menu(parameter form) with select lists and two check boxes(one option for DD/MM/YY(called CHK_BOX_MTH) and other for Quarter(Called CHK_BOX_QTR)).
    If the user selects the check box for month, he should be only be able to select list of values for Month, Day and Year. The user should not be able to choose Quarter(or should be prompted with a message, "Check only one option"). Similarly if Quarter is chosen, DD/MM/YY should be disallowed.
    How do I code this validation in HTML DB and where would it reside on the item?
    How do I then pass these parameters(Checked box value) using a URL to another page as input?
    The query expects the following
    SELECT ... FROM DIM_DAY
    WHERE
    (:CHK_BOX_MTH IS NOT NULL AND START_DATE = ":SELECTED_DATE")
    OR
    (:CHK_BOX_QTR IS NOT NULL AND QTR = ":SELECTED_QTR");

    Vikas ,Thank you for your reply.
    The only reason I am not able to use the radio group because I am not able to place the items shown adjacent to Month in the page. The From Date and To date (user enterable fields) should appear to the right of the Month radio button and quarter item to the right of the quarter radio button.
    From Date : "Month" "Day" "Year" (should be displayed to the right of Month )
    End Date : "Month" "Day" "Year" (should be displayed to the bottom right of
    Month and above the Quarter line)
    I hope I am making sense.

  • How can i add the check box beside the directory?

    how can i add the check box beside the directory? anybody can help?
    tis r the panel of my program :
    // FileTreePanel.java
    // JPanel for displaying file system contents in a JTree
    // using a custom TreeModel.
    package com.deitel.advjhtp1.mvc.tree.filesystem;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import com.deitel.advjhtp1.mvc.tree.filesystem.FileSystemModel;
    public class FileTreePanel extends JPanel {
    private JTree fileTree;
    private FileSystemModel fileSystemModel;
    private JTextArea fileDetailsTextArea;
    public FileTreePanel( String directory )
    fileDetailsTextArea = new JTextArea();
    fileDetailsTextArea.setEditable( false );
    fileSystemModel = new FileSystemModel(
    new File( directory ) );
    fileTree = new JTree( fileSystemModel );
    fileTree.setEditable( true );
    fileTree.addTreeSelectionListener(
    new TreeSelectionListener() {
    public void valueChanged(
    TreeSelectionEvent event )
    File file = ( File )
    fileTree.getLastSelectedPathComponent();
    fileDetailsTextArea.setText(
    getFileDetails( file ) );
    JSplitPane splitPane = new JSplitPane(
    JSplitPane.HORIZONTAL_SPLIT, true,
    new JScrollPane( fileTree ),
    new JScrollPane( fileDetailsTextArea ) );
    setLayout( new BorderLayout() );
    add( splitPane, BorderLayout.NORTH );
    JCheckBox check = new JCheckBox("Check me");
    add( check, BorderLayout.SOUTH );
    public Dimension getPreferredSize()
    return new Dimension( 400, 200 );
    private String getFileDetails( File file )
    if ( file == null )
    return "";
    StringBuffer buffer = new StringBuffer();
    buffer.append( "Name: " + file.getName() + "\n" );
    buffer.append( "Path: " + file.getPath() + "\n" );
    buffer.append( "Size: " + file.length() + "\n" );
    return buffer.toString();
    public static void main( String args[] )
    if ( args.length != 1 )
    System.err.println(
    "Usage: java FileTreeFrame <path>" );
    else {
    JFrame frame = new JFrame( "JTree FileSystem Viewer" );
    FileTreePanel treePanel = new FileTreePanel( args[ 0 ] );
    frame.getContentPane().add( treePanel );
    frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    frame.pack();
    frame.setVisible( true );
    }

    You can maybe explore button and forms feature in InDesign. It was added in CS6.

  • Getting control into my program on just clicking the check box

    Hi,
    I have created 4 check boxes in the ALV grid output. If I click on any one of the check boxes, it should disable certain check boxes. How to do this.
    Please answer this. Remember it should work the moment I click on the check box.
    Thanks,
    Prem

    Hi Prem
    Define your check boxes with the user command options. And then whatever logic about the disabling the other check boxes based on one can be done in AT SELECTION-SCREEN OUTPUT event.
    Reward points for useful answers !!
    ~Ranganath

  • Delete the rows if the check box is selected.

    Dear all,
    i have a block (not database block). i added a check box to the same block. now i want to delete the row against which the check box is selected.
    i wrote the following code in when-button-pressed trigger.
    IF Checkbox_Checked('CHK_DEL') THEN
         delete from fa_01_11
         where as_id = :as_id;
    END IF;
    commit;
    but when i select only one check box it delete the all rows from the table if the condition is satisfied.
    here is the data in my table
    as_id year month
    63     2006     4     0     -1183.92     1
    63     2006     5     0     -1183.92     1
    63     2006     6     0     -1183.92     1
    63     2006     7     0     -1183.92     1
    63     2006     8     0     -1183.92     1
    63     2006     9     0     -1183.92     1
    63     2006     10     0     -1183.92     1
    63     2006     11     0     -1183.92     1
    63     2006     12     0     -1183.92     1
    what's the proble?
    Regards:
    Muhammad Nadeem
    Message was edited by:
    Muhammad Nadeem

    You need to run the code for each record and you need to find something which is unique. as_id is not unique.
    untested:
    declare
      last_rec boolean := false;
      deleted boolean := false;
    begin
      first_record;
      loop
        deleted := false;
        last_rec := :system.last_record = 'TRUE';
        IF Checkbox_Checked('CHK_DEL') THEN
          delete from fa_01_11
            where as_id = :as_id
            and year = :year
            and month = :month;
          clear_record;
          deleted := true;
        END IF;
        exit when last_rec;
        if not deleted then
          next_record;
        end if;
      end loop;
      commit;
    end;

  • How to dsplay the values based on the check box?

    forms6i
    Hi to all
    the requirment the we have already master detail form.example emp details based on the dept number.in the form just only displays three coloumns per record wise(emp details).
    actually my requrment is place the check box each record and place a one button in the form.once check the particular record and click on the button open the another form
    it's displays that particular record entire emp details.any one help me...........
    Edited by: 994418 on 3 Apr, 2013 1:50 AM

    994418 wrote:
    forms6i
    Hi to all
    the requirment the we have already master detail form.example emp details based on the dept number.in the form just only displays three coloumns per record wise(emp details).
    actually my requrment is place the check box each record and place a one button in the form.once check the particular record and click on the button open the another form
    it's displays that particular record entire emp details.any one help me...........
    Edited by: 994418 on 3 Apr, 2013 1:50 AMHi,
    As you said, you emp block is tabular, i think there is no need of check box. Just add a button in that block. So there is a button for each record and associate button click display the associate record details (you said to go another form and display)
    check this Calling a form and passing a context
    Hope this helps
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • The "when I open a new link in a new tab, switch to it immediately" check box is not checked but it acts as if I check the check box

    The "when I open a new link in a new tab, switch to it immediately" check box is not checked but it acts as if I have checked the check box.
    == This happened ==
    Every time Firefox opened
    == after I install the Persona themes

    I was having the same problem and was looking for solutions when I came across this posting. Disabling GoodSearch solved the problem for me. Hopefully GoodSearch will update soon and resolve the issue permanently so I can use it again.

  • No "Settings next to the check box"

    I am in the testing phase of a new Flash based web site. One
    user has Flash 4, IE5 and Windows 2000. When he opens the page, he
    gets a flash icon and nothing else. When saving the file, we have
    "Detect Flash Version" checked. While reading the documentation, it
    says that there is a "Settings(I assume button) next to the check
    box". There is nothing there. How do we set up our target, content
    and alternate pages? We are using Flash 8 on Intel Core 2 Duo
    iMacs.

    Did you ever resolve this issue? Mine started doing the same thing today after flawlessly working for over a year.

Maybe you are looking for

  • How to call 2 transactions in a single screen

    Hi All, I need to call 2 Standard transaction in a single screen. ie: 1 transaction should be displayed in first half of the sceen and another transaction should be in the next half. How we can do this. Thanks Partha.

  • Issue with multiple Albums with the same name. (i.e. Greatest Hits)

    I have multiple albums all with the same name (i.e. Greatest Hits). iTunes mixes all of the albums as one. All of the track 1s together, all track 2s together .... Is there a way for iTunes to recognize that there is more than 1 album with the same n

  • Problem with msdos console

    Hi friends!, When I run my multi thread appliaction in a MSDOS console, sometimes, after some minutes the aplication stop and only run if I put the enter button on the console. The problem don't is for the code because in the editors un very good. Ca

  • BT Infinity speed dropped from 77mb to 64mb

    Hi there I recently got BT Infinity 2. Which was brilliant for the first two weeks with a constant 77mb IP Profile. But sometime last week (possibly related to the wind and snow?) It just done an insant drop to 64mb and has stuck there ever since. Is

  • In Report How To Execute Query Two Times in One Layout

    hi All In My Report i have creating on main Query and then query run two type with Defrent Parameter how is possible in Oracle Report 6i example my Query is For Example First time query run defrent parameter and again run some other parameter in same