Table Control Check Box

Hi,
i am Displaying a table control in module pool programming
i need to have check boxes for each item in the table control.
Regards,
Vijaya

HI,
Refer to the link.
how to create a check box in table control
This may help.
Regards
Sumit Agarwal

Similar Messages

  • Reg: Table control list box

    Hi All,
    Can anyone please explain with sample code how to get values from the table control list box and save it the internal table.
    regards,
    karthik

    *& Report  ZTABLEC
    REPORT  ZTABLEC.
    tables : mara.
    data : it like mara occurs 0 with header line.
    data : begin of it1 occurs 0 ,
           matnr like mara-matnr ,
            end of it1 .
    data: OK_CODE  type SY-UCOMM .
    data :STATUS like zaiod3-status .
    controls : t1 type tableview using screen 1000.
    call screen 1000.
    *&      Module  STATUS_1000  OUTPUT
          text
    MODULE STATUS_1000 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    select * from mara into table it up to 10 rows.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    *&      Module  USER_COMMAND_1000  INPUT
          text
    MODULE USER_COMMAND_1000 INPUT.
    IF SY-UCOMM = 'SAVE'.
    IT-MATNR.
    append it .
    modify MARA from it.
    ENDIF.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    *&      Module  create_dropdown_box  INPUT
          text
    MODULE create_dropdown_box INPUT.
    SELECT matnr FROM mara
                      INTO CORRESPONDING FIELDS OF TABLE it1.
             CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
               EXPORTING
               DDIC_STRUCTURE         = ' '
                 RETFIELD               = 'MATNR'
               PVALKEY                = ' '
               DYNPPROG               = ' '
               DYNPNR                 = ' '
               DYNPROFIELD            = ' '
               STEPL                  = 0
               WINDOW_TITLE           =
               VALUE                  = ' '
                VALUE_ORG              = 'S'
               MULTIPLE_CHOICE        = ' '
               DISPLAY                = ' '
               CALLBACK_PROGRAM       = ' '
               CALLBACK_FORM          = ' '
               MARK_TAB               =
             IMPORTING
               USER_RESET             =
               TABLES
                 VALUE_TAB              = IT1
               FIELD_TAB              =
               RETURN_TAB             =
               DYNPFLD_MAPPING        =
              EXCEPTIONS
                PARAMETER_ERROR        = 1
                NO_VALUES_FOUND        = 2
                OTHERS                 = 3
             IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             ENDIF.
    ENDMODULE.                 " create_dropdown_box  INPUT
    IN PAI & PBO SECTION...
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1000.
    loop at it  with control t1.
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_1000.
    loop at it.
    endloop.
    MODULE USER_COMMAND_1000.
      PROCESS ON VALUE-REQUEST.
      FIELD mara-matnr MODULE create_dropdown_box.
    FOR LAYOUT SECTION .......................
    CREATE A TABLE CONTROL SELECT A FIELD OF TABLE CONTROL ON WHICH YOU WANT TO CREATE A LIST BOX
    DOUBLE click on that open a tool box click the drop down list box select the list box .
    save check activate
    regards
    Aniruddh Singh

  • Input control -Check Box Problem in webi4 over Bex query

    Hi All
    i am in webi4 over bex query
    my customer requirement is to have the option to select multiple values from object (e.g Document class) with out the need of presenting the field(e.g document class) in the report
    when I use the input control check box or list box i have the following problem
    if I select from the input control all values I see the report ok
    if I select 2 values from the list I receive #UNAVAILABLE , but if i add the field to the report ( the document class) it works fine.
    the problem is that  if I don't have the field in the report i get the #UNAVAILABLE
    any assistance is appreciated
    Thanks

    Hi,
    this question has been asked many times before on this forum, so do please search first.
    Here's some steers : http://forums.sdn.sap.com/thread.jspa?messageID=10852102#10852102
    and : http://forums.sdn.sap.com/thread.jspa?messageID=10838993#10838993
    Also, do search the knowledge base articles over here in the cross-search: www.service.sap.com/xsearch
    you keywords would be "4.0 webi #UNAVAILABLE"    (there are 12 sap notes about this)
    Finally, make sure you use all the latest Patches (Patch2.11,  2.12 next week) to include corrections.
    Regards,
    H

  • How to get selected row values in a table using check box

    Hi ADF Experts,
    JDEV Version 11.1.1.7.0
    My requirement is getting the selected row valuesof a af:table using a checkbox(multi select).
    Thanks,
    Animesh

    Hi,
    add a transient attribute to the POJO entity and update this through a check box. The ensure you have autosubmit=true set on the check box. In a value change listener set or remove the row's checbox attribute value
    Frank

  • ADF Table with check box on each row  - First time selection gets unchecked

    Hi,
        The ADF Table has a check box in each, whenever a select box is clicked for the first time , it gets unselected automatically.
    Also if I select a row / click on a row and then select the check box, it is properly getting selected. I see there is some kind of autosubmit happens. Is there a way to handle this scenerio?
    Regards,
    Dhamo

    I had this same issue happen in 11.1.1.6.x  This is a bug involving an autosubmit when the checkbox is selected.
    After migrating to 11.1.1.7.0 on J Developer and Weblogic, the problem was fixed.
    One thing to check is to make sure you are using the jars from ADF 11.1.1.7.0.
    Hope that helps

  • Table control list box. different values in each row of the list box

    Hi all,
    i have a requirement to display text box in table control. Each row of list box should contain different values.
    i tried with the below code  but the values are not getting populated in list  box. please give your ideas.
    I tried with list box which is having same values in all rows, it is working fine.
    loop at itab.
    select vbeln from ZSD_PS_BLAWB into ZSD_PS_BLAWB-vbeln
    where BLAWBNO = itab-BLAWBNO and
    BLAWBDT = itab-BLAWBDT and
    CTRNO = itab-CTRNO.
    if sy-subrc = 0.
    index = 1.
    list3-key = index.
    list3-text = ZSD_PS_BLAWB-vbeln.
    append list3 to list2.
    index = index + 1.
    endif.
    endselect.
    clear index.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = 'ITAB-VBELN'
    VALUES = list2
    EXCEPTIONS
    ID_ILLEGAL_NAME = 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.
    modify itab.
    endloop.
    Thanks in advance.

    Hi,
    this is code example for listbox
    TYPE-POOLS vrm .
    DATA: lt_vrm_values TYPE TABLE OF vrm_value.
    DATA: wa_vrm_values TYPE vrm_value.
    PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
      wa_vrm_values-key = 'Key1'.
      wa_vrm_values-text = 'Value1'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key2'.
      wa_vrm_values-text = 'Value2'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key3'.
      wa_vrm_values-text = 'Value3'.
      APPEND wa_vrm_values TO lt_vrm_values.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'P_LIST'
                values          = lt_vrm_values
           EXCEPTIONS
                id_illegal_name = 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.
    To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
    Manas M.
    P.S.: This is very easy question, you should use search ...

  • Add Row in detail table when check box is checked on a master report table

    Hi,
    How could I detect the click on the check box within a Report and then insert a row in a detail table?
    Many thanks for your help
    jko

    Hi Yogesh,
    That is all handled by the cloneRows() function described in that thread.
    In that function, we first insert a new row:
    var wNew = t.insertRow(ri + 1);ri + 1 = current row + 1 and tells javascript where to add the new row (that is, underneath the current one)
    Then, we loop through all of the cells on the current row and copy its cells into the new row:
    var c;
    var newCell;
    var oldCells = w.getElementsByTagName("TD");
    for (c = 0; c &lt; oldCells.length; c++)
      newCell = wNew.insertCell(c);
      newCell.className = oldCells[c].className;
      newCell.innerHTML = oldCells[c].innerHTML;
    }Next, we search for all INPUT items on the new row and clear the values:
    var inputs = wNew.getElementsByTagName("INPUT");
    var j;
    for (j = 0; j < inputs.length; j++)
      inputs[j].value = "";
    }And, finally, we call the updateInputs() function to rename all of the items on the page. Apex expects all items to have unique "f01_nnnn" etc names, adding in a new row upsets this, so we need to reset them:
    function pad(n)
    var s = '0000' + n;
    return s.substr(s.length-4);
    function updateFields(f)
      var fields = document.getElementsByName(f);
      var j;
      if (fields.length > 0)
        for (j = 0; j < fields.length; j++)
          fields[j].id = f + "_" + pad(j+1);
    function updateInputs()
    updateFields("f01");
    updateFields("f02");
    updateFields("f03");
    updateFields("f04");
    }without doing that, the data may get lost when the page is re-rendered.
    This is all called from a new Derived Column on the report. This column's HTML Expression is:
    &lt;a href="#" onclick="javascript:cloneRow(this)"&gt;&lt;img src="#IMAGE_PREFIX#FNDADD11.gif"&gt;&lt;/a&gt;which generates the + symbols which, when clicked, run the cloneRow() function
    Andy

  • How i can Insert selected records in database table using check box.

    Hi Friends,
    I have non database block, which displayed multiple records, now I add a Check Box to this block and now I want to insert the records in a database table which I checked. So when I press a button, all the checked records are inserted in the table.
    Please send me the code of this solution.
    Thanks in advance.
    Shahzad

    I have almost the exact scenario but instead of inserting into the DB, I want to find the Checked records and process them in PL/SQL script.
    I currently have a cursor that looks for all the checked records. It's only getting the first record, so I figured I need to loop through the block looking for checked records.
    Also can I save them to a temp or PL/SQL table to process later?

  • How to select multiple row of table using check box?

    hi,
             i am having table on view having first field as checkbox. what i want, when i click on checkboxes in multiple rows, and i click on any button i need to use those content to next view...
              my problem is if i select only one row , i can use onlead select property of table..but when i select multiple rows  through check box how should i read contents of table....?
    Plz solve it.
    Thanks,
    Saurin Shah

    Hello Saurin,
    You are right using LeadSelection you can select only 1 row at a time. You will have to make use of Selection for achieving this. First you will have to change the selection mode of the table to multiple & also change the selection property for the related context to 0..n . Please find a code extract which might help you. (However this facility is only available from SP 14.) The main part is using the set_selected method of if_wd_context_node.
    data: node_zcourse_details type ref to if_wd_context_node,
             node_course_assign type ref to if_wd_context_node,
             elem_course_assign type ref to if_wd_context_element,
             stru_course_assign type if_v_details=>element_course_assign ,
             item_popin_selected like stru_course_assign-popin_selected.
    "     navigate from <CONTEXT> to <ZCOURSE_DETAILS> via lead selection
    node_zcourse_details = wd_context->get_child_node( name = if_v_details=>wdctx_zcourse_details ).
    "     navigate from <ZCOURSE_DETAILS> to <COURSE_ASSIGN> via lead selection
    node_course_assign = node_zcourse_details->get_child_node( name = if_v_details=>wdctx_course_assign ).
    "     @TODO handle not set lead selection
    if ( node_course_assign is initial ).
    exit.
    endif.
    data elem_set type wdr_context_element_set.
    field-symbols <wa_elem> like line of elem_set.
    elem_set = node_course_assign->get_elements( ).
    loop at elem_set assigning <wa_elem>.
       <wa_elem>->set_selected( TRUE OR FALSE ). " Supply either TRUE/FALSE in here
    endloop.

  • Af:table with check box

    Hello Folks,
    I am finding very difficult here with checkBox.....
    I have a button Names "SELECT ALL" that selects all the rows in the af:table but i am also looking to check all the checkBoxes associated with row with that same "SELECT ALL" button...
    This is how i am selecting all the row and this works fine but i should also be able to check the check Boxes along with row selection for that row with that same click.
    RowKeySet rks = new RowKeySetImpl();
    CollectionModel model = (CollectionModel) getBidTB().getValue();
    int rowcount = model.getRowCount();
    for (int i = 0; i < rowcount; i++)
    model.setRowIndex(i);
    Object key = model.getRowKey();
    rks.add(key);
    getBidTB().setSelectedRowKeys(rks);
    AdfFacesContext.getCurrentInstance().addPartialTarget(getPanelGroup());
    It seems simple but my head is sniping a lot already can't get into it... Your Help will be highly appreciated.
    Thanks
    ### edited/ added #### i am using transient VO, if that makes any difference.
    Edited by: MavenDev on Dec 20, 2011 12:35 PM

    For those who are in similar situation ... below is the code which i used to select all check boxes for all row that are selected :
    RowKeySet selectedEmps = getBidTB().getSelectedRowKeys();
    Iterator selectedEmpIter = selectedEmps.iterator();
    DCBindingContainer bindings =
    (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter =
    bindings.findIteratorBinding("myIter");
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    while (selectedEmpIter.hasNext())
    Key key = (Key) ((List) selectedEmpIter.next()).get(0);
    Row currentRow = empRSIter.getRow(key);
    currentRow.setAttribute("RowChkFlg", Boolean.TRUE);
    }

  • How to insert check box value in table?

    Hi all
    kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
    thanx in advance

    Hi,
    There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
    What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
    (you cannot define boolean as a datatype for a column).
    If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
    (for the rest if it's Oracle Forms then everything is already said).
    Edited by: user11268895 on Aug 17, 2010 10:44 AM

  • Pie chart out of check boxes table

    Hi,
    Another thing that is bugging me! I have a few tables with check boxes. I would like to make a pie chart out of the false/true conditions of the check boxes in the table. My pie chart always results in a 100% value, no matter what the check boxes values are.
    Any idea?

    Hi Steve,
    If you attempt to chart the checkboxes directly, you'll get either 100% or as many equal slices as you have boxes checked (eg. with seven checked boxes, you should see seven equal slices, each labeled "14%"). Probably not what you want.
    My interpretation (an example):
    You have a table with 10 checkboxes, in cells B2:B11, 7 of them checked and 3 unchecked.
    You want a pie chart that will show the portion checked (70%) and the portion unchecked (30%).
    To get this, you'll need to generate some numbers.
    In C2, enter: =1*B2
    When you click Accept (or press return or tab) you will get a blue triangle alerting you that "The formula uses a Boolean in place of a number." Click the Ignore button.
    Fill the formula down to C11. As you do so, you should see a 1 in the cell beside each checked box and a 0 in the cell beside each unchecked box.
    In C13, enter: =SUM(C2:C11)
    In C14, enter: =10-C13
    In B13, enter: Checked
    In B14, enter: Unchecked
    Select B13..C14, then choose the pie chart from the list under the Chart button.
    If the resulting chart shows 100%, click the box mentioned in Ashka's post.
    Regards,
    Barry

  • How to read the field value from Table Control

    Hello Experts,
    I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
    When Clicked on 'SAVE' the data (MATNR) from a previous screen (101)  and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
    Internal table t_data has 3 fields.
    MATNR
    A_QTY
    B_QTY.
    Table Control TC_RACK was declared like this:
    controls tc_rack type tableview using screen 0102.
    I/0 Fields:
    A_QTY type ZQTY.
    B_QTY type ZQTY.
    The screen Flow Logic:
    process before output.
    module status_0102.
      loop at t_data into w_data with control tc_rack.
      endloop.
    process after input.
      module exit_0102 at exit-command.
      loop at tc_rack.
      endloop.
    module user_command_0102.
    module status_0102output.
      set pf-status 'STATUS_102'.
      set titlebar 'TITLE_102'.
      describe table t_rack lines tc_rack-lines.
    endmodule.                 "status_0102 output
    process after input.
    module user_command_0615 input.
    case ok_code.
       when 'SAVE_RK'.
       when others.
    endcase.
    endmodule.                 "user_command_0102 input
    Now for eg, when the users enter values for A_QTY and B_QTY like this:
    A_QTY     B_QTY
    1000         2000
    3000         4000
    How can I read these values and pass them to T_DATA so that I can save it into Z-table?
    I greatly appreciate your help.
    I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
    Thanks a lot.
    Could you please let me know
    Edited by: dev a on Jan 13, 2010 2:46 PM

    Hi dev a
    You should use
      DATA: lv_name(30) TYPE c.
      FIELD-SYMBOLS: <QTY> type ZQTY.
    GET CURSOR FIELD lv_name.   "Get the field name in table control
    check sy-subrc = 0.
    assign  (lv_name) to <QTY>.  "Here you get the value in <QTY>
    check sy-subrc = 0.
    Also use <your table control>-current_line to get the table index uo're currently on.
    Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
    Good luck
    Dean Q.
    Edited by: Dean Q on Jan 13, 2010 11:11 PM

  • How to show data through table control

    Hi Experts,
    I have created an table control through wizard using table EKKO.
    I have to populate one internal table( type ekko ), and then show it in output  through table control.
    Please advise, how to do that and in where i have to write the codes.
    I will reward points for every suggestion
    Thanks in advance.
    regards

    hi saubrab,
                    This is kiran kumar.G.I am sending some sample code to populate data into table control check it once.
    i will give input in 100 screen. and display table control in 200 screen.check it once once ..ok....
    SE38 :(CODE)
    *& Module pool       YMODULEPOOL_TABLECONTROL1                         *
    *& DEVELOPER   : KIRAN KUMAR.G                                         *
    *& PURPOSE     : TABLE CONTROL DEMO                                    *
    *& CREATION DT : 17/12/2007                                            *
    *& T.CODE      : YMODTABLECONTROL1                                     *
    *& REQUEST     : ERPK900035                                            *
    PROGRAM  ymodulepool_tablecontrol1.
    Tables
    TABLES: yvbap,  "Sales Document: Item Data
            vbak.   "Sales Document: Header Data
    Controls
    CONTROLS: my_table TYPE TABLEVIEW USING SCREEN 200.
    Global Variables
    DATA: gv_lines    TYPE i,
          gv_lines1   type i,
          gv_temp     type i,
          gv_flag(20) TYPE c VALUE 'DISP',
          gv_mode1    TYPE c,
          gv_mode     TYPE c VALUE 'C'. " C: Change, D :Display
    Internal Table
    DATA: BEGIN OF gt_item OCCURS 0,
            vbeln LIKE vbap-vbeln,  "Sales Document Number
            posnr LIKE vbap-posnr,  "Sales Document Item
            matnr LIKE vbap-matnr,  "Material Number
            matkl LIKE vbap-matkl,  "Material Group
            arktx LIKE vbap-arktx,  "Short Text for Sales Order Item
            cflag,                  "Deletion Indicator
          END OF gt_item.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZTABLECONTROL' OF PROGRAM 'YMODULEPOOL_TABLECONTROL'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'DISP'.
          SELECT single vbeln
                        erdat
                        angdt
                        bnddt
                   FROM vbak
                  INTO (vbak-vbeln,vbak-erdat,
                        vbak-angdt,vbak-bnddt)
                  WHERE vbeln = vbak-vbeln.
            IF sy-subrc EQ 0.
    *Fetch the table control data and place them in Internal Table
              SELECT vbeln
                     posnr
                     matnr
                     matkl
                     arktx
                FROM yvbap
                INTO TABLE gt_item
                WHERE vbeln = vbak-vbeln.
              IF sy-subrc EQ 0.
    *NO OF line in the Internal Table
                DESCRIBE TABLE gt_item LINES gv_lines.
                my_table-lines = gv_lines + 20.
              ENDIF.
            ENDIF.
    *Call Screen 200.
            SET SCREEN 200.
          WHEN  'EXIT' OR 'BACK' OR 'CANCEL'.
    *Exit from the Program
            CALL TRANSACTION 'SESSION_MANAGER'.
        ENDCASE.
      ENDMODULE.                 " USER_COMMAND_0100  INPUT
    module STATUS_0200 output.
    SET PF-STATUS 'ZTABLECONTROL1'.
    endmodule.                 " STATUS_0200  OUTPU
    *&      Module  copy_data  OUTPUT
          text
    module copy_data output.
    *Fetch the current line data from the Table control
    read table gt_item index my_table-current_line.
    if sy-subrc eq 0.
    *Populating data into screen fields
    gt_item-vbeln = gt_item-vbeln.
    gt_item-posnr = gt_item-posnr.
    gt_item-matnr = gt_item-matnr.
    gt_item-matkl = gt_item-matkl.
    gt_item-arktx = gt_item-arktx.
    endif.
    SE51:CODE (SCREEN 100)
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    SE51 :CODE (SCREEN 200)
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0200.
    loop at gt_item with control my_table cursor my_table-current_line.
    module copy_data.
    endloop.
    PROCESS AFTER INPUT.
    loop at gt_item.
    MODULE USER_COMMAND_0200.
    endloop.
                             HAVE A NICE DAY..
    Award points if helpful,kiran kumar.G

  • Check box in alv grid

    Hi Gurus,
    I developed one alv(grid) report. the grid having first three columns are with check boxes. Now my requirement  is if I tick or on tick those check boxes I need to track which records check boxes are modiried.
    But I canot tracking the  modified records . after ticking or unticking those check boxs values are not modified in intrnal table.
    plese help this is very urgent.
    Regards,
    Shashikumar.G

    Hi Kiran,
    I displayed internal table with check boxes that is ok.
    after displaying the internal table if i tick or un tick the records  those are not modified in internal table but I need to track the records which are modified.
    please give me repply urgently.
    Regards,
    Shashikumar.G

Maybe you are looking for