Selecting multiple rows using column header with checkbox in it.

Dear All.,
I am trying to select multiple rows with checkbox in column header but it doesnot works...
Following is my codel
<af:table value="#{bindings.xx.collectionModel}"
                      var="row"
                      rows="#{bindings.xx.rangeSize}"
                      emptyText="#{bindings.xx.viewable ? 'No data to display.' : 'Access Denied.'}"
                      fetchSize="#{bindings.xx.rangeSize}"
                      rowBandingInterval="1"
                      filterModel="#{bindings.xx.queryDescriptor}"
                      queryListener="#{bindings.xx.processQuery}"
                      varStatus="vs" partialTriggers="sbcSelectAll sbcChkFlag"
                      selectedRowKeys="#{bindings.xx.collectionModel.selectedRow}"
                      selectionListener="#{bindings.xx.collectionModel.makeCurrent}"
                      rowSelection="none" id="tCdMast" width="400"
                      columnStretching="column:c4" inlineStyle="height:200px;">
              <af:column sortProperty="ChkFlag" filterable="true"
                         sortable="true"
                         headerText="#{bindings.xx.hints.ChkFlag.label}"
                         id="c2" width="55"
                         inlineStyle="#{row.ChkFlag ? 'background-color:#9CACC9;' : ''}">
                <af:selectBooleanCheckbox simple="true" value="#{row.ChkFlag}"
                                          selected="#{row.ChkFlag}" id="sbcChkFlag"
                                          autoSubmit="true" immediate="true"/>
                <f:facet name="header">
                  <af:selectBooleanCheckbox simple="true"
                                            autoSubmit="true"
                                            valueChangeListener="#{xxBean.onTableChkAllCheckChanged}"
                                            id="sbcSelectAll"/>
                </f:facet>
              </af:column>
</af:table>
Managed Bean
    public void onTableChkAllCheckChanged(ValueChangeEvent valueChangeEvent) {
        Boolean newValue =
            Boolean.valueOf(u.nvlString(valueChangeEvent.getNewValue(),
                                        "false"));
        Boolean oldValue =
            Boolean.valueOf(u.nvlString(valueChangeEvent.getOldValue(),
                                        "false"));
        if (newValue.equals(oldValue))
            return;
        int rowIndex=0;
        ViewObject vo = u.findIterator("xxIterator").getViewObject();
        vo.reset();
        while(vo.hasNext()){
          Row row;
          if(rowIndex==0)
              row=vo.first();
          else
              row=vo.next();
             row.setAttribute("ChkFlag", newValue.booleanValue());
          rowIndex=1;
        u.addPartialTargets(tableDocuments);
    }Please help!!.
Thanks & Regards,
Santosh.
jdeve 11.1.1.4.0

Can you check this sample in the blog post?
http://sameh-nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.html
Thanks,
Navaneeth

Similar Messages

  • Selecting Multiple rows using Shift or Ctrl key

    Hi all,
            I have a requirement as given:
          Unless a user has used a shift or Ctrl key the multiple selection of rows should not be allowed in a tableview . Can anyone help me in this regard??
    Thanks in Advance,
    Chandana.

    Thank you for letting me know this. Is the reason I can use the "Shift+[letter]" shortcut key because a browser doesn't have this as a default option??
    Do you have recommendations of workarounds when trying to create courseware to exactly match what someone would do in the application? Any feedback on this topic is greatly appreciated!!!
    Thanks!

  • How to handle multiple selection in the Spark List control with checkbox as itemrenderer?

    Hi All,
    I am using checkbox as an ItemRenderer in spark list.
    I have a query.
    how to handle multiple selection in the Spark List control with checkbox as itemrenderer?
    how to retrieve the selected item label?
    Thank you in advance.

    Hi there, I'll tweak your code a little bit to something like this:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical">
        <mx:Script>
            <![CDATA[
                 import mx.events.ListEvent;
                 import mx.controls.CheckBox;
               [Bindable]
               private var mySelectedIndexes:ArrayCollection=new ArrayCollection();
                private function onChange(e:ListEvent):void
                   if(CheckBox(e.itemRenderer).selected){
                             mySelectedIndexes.addItem(e.rowIndex);
                   }else{
                                  mySelectedIndexes.removeItemAt(mySelectedIndexes.getItemIndex(e.rowIndex));     
                   chkList.selectedIndices=mySelectedIndexes.toArray();
            ]]>
        </mx:Script>
    <mx:ArrayCollection id="collection">
            <mx:Object label="Test A"/>
            <mx:Object label="Test B"/>
            <mx:Object label="Test C"/>
            <mx:Object label="Test D"/>
            <mx:Object label="Test E"/>
            <mx:Object label="Test F"/>
            <mx:Object label="Test G"/>
        </mx:ArrayCollection>
    <mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox"  itemClick="onChange(event);" allowMultipleSelection="true"/>
    </mx:Application>

  • 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.

  • Reading each value from spreadshee​t file with delay (multiple rows and columns)

    Hi,
    a) I want to read EACH VALUE from a spreadsheet file having multiple rows and columns WITH DELAY. I am attaching my VI and sample datalog file for reference (tempsensor.txt).I need to do so because as soon as I read put ON the Sensor button on front panel, LV reads all the values at one go. I need the values for each temperature to be displayed after a delay.
    b) Secondly, I would like to read another file containing the state of four antennas (deployed:1; undeployed:0). I am logging state of each antenna in each column of the file(magnet.txt) I need to have four LEDS on front panel to display state of the antennas. I dont know what I have done for antennas in my VI is right or wrong. I guess thats rhe wrong way to approach the problem. Please help!!!(column1: Antenna1 state ; Column2:Antenna2 state.. and so..on..)
    Any help would be greatly appreciated!!
    Thanks in advance,
    Ratnesh
    FYI: The first column in my datalog file represents timestamp(number of seconds elapsed), second column: reading for temperature sensor 1, third column: reading for temperature senosr 2, and so on. I am using approx. 11 temperature sensors.
    Also, I have generated the log files for the reference purpose only. They do not represent the actual values. They are far away from actual values.
    Attachments:
    01032005.zip ‏30 KB

    Look at this modified version of your VI. After looking at it, I determined that a shift reggister was not required in this case.
    Lynn
    Attachments:
    MultiSensors.2.vi ‏85 KB

  • Switched from Samsung Note 2 to iphone 6. Faced Difficulties while sending message. [1]Multiple Selection of receipients is not available. Eg. If I click plus, it shows me all the contacts but i cannot select multiple contacts using checkbox

    Phone : IPhone 6
    OS : 8.1
    Problem Statement : Multiple Selection of Recipients while drafting New Message in SMS.
    Expected Solution : Checkbox should have been provided to select multiple contacts using one screen

    Thanks for the reply.. I also tried that way.. I face couple of issues
    1) I could not find an option of saving a Draft Message
    2) After multiple recipients(I have selected 12 recipients) in "TO" section, if I type a word in "TO" such as "Pre", it shows me all the contacts containing "Pre"  but I cannot select the last contact incase there are more than 20 contacts coz I am unable to scroll down till the end.. If I do so.. I cannot select coz screen scrolls up automatically..
    Pls try ... If required I will insert video

  • JTable - Check box in column header with sorting

    Hello
    I have 3 problems/questions.
    1. When adding sorting to a table with
    setAutoCreateRowSorter(true);and you click on a column header, normally a sorting arrow will appear, and indicate in what direction its sorting,
    but in the column head with the checkbox, even though the sorting works, the arrow will never appear. Is there anyway to fix this?
    2. Is there anyway to get the checkboxes in the table cells to be aligned left (I dont mean the columnheader checkbox, but the ones below)?
    3. When you click on the columnheader to either sort or check the checkbox, you will have to wait about a second between each click, or else it won't react and won't sort. sometimes you will have to click twice for it to react. If you click a lot of times fast, then it won't react until you stop for a second, and click again, though it will react only on the first click, but not the secont, third, fourh, and so on, until you stop for a second. Is there anyway to fix this, or atleast make it have a better reaction time?
    This is the code for creating the table:
    public class Example extends JFrame{
        private Container container;
        private JTable exampleTable;
        public Example(){
            container = getContentPane();
            ExamleTableModel examleTableModel = new ExamleTableModel();
            exampleTable = new JTable(examleTableModel);
            TableColumn tc = exampleTable.getColumnModel().getColumn(0);
            tc.setCellEditor(exampleTable.getDefaultEditor(Boolean.class)); 
            tc.setCellRenderer(exampleTable.getDefaultRenderer(Boolean.class)); 
            tc.setHeaderRenderer(new CheckBoxHeader(new MyItemListener()));
            container.add(new JScrollPane(exampleTable), BorderLayout.SOUTH);
            exampleTable.setAutoCreateRowSorter(true);
            setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );       
            this.pack();
            setSize(500,500);
            setVisible(true);
        }This is the code for the checkboxheader:
        class MyItemListener implements ItemListener 
                public void itemStateChanged(ItemEvent e) { 
                    Object source = e.getSource(); 
                    if (source instanceof AbstractButton == false) return; 
                    boolean checked = e.getStateChange() == ItemEvent.SELECTED; 
                    for(int a = 0, b = exampleTable.getRowCount(); a < b; a++) { 
                        for(int c = 0, d = exampleTable.getRowCount(); c < d; c++) { 
                            if(exampleTable.getColumnName(c).equals("")){
                                exampleTable.setValueAt(new Boolean(checked),a,c);
        class CheckBoxHeader extends JCheckBox 
            implements TableCellRenderer, MouseListener {
            protected CheckBoxHeader rendererComponent; 
            protected int column; 
            protected boolean mousePressed = false; 
            public CheckBoxHeader(ItemListener itemListener) { 
                rendererComponent = this; 
                this.setHorizontalAlignment(JLabel.LEFT);
                rendererComponent.addItemListener(itemListener); 
            public Component getTableCellRendererComponent( 
                    JTable table, Object value, 
                    boolean isSelected, boolean hasFocus, int row, int column) { 
                if (table != null) { 
                    JTableHeader header = table.getTableHeader(); 
                    if (header != null) { 
                        rendererComponent.setForeground(header.getForeground()); 
                        rendererComponent.setBackground(header.getBackground()); 
                        rendererComponent.setFont(header.getFont()); 
                        header.addMouseListener(rendererComponent); 
                setColumn(column); 
                rendererComponent.setText("");
                setBorder(UIManager.getBorder("TableHeader.cellBorder")); 
                return rendererComponent; 
            protected void setColumn(int column){this.column = column;} 
            public int getColumn(){return column;} 
            protected void handleClickEvent(MouseEvent e) { 
                if (mousePressed) { 
                    mousePressed=false; 
                    JTableHeader header = (JTableHeader)(e.getSource()); 
                    JTable tableView = header.getTable(); 
                    TableColumnModel columnModel = tableView.getColumnModel(); 
                    int viewColumn = columnModel.getColumnIndexAtX(e.getX()); 
                    int column = tableView.convertColumnIndexToModel(viewColumn); 
                    if (viewColumn == this.column && e.getClickCount() == 1 && column != -1) { 
                        doClick(); 
            public void mouseClicked(MouseEvent e) { 
                boolean active=true;
                JTableHeader header = (JTableHeader)(e.getSource()); 
                switch (e.getID()) {
                case MouseEvent.MOUSE_CLICKED:
                case MouseEvent.MOUSE_PRESSED:
                case MouseEvent.MOUSE_RELEASED:
                    JTable tableView = header.getTable();
                    TableColumnModel columnModel = tableView.getColumnModel();
                    int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                    int column = tableView.convertColumnIndexToModel(viewColumn);
                    Rectangle bounds = tableView.getCellRect(-1, column, false);
                    if (e.getX() > bounds.x + 16) { // only if one the checkbox
                        if (e.getID() == MouseEvent.MOUSE_CLICKED) {active = false;}
                    }else{active=true;}
                if(active){
                    handleClickEvent(e); 
                    ((JTableHeader)e.getSource()).repaint();   
            public void mousePressed(MouseEvent e){mousePressed = true;} 
            public void mouseReleased(MouseEvent e){} 
            public void mouseEntered(MouseEvent e){} 
            public void mouseExited(MouseEvent e){} 
    }If you want the code for the ExamleTableModel, I will post it if you ask (having trouble with the character limit).

    What are you supposed to cast it to? I might have tried to cast it to something wrong.
    I tried
    TableCellRenderer tcr = table.getDefaultRenderer(Boolean.class);
    ((DefaultTableCellRenderer)tcr).setHorizontalAlignment(SwingConstants.LEFT);and that gave me a ClassCastException. But I might have been trying to cast it to the wrong thing.

  • Selecting Multiple Rows from ALV GRID Display

    Hi,
    I am having a ALV GRID Display. I want to select multiple rows from the Output and move them to an internal table.
    Please let me know how do I acheive this.
    Thanks in advance,
    Ishaq.

    Hi,
    Have a look on the following code. It displays the selected rows which hv been selected in basic list.
    TABLES:
      spfli.
    TYPE-POOLS:
      slis.
    DATA:
      BEGIN OF t_spfli OCCURS 0,
        checkbox.
            INCLUDE STRUCTURE spfli.
    DATA:  END OF t_spfli.
    DATA:
      t_sspfli LIKE STANDARD TABLE OF t_spfli .
    DATA:
      fs_spfli LIKE LINE OF t_sspfli.
    DATA:
      fs_layout TYPE  slis_layout_alv,
      w_program TYPE sy-repid.
    SELECT *
      FROM spfli
      INTO CORRESPONDING FIELDS OF TABLE t_spfli.
    *fs_layout-info_fieldname = 'COLOR'.
    fs_layout-box_fieldname = 'CHECKBOX'.
    w_program = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program       = w_program
        i_callback_pf_status_set = 'FLIGHT'
        i_callback_user_command  = 'SPFLI_INFO'
        i_structure_name         = 'SPFLI'
        is_layout                = fs_layout
      TABLES
        t_outtab                 = t_spfli
      EXCEPTIONS
        program_error            = 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.
    *&      Form  FLIGHT
          text
         -->RT_EXTAB   text
    FORM flight    USING rt_extab TYPE slis_t_extab..
      SET PF-STATUS 'FLIGHT' EXCLUDING rt_extab.
    ENDFORM.                    "FLIGHT
    *&      Form  SPFLI_INFO
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM spfli_info USING ucomm LIKE sy-ucomm
                           selfield TYPE slis_selfield.
      selfield-refresh = 'X'.
      CASE ucomm.
        WHEN 'FLIGHT'.
          LOOP AT t_spfli.
            IF t_spfli-checkbox = 'X'.
              t_spfli-checkbox = ' '.
             t_spfli-color = 'C51'.
              MODIFY t_spfli TRANSPORTING checkbox.
              fs_spfli = t_spfli.
              APPEND fs_spfli TO t_sspfli.
            ENDIF.
          ENDLOOP.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
      CLEAR fs_spfli.
      fs_layout-info_fieldname = 'COLOR'.
    fs_layout-confirmation_prompt = 'X'.
      fs_layout-key_hotspot = 'X'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = w_program
          i_structure_name   = 'SFLIGHT'
          is_layout          = fs_layout
        TABLES
          t_outtab           = t_sspfli
        EXCEPTIONS
          program_error      = 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 t_sspfli.
    ENDFORM.                    "SPFLI_INFO
    Regards,
    Chandu

  • Selecting Multiple rows in an ALV

    Hi Experts,
    Using 'REUSE_ALV_GRID_DISPLAY' is it possible to select multiple rows, WITHOUT using CTRL OR SHIFT keys ?
    thanks in advance.

    I have done an application for multiple selection in ALV using check box concept. Please find that code below.
    *& Report  ZATL_DELIVERY
    REPORT  zatl_delivery.
    INCLUDE zatl_delivery_declarations.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    SELECT-OPTIONS:  s_vbeln FOR vbak-vbeln OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK a.
    INITIALIZATION.
    AT SELECTION-SCREEN.
    START-OF-SELECTION .
    SET PF-STATUS 'ABC'.
    SET PF-STATUS 'BCD'.
    get the sales order numbers thru given
    selection-screen parameters
      SELECT vbeln FROM vbak INTO TABLE it_data
              WHERE vbeln IN s_vbeln.
              AND  ERDAT = P_DATE.
      IF NOT it_data[] IS INITIAL.
        SELECT vbeln vstel FROM vbap INTO TABLE it_vstel
                 FOR ALL ENTRIES IN it_data
                   WHERE vbeln = it_data-vbeln.
      ENDIF.
      LOOP AT it_data INTO wa_data.
        CALL FUNCTION 'ZBAPI_GET_MATERIAL_PLANT_DTL'
          EXPORTING
            v_vbeln = wa_data-vbeln
          TABLES
            it_bapi = it_result.
        LOOP AT it_result INTO wa_result.
          READ TABLE it_vstel INTO wa_vstel WITH KEY
                           vbeln = wa_result-vbeln.
          wa_final-vbeln = wa_result-vbeln. " SALES ORDER NO
          wa_final-matnr = wa_result-matnr.
          wa_final-vstel = wa_vstel-vstel.
          wa_final-werks = wa_result-werks.
          wa_final-labst = wa_result-kwmeng.
          APPEND wa_final TO it_final.
          CLEAR wa_result.
        ENDLOOP.
        REFRESH it_result.
        CLEAR wa_data.
      ENDLOOP.
      PERFORM build_fldcat.
      PERFORM disp_output.
    *SET PF-STATUS 'ABC'.
    *&      Form  ABC
          text
         -->EXTAB      text
    FORM abc USING extab TYPE slis_t_extab.
      SET PF-STATUS 'ABC'. " excluding extab.
    ENDFORM.                    "ABC
    read
    *&      Form  build_fldcat
          text
    -->  p1        text
    <--  p2        text
    FORM build_fldcat .
      wa_fldcat-col_pos = '1'.
      wa_fldcat-fieldname = 'MARK'.
      wa_fldcat-checkbox = 'X'.
      wa_fldcat-edit = 'X'.
      wa_fldcat-seltext_m     = 'MARK'.
      APPEND wa_fldcat TO i_fldcat.
      CLEAR wa_fldcat.
      wa_fldcat-col_pos = '2'.
      wa_fldcat-fieldname = 'VBELN'.
      wa_fldcat-tabname = 'IT_FINAL'.
      wa_fldcat-seltext_m     = 'SALES ORD NO'.
      APPEND wa_fldcat TO i_fldcat.
      wa_fldcat-col_pos = '3'.
      wa_fldcat-fieldname = 'MATNR'.
      wa_fldcat-tabname = 'IT_FINAL'.
      wa_fldcat-seltext_m     = 'MAT NO'.
      APPEND wa_fldcat TO i_fldcat.
      wa_fldcat-col_pos = '4'.
      wa_fldcat-fieldname = 'WERKS'.
      wa_fldcat-tabname = 'IT_FINAL'.
      wa_fldcat-seltext_m     = 'PLANT'.
      APPEND wa_fldcat TO i_fldcat.
      wa_fldcat-col_pos = '5'.
      wa_fldcat-fieldname = 'LABST'.
      wa_fldcat-tabname = 'IT_FINAL'.
      wa_fldcat-seltext_m     = 'QNTY'.
      APPEND wa_fldcat TO i_fldcat.
    ENDFORM.                    " build_fldcat
    *&      Form  disp_output
          text
    -->  p1        text
    <--  p2        text
    FORM disp_output .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'ABC'
          it_fieldcat              = i_fldcat
          i_callback_user_command  = 'CHECKED'
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 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.
    ENDFORM.                    " disp_output
    *&      Form  CHECKED
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM checked USING r_ucomm LIKE sy-ucomm
                  rs_selfield TYPE slis_selfield.
      DATA: gd_repid LIKE sy-repid, "Exists
      ref_grid TYPE REF TO cl_gui_alv_grid.
      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.
      CASE r_ucomm.
        WHEN 'DELIVERY'.
          IF rs_selfield-fieldname = 'MARK'.
            DATA : date_external(10) TYPE c.
            DATA: temp_date TYPE sy-datum.
            temp_date = sy-datum.
            temp_date = temp_date + 1.
            CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
              EXPORTING
                date_internal            = sy-datum
              IMPORTING
                date_external            = date_external
              EXCEPTIONS
                date_internal_is_invalid = 1
                OTHERS                   = 2.
            LOOP AT it_final INTO wa_final WHERE mark EQ 'X'.
              PERFORM bdc_dynpro      USING 'SAPMV50A' '0100'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'LV50C-VBELN'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'LIKP-VSTEL'
                                            wa_final-vstel. " 'HLL'.
              PERFORM bdc_field       USING 'LV50C-DATBI'
                                            date_external. "
              PERFORM bdc_field       USING 'LV50C-VBELN'
                                            wa_final-vbeln.     " '34'.
              PERFORM bdc_dynpro      USING 'SAPMV50A' '0200'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'LIPS-MATNR(02)'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=SICH'.
              PERFORM bdc_field       USING 'LIKP-BLDAT'
                                            date_external. " '19.09.2008'.
                CLEAR date_external.
              CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
                EXPORTING
                  date_internal            = temp_date
                IMPORTING
                  date_external            = date_external
                EXCEPTIONS
                  date_internal_is_invalid = 1
                  OTHERS                   = 2.
              PERFORM bdc_field       USING 'LIKP-WADAT'
                                            date_external ." '19.09.2008'.
                CLEAR date_external.
              PERFORM bdc_field       USING 'LIKP-BTGEW'
                                            wa_final-labst.     " -'12'.
              PERFORM bdc_field       USING 'LIKP-GEWEI'
                                            'wa_likp-GEWEI'.
              PERFORM bdc_transaction USING 'VL01'.
              PERFORM msg_get  TABLES it_msg.
              CLEAR wa_final.
              REFRESH it_msg.
            ENDLOOP.
            PERFORM disp_msg.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "CHECKED
    *&      Form  BDC_DYNPRO
          text
         -->P_0443   text
         -->P_0444   text
    FORM bdc_dynpro  USING    value(p_0443)
                              value(p_0444).
      wa_bdc-program = p_0443.
      wa_bdc-dynpro =  p_0444.
      wa_bdc-dynbegin = 'X'.
      APPEND wa_bdc TO it_bdc.
      CLEAR wa_bdc.
    ENDFORM.                    " BDC_DYNPRO
    *&      Form  BDC_FIELD
          text
         -->P_0448   text
         -->P_0449   text
    FORM bdc_field  USING    value(p_0448)
                             value(p_0449).
      wa_bdc-fnam = p_0448.
      wa_bdc-fval =  p_0449.
      APPEND wa_bdc TO it_bdc.
      CLEAR wa_bdc.
    ENDFORM.                    " BDC_FIELD
    *&      Form  BDC_TRANSACTION
          text
         -->P_0508   text
    FORM bdc_transaction  USING    value(p_0508).
      CALL TRANSACTION p_0508 USING it_bdc
                           MODE 'N'
                           UPDATE 'S'
                           MESSAGES INTO it_msg.
    ENDFORM.                    " BDC_TRANSACTION
    *&      Form  msg_get
          text
         -->P_IT_MSG  text
    FORM msg_get  TABLES   p_it_msg STRUCTURE bdcmsgcoll.
      LOOP AT p_it_msg INTO wa_msg.
        v_msgid = wa_msg-msgid.
        v_msgnr = wa_msg-msgnr.
        v_msgv1 = wa_msg-msgv1.
        v_msgv2 = wa_msg-msgv2.
        v_msgv3 = wa_msg-msgv3.
        v_msgv4 = wa_msg-msgv4.
        IF wa_msg-msgtyp = 'E' OR
           wa_msg-msgtyp = 'A' OR
           wa_msg-msgtyp = 'X'.
          PERFORM build_msg USING v_msgid
                            v_msgnr
                            v_msgv1
                            v_msgv2
                            v_msgv3
                            v_msgv4
                      CHANGING msg_text_e.
      Build the text for successful records getting created
        ELSEIF wa_msg-msgtyp = 'S' OR
               wa_msg-msgtyp = 'W' OR
               wa_msg-msgtyp = 'I'.
          PERFORM build_msg USING v_msgid
                                  v_msgnr
                                  v_msgv1
                                  v_msgv2
                                  v_msgv3
                                  v_msgv4
                             CHANGING msg_text_s.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " msg_get
    *&      Form  build_msg
          text
         -->P_V_MSGID  text
         -->P_V_MSGNR  text
         -->P_V_MSGV1  text
         -->P_V_MSGV2  text
         -->P_V_MSGV3  text
         -->P_V_MSGV4  text
         <--P_MSG_TEXT_E  text
    FORM build_msg  USING    p_v_msgid
                             p_v_msgnr
                             p_v_msgv1
                             p_v_msgv2
                             p_v_msgv3
                             p_v_msgv4
                    CHANGING p_msg_text_s.
      CALL FUNCTION 'TB_MESSAGE_BUILD_TEXT'
        EXPORTING
          langu = sy-langu
          msgid = p_v_msgid
          msgno = p_v_msgnr " wa_msgcoll-msgnr
          msgv1 = p_v_msgv1
          msgv2 = p_v_msgv2
          msgv3 = p_v_msgv3
          msgv4 = p_v_msgv4
        IMPORTING
          text  = p_msg_text_s.
      wa_mess-v_msg = p_msg_text_s .
      APPEND wa_mess TO i_mess.
      CLEAR wa_mess.
    ENDFORM.                    " build_msg
    *&      Form  disp_msg
          text
    -->  p1        text
    <--  p2        text
    FORM disp_msg .
      PERFORM build_fieldcat_secandary.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'BCD'
          it_fieldcat              = i_fldcat1
          i_callback_user_command  = 'SECANDARY'
        TABLES
          t_outtab                 = i_mess
        EXCEPTIONS
          program_error            = 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.
    ENDFORM.                    " disp_msg
    *&      Form  build_fieldcat_secandary
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcat_secandary .
      wa_fldcat1-col_pos = '1'.
      wa_fldcat1-fieldname = 'V_MSG'.
      wa_fldcat1-tabname = 'I_MESS'.
      wa_fldcat1-seltext_m     = 'MESSAGE'.
      APPEND wa_fldcat1 TO i_fldcat1.
    ENDFORM.                    " build_fieldcat_secandary
    *&      Form  SECANDARY
          text
         -->R_UCOMM    text
    FORM secandary USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN 'BCK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDFORM.                    "SECANDARY
    *&      Form  ABC
          text
         -->EXTAB      text
    FORM bcd USING extab TYPE slis_t_extab.
      SET PF-STATUS 'BCD'. " excluding extab.
    ENDFORM.                    "ABC
    Hope this will help you,
    Murthy.

  • Selection screen data in column heading

    Hi,
    My requirement is to show the value entered in the selection screen in the report output column heading using text elements.
    I am using text element to show the column heading. how can i add a variable to the text element and pass the value to it ?
    Thanks,
    Prasad.

    Hi,
    Its not possible to pass on the variables with the text elements, as text elements are used storing the text written by you in the program and not the values of the variable.
    hence if you want to display the column heading with the variable you can directly write text element first and then write the variable,
    write : text-001, w_variable.
    Regards,
    Siddarth

  • Selecting a row of h:datatable with java

    hello
    Is there any way to set selected row in java bean for h:datatable ?
    in other words.
    how can I select a row of h:datatable with java ?
    regards

    If you have an UICommand component in a row, there are two ways:
    Bind h:dataTable to an UIData property in backing bean and use UIData#getRowData().
    Or wrap data list in an DataModel instance and use DataModel#getRowData().
    Alternatively you could also use f:setPropertyActionListener, but that isn't that efficient inside a h:dataTable.
    If you actually want to select rows using radiobuttons or checkboxes, then check the examples in this article: [http://balusc.blogspot.com/2006/06/using-datatables.html].

  • Pressing cntrl+left mouse click doesn't select multiple rows.

    Hi,
    I've got this problem after i migrated my form from 6i to 10g.
    In 6i version, cntrl+left mouse click used to work in order to select multiple rows on the screen. But, it's not working in 10g.
    Instead, Shit + left mouse click is working to select multiple rows in 10g.
    Please can someone help me out with this. I want cntrl + left mouse click to work.
    Any help will be appreciated.
    Regards
    Navnit

    Hi Pradeep,
    Thanks for your reply.
    Do you mean fmrweb.res file?
    This is the content of my res file
    9 : 0 : "Tab" : 1 : "Next Field"
    9 : 1 : "Shift+Tab" : 2 : "Previous Field"
    116 : 0 : "F5" : 3 : "Clear Field"
    38 : 0 : "Up" : 6 : "Up"
    40 : 0 : "Down" : 7 : "Down"
    33 : 0 : "PageUp" : 12 : "Scroll Up"
    34 : 0 : "PageDown" : 13 : "Scroll Down"
    69 : 2 : "Ctrl+E" : 22 : "Edit"
    10 : 0 : "Return" : 27 : "Return"
    76 : 2 : "Ctrl+L" : 29 : "List of Values"
    115 : 0 : "F4" : 32 : "Exit"
    75 : 2 : "Ctrl+K" : 35 : "Show Keys"
    83 : 2 : "Ctrl+S" : 36 : "Commit"
    118 : 1 : "Shift+F7" : 61 : "Next Primary Key"
    117 : 0 : "F6" : 62 : "Clear Record"
    38 : 2 : "Ctrl+Up" : 63 : "Delete Record"
    117 : 1 : "Shift+F6" : 64 : "Duplicate Record"
    40 : 2 : "Ctrl+Down" : 65 : "Insert Record"
    119 : 1 : "Shift+F8" : 66 : "Next Set of Records"
    1005 : 0 : "Down" : 67 : "Next Record"
    1004 : 0 : "Up" : 68 : "Previous Record"
    118 : 0 : "F7" : 69 : "Clear Block"
    66 : 2 : "Ctrl+B" : 70 : "Block Menu"
    34 : 1 : "Shift+PageDown" : 71 : "Next Block"
    33 : 1 : "Shift+PageUp" : 72 : "Previous Block"
    116 : 1 : "Shift+F5" : 73 : "Duplicate Field"
    119 : 0 : "F8" : 74 : "Clear Form"
    122 : 0 : "F11" : 76 : "Enter Query"
    122 : 2 : "Ctrl+F11" : 77 : "Execute Query"
    69 : 3 : "Shift+Ctrl+E" : 78 : "Display Error"
    80 : 2 : "Ctrl+P" : 79 : "Print"
    123 : 0 : "F12" : 80 : "Count Query"
    85 : 2 : "Ctrl+U" : 81 : "Update Record"
    121 : 3 : "Shift+Ctrl+F10" : 82 : "Function 0"
    112 : 3 : "Shift+Ctrl+F1" : 83 : "Function 1"
    113 : 3 : "Shift+Ctrl+F2" : 84 : "Function 2"
    114 : 3 : "Shift+Ctrl+F3" : 85 : "Function 3"
    115 : 3 : "Shift+Ctrl+F4" : 86 : "Function 4"
    116 : 3 : "Shift+Ctrl+F5" : 87 : "Function 5"
    117 : 3 : "Shift+Ctrl+F6" : 88 : "Function 6"
    118 : 3 : "Shift+Ctrl+F7" : 89 : "Function 7"
    119 : 3 : "Shift+Ctrl+F8" : 90 : "Function 8"
    120 : 3 : "Shift+Ctrl+F9" : 91 : "Function 9"
    113 : 0 : "F2" : 95 : "List Tab Pages"
    72 : 2 : "Ctrl+H" : 30 : "Help"
    112 : 0 : "F1" : 30 : "Help"
    I don't know what value should i enter for cntrl + left mouse click ?
    Even for shift + left mouse click, row is not there but it's working.
    Please tell if you know what row should i enter for cntrl + left mouse click in order for it to select mutliple rows?
    Regards
    Navnit

  • Adding and Deleting Multiple Rows or Columns

    How do you add or delete more than one row or column at a time.

    Robby! wrote:
    That's a great finding!
    I just wrote a feedback requesting a shortcut like this.
    It is a pity though that they desing it to work only if you select the header of the row/column. It should be enabled to work from within any cell in the table.
    Who wrote such an error ?
    These interesting shortcuts behave flawlessly even if the cursor was in D18 for instance.
    (a) I never saw them in the delivered resources.
    (b) they aren't responding to the OP's question which was about "Adding and Deleting Multiple Rows and Columns"
    Yvan KOENIG (from FRANCE vendredi 3 octobre 2008 18:39:01)

  • Populate multiple rows and columns based off of a single cell

    Does anyone know a way to populate multiple rows and columns based off of the input of a single cell. I'm trying to create a workout tracker that auto populates from a master list of workouts. Example, in A2 the user selects the workout from a drop down menu (St1, St2, St3, etc) and the workout is pulled from the master list and is populated into B2:C5.
    I'm using =LOOKUP(A2,Master :: A2:A32,Master :: C2:C32) right now, but it's only drawing the top column. I'm looking for an edit for the formula (or completely new formula) that will place the info from the 1st column of the Master table into the 1st column of the Auto Tracker 1 table and then on down until the 4th column.
    Here is a screen shot of what I have now:
    And an example of what I'd like to accomplish:
    Any and all help is appreciated, and please let me know if there is any more info that I can give that'd help out.

    Hi Mike,
    Your screenshots show that you have merged some cells in Column A of both tables. That may be the reason why the LOOKUP function is having trouble working out which range of cells to examine.
    Hope this helps.
    Regards,
    Ian.

  • How to save data from JTable multiple rows and columns

    Hi Y_Not thanks for your help before...
    But what should I do if I want to get/save many data from many column and rows??

    i don't quite understand your (repeated) question. what is the problem with "multiple rows and columns". Y_NOT and i have shown you ways to access them.
    all you need are 2 loops: one around your number of rows and one around the number of columns or vice versa depending in which order you want to save things:
    for (int col = 0; col < data.size(); col++) {
        for (int row = 0 ; row < data[col].size(); row++) {
            // save your data
            saveData(data[col].getElementAt(row));
            // or use yourtable.getValueAt(row, col);
    }this is not a problem of Swing/Java but of simple algorithm...
    thomas

Maybe you are looking for

  • Impossible to install arch in UEFI mode on my Acer Aspire S3-391

    Hi there, I am trying to install arch-linux on my Acer Aspire S3-391, which came with a pre-shipped Windows 8. I am trying to make a dual boot, so I would like to keep the UEFI mode at startup. However, my computer won't boot on the Arch Linux USB Fl

  • Remove edges

    Hi, ALL! If you know how to remove the edges around the labels at the front panel then explain me, please end. I know how to do this in LabVIEW 4.x and 5.x but I don't know in LabVIEW 3.x. Where are examples in 3.x both with the edges and without the

  • Ichat, AIM, & Adium all frequently disconnect when using Air

    Ichat, AIM, & Adium all frequently disconnect when using Airport. I use a Linksys Wireless Router with an Airport extreme card. When directly connected to the router, I have no problem. Using a PC with Windows XP, AIM operates fine. Safari and Firefo

  • Same issues in CS4 as CS5

    So I have upgraded to CS5 hoping that the numerous issues I faced with CS4 would cease and go away. For a person in a position where Photoshop is the bulk of your daily use you might think that Adobe might have found the solutions for these irritatin

  • -50 error when trying to download purchased music

    HELP, I just bought my first iPod yesterday and so far its my nightmare. I am trying to download an audio book and some music that I purchased and every time, I get the -50 error. Problem 2, the audiobook and music that I purchased last night (and co