Show the checkbox as selected by selecting the row.

Hi friends,
I have a table. It is possible to select multiple rows, after selecting rows, I get the selected
rows in this table from the context. Now my question is, how can i cause that by selecting a row
the checkbox on this row will be also selected (shown as checked)?
So this is the coding in the eventhandlermethod on onselect property of the table:
METHOD onactionmark_cb .
  DATA lo_nd_table_data TYPE REF TO if_wd_context_node.
  DATA lo_el_table_data TYPE REF TO if_wd_context_element.
  DATA ls_table_data TYPE wd_this->element_table_data.
  DATA lt_table_data TYPE wd_this->elements_table_data.
  DATA lt_set TYPE wdr_context_element_set.
DATA lv_idx TYPE i.
navigate from <CONTEXT> to <TABLE_DATA> via lead selection
  lo_nd_table_data = wd_context->get_child_node( name = wd_this->wdctx_table_data ).
This would now contain the references of all the selected rows
  CALL METHOD lo_nd_table_data->get_selected_elements
    RECEIVING
      set = lt_set.
  LOOP AT lt_set INTO lo_el_table_data.
    " Use the references to get the exact row data
    CALL METHOD lo_el_table_data->get_static_attributes
      IMPORTING
        static_attributes = ls_table_data.
    APPEND ls_table_data TO lt_table_data.
    CLEAR ls_table_data.
  ENDLOOP.
mark/shhow the checkboxes checkd in the selected rows
ENDMETHOD.
Thank you for any help
Haleh
Edited by: Haleh Mir Ashrafi on Nov 9, 2008 6:29 PM

Hi Haleh,
I tried replicating your requirement and have written below the exact working code for the same. I will try to explain you my component so that you can get to understand its functionality. I have 2 tables & 1 input field in my view. The user enters a customer number in the input field and presses on a button. This leads to the corresponding sales orders filled into the 1st table ui element. The user then selects multiple rows from this table and presses on a toolbar button to copy these selected rows to the 2nd table. Within the same event I also set the checkbox for the rows selected by the user in the 1st tables row to selected. Hope that this would meet your requirement. On pressing the button the system would check if the checkbox is enabled & then mark the selected rows checkboxes as selected and would also copy the rows to the 2nd table. If the checkbox is disabled then the system would neither set it as checked nor copy it to the 2nd table. The rest of the checkboxes for the rows which weren't selected by the user remain as unchecked.
METHOD onactioncopy_selected_rows .
  DATA:  wd_node TYPE REF TO if_wd_context_node,
         ls_node1 TYPE ig_componentcontroller=>element_node1,
         lt_node1 TYPE ig_componentcontroller=>elements_node1,
         wa_temp  TYPE REF TO if_wd_context_element,
         lt_temp  TYPE wdr_context_element_set.
  wd_node = wd_context->get_child_node( name = 'NODE1' ).
  " Get all the context element information for the rows selected by the user
  CALL METHOD wd_node->get_selected_elements
    RECEIVING
      set = lt_temp.
  " Just get the reference of the 2nd table to which you want to copy selected rows
  wd_node = wd_context->get_child_node( name = 'NODE2' ).
  LOOP AT lt_temp INTO wa_temp.
    CALL METHOD wa_temp->get_static_attributes
      IMPORTING
        static_attributes = ls_node1.
    " Check if the checkbox is disabled/enabled. The "enabled" property of the checkbox
    " is bound to the boolean context attribute by name ENABLED
    IF ls_node1-enabled EQ abap_true.
      wa_temp->set_attribute( EXPORTING name  = 'CHECKBOX'
                                        value = abap_true ).
      APPEND ls_node1 TO lt_node1.
      CLEAR ls_node1.
    ENDIF.
  ENDLOOP.
  " Bind the rows selected by the user to the 2nd table ui element
  wd_node->bind_table( new_items = lt_node1 ).
ENDMETHOD.
I have checked your code where you say like:
IF elem_test->is_selected( ) = abap_true AND stru_test-enabled = abap_false.
You had earlier fetched the entire elements list using the get_elements method of if_wd_context_node & then checking each 1 of them individually to determine whether it was selected or not using the method id_selected. You can directly get only the elements which were selected by the user by using the method get_selected_elements instead. So now you will only have to check whether the checkbox field in that particular row is disabled/enabled. You now don't have to combine 2 conditions using AND & check them within the loop.
Regards,
Uday

Similar Messages

  • Every time I open a pdf file which includes a javascript, a dialogue box pops up. I have a question why 'Do not show this message again' is not working even I checked on the checkbox. It should block the dialogue next time when I open the same pdf file bu

    Every time I open a pdf file which includes a javascript, a dialogue box pops up. I have a question why 'Do not show this message again' is not working even I checked on the checkbox. It should block the dialogue next time when I open the same pdf file but not working. What is the matter and how can I deal with it?

    I am trying it on Adobe Acrobat Reader 9.2.1. Tried to fix Hex code, and also tried 'edit-preference-trust manager'. I focusing on Adobe registries but still couldn't fix the problem.

  • How to check the checkbox of Adobe Installer with the Aplescript??

    Hi All,
    am trying to Install Adobe Flash Player thru stand alone Installer, I want to check the check box and need to click on Install button,
    Whem am trying to get the entire contents of window thru UIElementInspector, am unable to get the contents of checkbox and Install buttons..
    I just tried myself with the below script to click the checkbox, but did not succeed, error saying unable to get the checkbox.. Pls suggest how to check..
    tell application "System Events"
        tell process "Adobe Flash Player Install Manager"
            set frontmost to true
            click the checkbox "I have read and agree to the terms of the Flash Player License Agreement" of window "Adobe Flash Player 11.5 Installer."
        end tell
    end tell
    Pls check the below link to view the image of the Adobe Flash Player Installer.
    https://docs.google.com/document/d/1yzyBTrvi94QxjlEAlcbudOBpXiTGPEI2LA3D1iEo8Gw/ edit

    I'm working on a similar script, but when I execute the script, I run into this error:
    error "System Events got an error: Can’t make {563, 234} into type list." number -1700 from {563, 234} to list
    Any ideas? Here's the background: I'm trying to click the search box on this page: http://www.alexa.com/siteinfo/payeasenet.com
    Here's my UI Inspector results of said element:
    <AXGroup>
         <AXScrollArea: “”>
          <AXWebArea: “”>
           <AXGroup: “”>
            <AXGroup: “”>
             <AXTextField: “Enter a search query”>
    Attributes:
       AXRole:  “AXTextField”
       AXSubrole:  “AXSearchField”
       AXRoleDescription:  “search text field”
       AXChildren:  “<array of size 0>”
       AXHelp:  “”
       AXParent:  “<AXGroup: “”>”
       AXPosition:  “x=550 y=212”
       AXSize:  “w=214 h=30”
       AXTitle:  “Enter a search query”
       AXDescription:  “”
       AXValue (W):  “”
       AXFocused (W):  “1”
       AXEnabled:  “1”
       AXWindow:  “<AXWindow: “Payeasenet.com Site Info”>”
       AXSelectedTextMarkerRange (W):  “(null)”
       AXStartTextMarker:  “<AXTextMarker 0x60800024af80 [0x7fff758b4eb0]>{length = 24, bytes = 0xbd040000000000006024c514010000000000000001000000}”
       AXEndTextMarker:  “<AXTextMarker 0x600000248a30 [0x7fff758b4eb0]>{length = 24, bytes = 0xbf0400000000000040420c17010000000100000001000000}”
       AXVisited:  “0”
       AXLinkedUIElements:  “(null)”
       AXSelected:  “0”
       AXBlockQuoteLevel:  “0”
       AXTopLevelUIElement:  “<AXWindow: “Payeasenet.com Site Info”>”
       AXNumberOfCharacters:  “0”
       AXSelectedText (W):  “”
       AXSelectedTextRange (W):  “pos=0 len=0”
       AXVisibleCharacterRange (W):  “pos=0 len=0”
       AXInsertionPointLineNumber:  “0”
       AXTitleUIElement:  “(null)”
       AXAccessKey:  “(null)”
       AXRequired:  “0”
       AXInvalid:  “false”
       AXPlaceholderValue:  “”
       AXARIABusy:  “0”
    Actions:
       AXPress - press
       AXShowMenu - show menu
       AXScrollToVisible - AXScrollToVisible

  • URGENT - how to get the checkbox selected data from datatable.

    Hi
    I have some dynamic data. which will be displayed as checkbox. User can select the checkboxes in jsp. after selection when I submit the page I wanted to get the list of checkbox data the user selected.
    Here is the following code. when I submit the form the method which is mapped in bean (dostuff() method) is not calling. it is simply displaying the same page. Could you please tell me where I am doing wrong.
    please give me suggestion what I should to get the checkbox data in bean.
    My Code JSP:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <h:form>
    <h:dataTable id="xxx" var="person" value="#{checkboxBean.beans}" >
    <h:column><h:selectBooleanCheckbox value="#{person.checked}"/></h:column>
    <h:column><h:outputText value="#{person.id}"/></h:column>
    </h:dataTable>
    <h:commandButton id="details" action="#{checkboxBean.doStuff}" value="do Stuff"></h:commandButton>
    </h:form>
    </f:view>
    public class CheckboxBean {
    private static final Logger logger = Logger.getLogger(CheckboxBean.class);
    private List beans = null;
    public CheckboxBean() {
    logger.debug("CheckboxBean()");
    public String doStuff() {
    logger.debug("doStuff()");
    logger.debug("Some Bean selected data :" );
    return "test";
    public List getBeans() {
    beans = new ArrayList();
    SomeBean[] someBeans = new SomeBean[3];
    someBeans[0] = new SomeBean("first Person", false);
    someBeans[1] = new SomeBean("2nd Person", true);
    someBeans[2] = new SomeBean("third person", false);
    beans.add(someBeans[0]);
    beans.add(someBeans[1]);
    beans.add(someBeans[2]);
    logger.debug("Inside getBeans()");
    return this.beans;
    <managed-bean>
    <description>Checkbox bean.</description>
    <managed-bean-name>checkboxBean</managed-bean-name>
    <managed-bean-class>com.view.bean.CheckboxBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    * Created on Mar 17, 2006
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    package com.view.bean;
    public class SomeBean {
    private boolean checked = false;
    private String id ;
    public SomeBean() {
    public SomeBean(String anId, boolean bool) {
    super();
    this.id = anId;
    this.checked = bool;
    public String getId() {
    return this.id;
    public void setId(String id) {
    this.id = id;
    public boolean isChecked() {
    return this.checked;
    public boolean getChecked() {
    return this.checked;
    public void setChecked(boolean checked) {
    this.checked = checked;
    public String toString() {
    return "Id: " + id + ", checked :" + checked;
    }

    Hello,
    If you post in ASP.NET forums, you'll get more help.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Effect of selecting the checkbox "Activate approval procedures"

    Hi Folks,
    Please let me know what is the effect of selecting or deselecting the checkbox "Activate approval procedures" in the BP tab of the General Settings.
    Best Regards,
    Jimmy

    Hi........
    Activates the Approval Procedures function for the creation of sales documents.
    When modified, this setting is updated immediately per company, for all users.
    Regards,
    Rahul

  • Push button "Select Block" on the list screen?Interactive report

    Hi, i am developing a plain report(Use read data & write output, not ALV).
    And there was a checkbox(itab-chx) before each line of the output list.
    The customer wants me to add 4 buttons on the menu bar, they are 'Delete', 'Select ALL', 'Deselect all',  <b>'Select block'</b>.
    As far as i know that 'Delete' button is for the user to delete the entries which they have checked using the checkbox.
    As for 'Select ALL' is that when they push this button, all the checkbox on the output list are checked.
    As for 'Deselect all' is that ...all are unchecked.
    <b>BUT</b> i dont have any idea on 'Select Block' function?? What it is and how to program and handling with this button???
    Below is my code for those button, just dont know what 'Select block' means
    at user-command.
      case sy-ucomm.
        when 'DLT'. 'Delete
             'Do delete things...
        when 'SLL'. 'Select all     
          loop at itab.
            itab-chx = 'X'.
            modify itab index sy-tabix.
          endloop.
          sy-lsind = 0.
          perform output.
        when 'DSL'. 'Deselect all
          loop at itab.
            itab-chx = ' '.
            modify itab index sy-tabix.
          endloop.
          sy-lsind = 0.
          perform output.
        when 'SBL'.  'Select block
          '???? No idea at all!!!
      endcase.
    Great thanks!!! Any helps?
    Hoo lala 
    Message was edited by:
            Hoo lala
    Message was edited by:
            Hoo lala

    Refer this demo report, it is having 2 buttons one Call (defined in PF status) and other one PA30 one.
    u have to create a PF status, and there in Application Toolbar option i have cretaed a button Named Call. like tht u can create more buttons as per ur requirement.
    REPORT  ZGILL_CALLREPORT                        .
    DATA: L_PERNR(20).
    parameters : p_rname(20) obligatory DEFAULT 'NONE'.
    INCLUDE <icon> .
    selection-screen pushbutton 60(20) gocfg user-command amit.
    AT SELECTION-SCREEN OUTPUT.
    write icon_configuration as icon to gocfg.
    concatenate gocfg 'Go to PA30' into gocfg.
    AT SELECTION-SCREEN.
    if sy-ucomm = 'AMIT'.
    SET PARAMETER ID 'PER' FIELD '10000000'.
    call transaction 'PA30'.
    ENDIF.
    Start-of-selection.
    write: 'This Report is called by report',' ',p_rname left-justified.
    set pf-status 'TEST'.
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'CALL'.
    submit zgill_it using selection-set 'TESTING_IT'
           exporting list to memory and return.
    perform get_output.
    WHEN '&F03'.
      LEAVE SCREEN.
    WHEN '&F15'.
      LEAVE PROGRAM.
    ENDCASE.
    *&      Form  get_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form get_output .
    data : listobject like abaplist occurs 0.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject       = listobject
    * EXCEPTIONS
    *   NOT_FOUND        = 1
    *   OTHERS           = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'DISPLAY_LIST'
    * EXPORTING
    *   FULLSCREEN                  =
    *   CALLER_HANDLES_EVENTS       =
    *   STARTING_X                  = 10
    *   STARTING_Y                  = 10
    *   ENDING_X                    = 60
    *   ENDING_Y                    = 20
    * IMPORTING
    *   USER_COMMAND                =
      TABLES
        listobject                  = listobject
    * EXCEPTIONS
    *   EMPTY_LIST                  = 1
    *   OTHERS                      = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    refresh listobject.
    endform.                    " get_output

  • Checkbox and 2 Textbox in the same line

    Hi,
    I am having a problem trying to show one checkbox and two textboxes at the same line,
    the problem is with the text (comment) I want to display for each item.
    when I try to activate or run  the report , I got this error message :
    Error when generating the selection screen "1000"
    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN POSITION 1.
      parameters:
      ck1 AS CHECKBOX ,
      p_u  like rlgrap-filename  default 'C:\data\',
      p_ux(9) default '500'.
      "SELECTION-SCREEN COMMENT 4(10) text-c01 for FIELD ck1.
      "SELECTION-SCREEN COMMENT 17(10) text-c02 for FIELD p_u.
      "SELECTION-SCREEN COMMENT 30(10) text-c03 for FIELD p_ux.
       SELECTION-SCREEN end OF LINE.
    I think the problem is with the position of the comment ?
    how to fix this?
    Thanks
    Misbah

    Hi  Misbah ,
    i had faced a similar issue some months ago, following is the solution----->>>
    SELECTION-SCREEN BEGIN OF BLOCK F WITH FRAME TITLE TEXT-014.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) text-015.
    PARAMETERS : P_DNR(10) TYPE C.
    SELECTION-SCREEN COMMENT 35(14) text-016.
    PARAMETERS : P_ST  AS CHECKBOX.
    SELECTION-SCREEN COMMENT 56(8) text-017.
    PARAMETERS : P_IC  AS CHECKBOX.
    SELECTION-SCREEN COMMENT 72(14) text-018.
    PARAMETERS : P_CA  AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK F.
    OUTPUT LOOK AS BELOW------>>>>>
    Debit Entry Number  ___________   Stock Transfer [ ]      IC Sales [ ]       Credit Allowed [ ].
    HERE,  Debit Entry Number, Stock Transfer, IC Sales, Credit Allowed are the text sysmbols saved at 015, 016,017 and 018.
    see the above code , the logic is the text stored in text 15 is of length 18.
    after which i print a blank input field i.e the parameter p_dnr which is of length 10.
    so now the next text or field has to be printed at 18 + 10 =  28.
    so 28 or any number more than 28 should be the starting position of the next text or parameter or checkbox  , etc.
    similarly u have to calculate the start position and end position  for all the selection screen variables ur printing in a line .
    if the calculation goes wrong and variables in a line get overlapped on each other , then u get an error message as u r getting now.....something like selection screen error.
    Regards,
    Akash Rana

  • How to make a text field required at run time when the user clicks the checkbox ?

    I got a form where , there are several checkboxes and text fields associated with that checkboxes.If the use clicks on the check box then the associated
    text fields should become required.I have tried the change event and the click event for the checkboxes.It gives error in the onChnage event and I got some weird results in the on click event .Sometimes if the user click the check box , then for the 1st time the field doesnt become required , then the user onclicks the check box and when the user clicks the checkbox for the second time the field becomes required,but if i deselects the highlighted field option and selects it again the field becomes required even if the user onchecks it I am totally confused !!! Adding to it i have also written the wrong code still i achieved the desired result ?? How it can be possible . I am writing the codes below , please help me as i am working under a deadline from the client.
    onChange event :
    var newVal = this.boundItem(xfa.event.newText);
    if(newVal == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "disabled";
      else
         xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "error";
    For the onClick event :
    var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovere d_OnlyEnergyCharges").rawValue;
    //app.alert(a);
    if(a == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "error";
      if(a == 1)
          xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "disabled";
       Please help someone !!!

    I used the onchange event and wrote the code for it. I got the result . But there is a problem.All these fields are in a table and it's a dynamic table where you can add rows dynamically at the run time .I have other change event for some fields in this table .All are working fine when i add the row.But for this check box the required fields are not validated as required at the run time . I am here giving the code , Please help me .
    form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharge s::change - (JavaScript, client)
    if(this.rawValue == "1")
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory= "error";
    else
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandator = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory = "disabled";

  • How to make checkbox to be pre-selected in ALV

    Hi all!
    I`m creating ALV report and I want to create checkbox in the first column of the row. So I have a field SEL(1) in my structure and I`ve made the fieldcat:
    gs_fcat-col_pos = 5.
      gs_fcat-coltext = 'Check'.
      gs_fcat-fieldname = 'SEL'.
      gs_fcat-tabname = 'GT_TREE9001'.
      gs_fcat-outputlen = 10.
      gs_fcat-checkbox = 'X'.
      gs_fcat-edit = 'X'.
    That works, checkbox is displayed.
    But now I need to make all the checkboxes to be checked for the first start of my program.
    I mean when user executes my report all the checkboxes must be checked by default.
    I have tried to do following:
    loop at gt_tree9001.
    gs_tree9001-sel = 'X'.
    modify gt_tree9001 from gs_tree9001.
    endloop.
    But it doesnt work, I now see checkbox and mark 'X' near but not the checked ckeckbox.
    Any help appreciated!

    Solved.
    My final code:
    data: lv_tree_size TYPE i,
                ls_layout_item TYPE lvc_s_laci,
                lt_layout_item TYPE lvc_t_laci,
                lv_ind TYPE LVC_INDEX.
          CLEAR ls_layout_item.
          ls_layout_item-fieldname = 'SEL'.
          ls_layout_item-class = cl_gui_column_tree=>item_class_checkbox.
          ls_layout_item-editable = 'X'.
          ls_layout_item-u_class = 'X'.
          ls_layout_item-u_editable = 'X'.
          ls_layout_item-u_chosen = 'X'.
          ls_layout_item-chosen = 'X'.
          append ls_layout_item to lt_layout_item.
    call method g_tree9001->set_table_for_first_display
          EXPORTING
            i_save              = 'A'
            is_variant          = ls_variant
          CHANGING
            it_sort             = gt_sort9001
            it_outtab           = gt_tree9001
            it_fieldcatalog     = gt_treefcat9001.
    DESCRIBE TABLE gt_tree9001 LINES lv_tree_size.
    DO lv_tree_size TIMES.
            CALL METHOD G_TREE9001->CHANGE_LAYOUT
              EXPORTING
                I_OUTTAB_INDEX = sy-index
                IT_ITEM_LAYOUT = lt_layout_item                .
    ENDDO.
    The main trick is in u_class, u_editable, u_chosen. These params say that layout should be changed. Only this way it will work.
    And some helpful links:
    ALV tree get selected checkbox
    Checkbox ALV Tree CL_GUI_ALV_TREE
    ALV TREE-Checkbox
    CL_GUI_ALV_TREE and Checkboxes
    Report BCALV_TREE_ITEMLAYOUT is also very helpful.

  • How to store the checkbox value in the database?

    i want to store the value of the checkbox iwhich i tick in the database. how do i do it?
    Plz help.

    hi try this
    <input type="checkbox" name="check" value="1">
    <input type="checkbox" name="check" value="2">
    <input type="checkbox" name="check" value="3">
    at the back end form(jsp/servlet)
    String check[]=request.getParametersValues("check");
    u should iterate that array,then insert into table ........
    only selected check box values will be taken.....

  • How to autotamticlly store the checkbox value in ALV into database?

    Dear Freinds,
    I have a editable check box, when I ckeck or unckeck it,  the value of the checkbox will be stored in the table, it seems I need to use event, is "handle_data_changed" OK? but how to implement(I don't know how to code the class and class implementation)?
    Thanks a lot!!

    Hi,
    If using OO ALV, then use this code when you click SAVE button:-
    CASE sy-ucomm.
      WHEN 'SAVE'.
    * to reflect the data changed into internal table
        DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
        IF ref_grid IS INITIAL.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_grid = ref_grid.
        ENDIF.
        IF NOT ref_grid IS INITIAL.
          CALL METHOD ref_grid->check_changed_data.
        ENDIF.
        "at this point your internal table is modified from the alv output
        " and then use refresh_table_display
        CALL METHOD ref_grid->refresh_table_display.
        " to refresh the data from internal table back to alv output.
    ENDCASE.
    Hope this helps you.
    Regards,
    Tarun

  • BUG: Disabling 'Select All | Select None' for af:tableSelectMany

    I have a simple af:table that incorporates an af:tableSelectMany. Within the af:tableSelectMany I have the disabled property bound to my view's backing bean like this disabled="#{myBackingBean.selectManyDisabled}". The backing bean then returns true or false based on whether the user should be able to change the selection in the table.
    When the disabled property is set to true, the table's "select" column is displayed appropriately. The checkboxes are grayed out and the user cannot change their state by clicking on them. However, the Select All and Select None links are still shown at the top of the table and still are active. Clicking one of these links changes the selection state for this items in the table. Shouldn't these links be disabled too? Has anyone else found a reasonable solution to this bug?
    Thanks,
    Jim

    Unfortunately that does not fit my usecase.
    The Select column always needs to be shown because the selection state of an entry in the table represents that entry's inclusion or exclusion within a higher level object. It is important to show the user this information. There are just some cases when we do not want to allow the user to change this information. (Specifically when showing historical data).
    I did consider not rendering the af:tableSelectMany as shown in that sample, but then I would have to build my own "Select" column that would be rendered whenerever the af:tableSelectMany was not rendered. In my own column I would have to place disabled check boxes to mimic the display.
    At this point I have developed a work-around solution. In the af:table that contains this af:tableSelectMany component I have the selectionState property bound to my backing bean as well as having the selectionListener bound. When I receive the SelectionEvent notification, I rebuild the selectionState RowKeySet to remove any effect of the Select All or Select None. The result is that the check boxes simply "blink" but always remain as they should be. It's a hack, but it works.
    It would be much better if the Select All and Select None links were not displayed or were disabled. I really feel this is a bug since disabling the af:tableSelectMany does properly draw the checkboxes in a disabled state. They just forgot to deal with the two links.
    Jim

  • How can I have multiple-selection list box "select at least one checkbox" option active only when the section it's in is visible?

    Hi, I'm using SP13 and InfoPath2013.
    I created a custom form and published it to SP13 document library.  This form has many MSLB.  Depending on the checkboxes selected in the 1st MSLB, the other MSLB will either hide or show.  Each MSLB is in its own section.  The requirement
    is to have each MSLB to have at least one checkbox selected.  Well, the problem is that when that MSLB isnot checked in the 1st MSLB it is not visible and shouldn't require any checkbox to be selected.  However, the form can't get submitted instead
    an error dialog would pop up and ask user to make a selection for MSLB that is not even displayed.  Is there any way to fix this besides unchecking all MSLB to be not required at least one selection?  Thank you.

    Eric, 
    I follow your reply post here and still doesn't work.  I also noticed your screen shot of selecting a field is not the same as what I see in InfoPath 2013.  
    Here is what I did, 
    1.Check At least one selection required for
    these Multiple-selection List Boxes
    as you want .
    2.Create a Formatting  rule for the 2nd
    Multiple-selection List Box.
    3.Add a  Condition as below:
    4.  I get a validation error if I don't
    select at least one checkbox in the hidden MSLB control when submitting.
    I think I'm following all the steps correctly
    but please let me know if I'm not.

  • Selecting the Checkboxes on Interactive Report

    Hello
    I have two checkboxes on a Interactive Report:
    My query is as follows:
    select
    apex_item.checkbox(1, empno, 'ENABLED'),
    apex_item.checkbox(2, deptno, 'ENABLED'),
    ename,
    sal
    from emp;
    I have a conditional button 'Check N Update' which will invoke the Pl/SQL process:
    FOR i in 1..APEX_APPLICATION.G_F01.count
    LOOP
    l_empno := APEX_APPLICATION.G_F01(i);
    UPDATE XXX ....;
    END LOOP;
    FOR i in 1..APEX_APPLICATION.G_F02.count
    LOOP
    l_empno := APEX_APPLICATION.G_F02(i);
    UPDATE XXX ....;
    END LOOP;
    What I need is I need to check a CONDITION, if BOTH the checkbox's are selected then I need to throw an ERROR saying.
    YOU CANNOT SELECT BOTH the boxes.
    Please let me know how can I get this.
    Appreciate your help.
    thanks

    Hi
    Using a RadioGroup would actually create one radio button for each line and mean that you could only select one line.
    As the submit process will only return the boxes that have been checked, you only have access to the ticked items and as these contain just the EMPNO and DEPTNO values, you have no way to check if any two are from the same row.
    This means that you will have to rethink your report slightly. You will need to have two checkboxes with ROWNUM as the value (if the report is sorted somehow, this may make this more awkward as ROWNUM is from the unsorted data) and make your EMPNO and DEPTNO hidden fields. The when the user submits the page, you will have to compare the ROWNUM values for the first column with all the ROWNUM values for the second column to see if there's a match.
    As an alternative, you could have a select list for the first item and give the user options for EMPNO, DEPTNO, Both, Neither?
    Andy

  • How can I show a pop up menu based on the selection in a previous pop up menu?

    For example, if "Company" is selected in a pop up menu in C6, then show another pop up menu in C7. if "Bob" is selected in a pop up menu C7, show another pop up menu that contains the talks "Bob" has in C8.
    I am trying to create a talk scheduling spreadsheet with different talk outlines for different speakers. I'm not sure if there are any functions or formulas that can accomplish this. Can anyone help?

    Pop-up menus contain fixed values in Numbers. You might be able to do this using Steppers or sliders. These produce a numerical result, which could be used to direct a second slider or stepper's output to a specific column or table.
    If you can provide a map of the structure of your list(s), there may be someone here able to take on the task of constructing the tools to do the job.
    Regards,
    Barry

Maybe you are looking for

  • Using "calc' function to show if the cell is editable(EVDRE Reports)

    Hello All, I have a question regarding using the "calc' property in my dimension 'ACCOUNT' in a EvDRE report to display the rows as calculated or input ready cells. I have developed an input template by opening a blank workbook and typing in EVDRE().

  • Item "Popup Key LOV" as Tree

    Hi All, As in item "Popup Key LOV" to display data as tree? Thanks! Aleksey.

  • URGENT: Azure Storage Table Outage

    UPDATE: Problem appears to have been fixed, are affected accounts eligible for a refund due to the downtime? Hi. I'm having trouble querying an Azure Storage table that is essential to my business operations. The queries seem to simply not be going t

  • Original iPhone battery replacement

    I have an original iPhone In prefect condition. Everything works except for the battery. I talked to support on the website and they said that the battery cost $79. But, they said since it's an older model it could cost less. Does anyone know the exa

  • Access logs (missing)

    Hi, I'm trying to determine when a user accessed the server via AFP. I've found /Library/Logs/AppleFileService/ logs but many are missing - only the last 2 weeks are there. I also found entries in another log deleting these files since disk was full,