Multi Row Selection in Table list
Hi All,
Currently in our scenorio, we are able to select only one row at a time from the table list, but we need to select multiple row at a time.
Even we have tried to select multi row using CTRL key but if we select another row previous selection got removed.
Kindly suggest where we need to make modification.
Thank you,
Cha
Balan,
I have a Search Result View which allows users to select multiple rows. To process, user clicks the custom button "Submit" added on the Tool bar. In the event handler i wrote the below code. This is selecting only last record. But i want to read all selected rows.
--- htm page
<chmlb:configTable id
= "Table"
reset
= "<%= controller->get_reset_flag( ) %>"
actions
= "<%= controller->gt_button %>"
navigationMode = "BYPAGE"
table
= "//RESULT/Table"
visibleRowCount = "<%= lv_visiblerows %>"
usage
= "SEARCHRESULT"
downloadToExcel = "<%= lv_export %>"
selectedRowIndexTable = "<%= RESULT->SELECTION_TAB %>"
selectionMode
= "<%= RESULT->SELMODE_MULTI %>"
onRowSelection
= "SELECT"
showNoMatchText = "FALSE" />
method submit.
data: lv_collection TYPE REF TO if_bol_bo_col,
lv_property_access TYPE REF TO if_bol_bo_property_access.
lv_collection ?= me->typed_context->result->collection_wrapper->get_marked( ).
lv_property_access = lv_collection->get_first( ).
WHILE lv_property_access IS not INITIAL.
lv_property_access = lv_collection->get_next( ).
endwhile.
endmethod.
Thanks
Tim
Similar Messages
-
PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list
Hi,
I have a requirement to send a table data through mail,
so am using execute statement after opening the connection and am using the following PLSQL code, which am failing to execute successfully.
My code goes like this.
0 10 20 30 40 50
1 CREATE OR REPLACE PROCEDURE SEND_TABLE_DATA( FROMAD IN VARCHAR2,
2 TOAD IN VARCHAR2,
3 SUBJECT IN VARCHAR2,
4 MESSAGE IN VARCHAR2,
5 DOCID IN VARCHAR2,
6 DOCDT IN DATE,
7 PRODOAID IN NUMBER )
8 AS
9 BATCHNO VARCHAR2(32767);
10 PCSBOX NUMBER;
11 AMOUNT NUMBER;
12 SMTPHOST VARCHAR2(255) := 'XXX.XXX.X.XXX' ;
13 A UTL_SMTP.CONNECTION ;
14 BEGIN
15 A :=UTL_SMTP.OPEN_CONNECTION(SMTPHOST,25);
16 UTL_SMTP.HELO(A,SMTPHOST);
17 UTL_SMTP.MAIL(A,FROMAD);
18 UTL_SMTP.RCPT(A,TOAD);
19 UTL_SMTP.OPEN_DATA(A);
20 UTL_SMTP.WRITE_DATA(A, CHR(13) ||CHR(13) || CHR(13) );
21 UTL_SMTP.WRITE_DATA (A,'Date: '|| TO_CHAR(SYSDATE,'DD/MM/YYYY HH24:MI:SS') || CHR(13) );
22 UTL_SMTP.WRITE_DATA(A,'From: '||FROMAD|| CHR(13) );
23 UTL_SMTP.WRITE_DATA(A, 'To: '||TOAD|| CHR(13) );
24 UTL_SMTP.WRITE_DATA(A, 'Subject: '|| SUBJECT || CHR(13) );
25 UTL_SMTP.WRITE_DATA(A,MESSAGE||DOCID||' Documented on '||DOCDT||CHR(13) );
26 UTL_SMTP.WRITE_DATA(A,CHR(13) || CHR(13) || CHR(13) );
27 UTL_SMTP.WRITE_DATA(A,'This is for your information'||CHR(13) );
28 UTL_SMTP.WRITE_DATA (A,' BATCHNO '|| ' -- '||' PCSBOX '||' -- '||' AMOUNT '||CHR(13) );
29 EXECUTE IMMEDIATE
30 'SELECT
31 A.BATCHNO,B.PCSBOX,B.AMOUNT
32 FROM
33 SCHEMA1.TABLEX A,SCHEMA2.TABLEY B
34 WHERE
35 A.BATCHID=B.BATCHNO AND B.PRODOAID='|| PRODOAID
36 BULK COLLECT INTO BATCHNO,PCSBOX,AMOUNT;
37 FOR indx IN 1..BATCHNO.COUNT
38 LOOP
39 UTL_SMTP.WRITE_DATA (A,BATCHNO(indx)|| ' -- '||PCSBOX(indx)||' -- '||AMOUNT(indx)||CHR(13) );
40 END LOOP;
41 UTL_SMTP.WRITE_DATA( A,CHR(13) || CHR(13) || CHR(13) );
42 UTL_SMTP.CLOSE_DATA(A);
43 UTL_SMTP.QUIT(A);
44 EXCEPTION
45 WHEN OTHERS THEN
46 UTL_SMTP.QUIT(A);
47 RAISE;
48 END;
49 /
SELECT * FROM USER_ERRORS
NAME TYPE SEQUENCE LINE POSITION TEXT ATTRIBUTE MESSAGE_NUMBER
SEND_TABLE_DATA
PROCEDURE
3
37
1
PL/SQL: Statement ignored
ERROR
0
SEND_TABLE_DATA
PROCEDURE
2
37
24
PLS-00487: Invalid reference to variable 'BATCHNO'
ERROR
487
SEND_TABLE_DATA
PROCEDURE
1
36
25
PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list
ERROR
497
Thanks In Advance
Regards
Pradeep.> 29 EXECUTE IMMEDIATE
> 30 'SELECT
> 31 A.BATCHNO,B.PCSBOX,B.AMOUNT
> 32 FROM
> 33 SCHEMA1.TABLEX A,SCHEMA2.TABLEY B
> 34 WHERE
> 35 A.BATCHID=B.BATCHNO AND B.PRODOAID='|| PRODOAID
> 36 BULK COLLECT INTO BATCHNO,PCSBOX,AMOUNT;
The variables BATCHNO, PCSBOX and AMOUNT are defined as scalar variables. Check there definition
> 9 BATCHNO VARCHAR2(32767);
> 10 PCSBOX NUMBER;
> 11 AMOUNT NUMBER;
You cannot use BULK COLLECT on scalar variables. The variables must be defined as a COLLECTION TYPE in order to perform bulk collect. -
No rows selected in table Transfer Rules
Hi All,
I have a Generic master datasource which is working fine. I am trying to append a field ZEINH to generic existing master datasource which uses user exit in R/3. It is working fine in R/3.
I have replicated R/3 datasource to BW and assign source system and datasource to infosource.I can see the ZEINH field in Transfer structure .I have tried to map ZEINH with infoobject of same domain and data element in the Infobject assign column of Transfer rule.
When It does not propose transfer rule for new field,however old fields are there. When I select new field and try to transfer to the comm.struc/Trns. rule column, it gives me error"No rows selected in table Transfer Rules"
Thanks in advance for your attentionHi,
In 'Transfer rules' tab, in the right frame, in the 'Infoobject' column, type in a name of infoobject to which you want to map incoming data from datasource.
Best regards,
Eugene -
How to capture indexes of multiple rows selected in Advance list
Hi,
- I have a prefilled advance list with multiselection enabled.
- There is a button, associated with an action,which is bind to a eventHandler,that event Handler has script operation which conains the ruby scrpt code.
- Now when i select multiple rows of that advance list and click on the action,I want to capture the indexes of all the selected rows.
I tried using following ruby code:
lead=$data.datalist.LeadSelectedIndex
But it returns index of only first row selected out of various rows selected.
So please anyone help me on that.
Regards ,
Saurabh Sharma.In FP2.6 there is no chance from SDK to have a mass enabled Action and bind to a mulli selection list as a BO Action in the UI Designer, as multiplicity will always be single and only lead selection would be selected.
this feature comes only in FP3.0.
So i am not sure what excatly Saurabh wants to do : maybe do some calculations based on multi seletions then i would do the following as also what Christian mentioned
multiSelect = ($data.DataList.GetSelectedRowsCount() > 1);
NoOfRowsSelected = $data.DataList.GetSelectedRowsCount();
SummationField = 0;
if ( multiSelect )
LeadSelection = $data.DataList.LeadSelectedIndex;
RequiredDataField = $data.DataList.Get(LeadSelection).AnydataField;
for i in 0..(NoOfRowsSelected - 1)
currentRow = LeadSelection + i;
RequiredDataField = $data.DataList.Get(currentRow).AnydataField;
// imagine this is just add values of the RequiredDataField
SummationField = SummationField + RequiredDataField
end
end
So i have not tried this directly - but i hope i make the idea clear.
Regards,
Nitesh Pai -
Multiple row selection for table element
Hi,
I have a requirement where I require to select multiple rows from a table element in a WD for abap application.
I have defined a node with cardinality and selection set to 1..n.
The contex node contains 4 fields : emp_name, pernr, manager and position.
The attributes of the table element for selectionmode is set to 'multi' and 'selectionchangebehaviour' is set to 'auto'.
I have defined an action on the 'onleadselection' event.
The code in this method also includes the statement 'lo_el_team_view->set_selected( EXPORTING flag = abap_true ).'
When I execute the application only 1 row is highlighted at any one time when I select it. You can select multiple rows by holding down the 'ctrl' key but I want to avoid having to do this. Is there anything I have missed out causing multiple row selections not to be all highlighted.
Thanks in advance for any assistance.Hi raj,
you can try the following code in the 'onleadselect' event of the table,
create one attribute ' Flag' of type WDY_BOOLEAN under the node which has been binded to the table.
DATA lo_nd_node_tab1 TYPE REF TO if_wd_context_node.
DATA lo_el_node_tab1 TYPE REF TO if_wd_context_element.
DATA lo_elements TYPE wdr_context_element_set.
DATA lo_ele_select_new TYPE REF TO if_wd_context_element.
DATA lv_deselect TYPE wdy_boolean.
DATA lv_flag TYPE wdy_boolean.
DATA lv_select TYPE wdy_boolean.
DATA lv_index TYPE i VALUE 0.
lo_nd_node_tab1 = wd_context->get_child_node( name = wd_this->wdctx_node_tab1 ).
get the current selected element
lo_ele_select_new = wdevent->get_context_element( name = 'NEW_ROW_ELEMENT' ).
CHECK lo_ele_select_new IS NOT INITIAL.
check whether it has been selected or not
CALL METHOD lo_ele_select_new->is_selected
RECEIVING
flag = lv_select.
lo_ele_select_new->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_deselect ).
check whether element has been previously selected or not,if not, set the flag to select it
IF lv_select IS NOT INITIAL AND lv_deselect IS INITIAL.
lo_ele_select_new->set_attribute( name = 'FLAG' value = 'X' ).
if selected currently and previously then set the flag as false,in order to delect it
ELSEIF lv_select IS NOT INITIAL AND lv_deselect IS NOT INITIAL..
lo_ele_select_new->set_attribute( name = 'FLAG' value = ' ' ).
ENDIF.
CALL METHOD lo_nd_node_tab1->get_elements
RECEIVING
set = lo_elements.
according to the falg, select and delect the elements
LOOP AT lo_elements INTO lo_el_node_tab1.
lo_el_node_tab1->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_flag ).
IF lv_flag = 'X'.
lo_el_node_tab1->set_selected( abap_true ).
lo_nd_node_tab1->set_lead_selection_index( lv_index ). * this statement deselects the lead selection index*
ELSE.
lo_el_node_tab1->set_selected( abap_false ).
lo_nd_node_tab1->set_lead_selection_index( lv_index ).
ENDIF.
ENDLOOP.
I hope this resolves your problem.
Thanks,
krishna -
Get index of row selectable in table in web dynpro abap
Hi all,
How i get the index for the row in a table which i selected .
Help me.
Points are Sured.
Sanket sethiHi ,
in the wdevent parameter of the action get the selected element
eg
context_element type ref to if_wd_context_element .
context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
then call the get_index method..
context_element->get_index( ).
Regards
Yash -
Row selection in Table should be the same, if we came back to the page?
Hello All,
I am using JDeveloper 11g.
I created one adf Table on jsp(empPage) page and selected one row(single selection) , than user can move to other page(to finish some other task), after coming back to the earlier page(empPage), row selection should be the same.
Can you please help me?
--Neelmani Jaiswal
Edited by: Neelmani Jaiswal on Jan 11, 2009 12:09 PM
Edited by: Neelmani Jaiswal on Jan 11, 2009 12:10 PMcheck this post here. I still have the same issue.
Code for getting the selected row in ADF Table 11G prod -
Call a method on row selection in table.
Here is my use case:
I have created my dc using a wsdl. I have a main page having a panel splitter which divides the page vertically. On the right panel I have created a dynamic region which displays result of task flows on clicking a task flow links present on the left panel. In one of the task flows i am displaying an adf table. My requirement is that on selecting a row in this table i want to call a method present in my dc which will take the value from selected row and should display the result depending on this input parameter received. I want its result to be displayed on the same page (below the table). How do i achieve this?
-PankajDrag the method you want to invoke from the data control palette onto the table's column and drop it as a link there.
This will create a component that when pressed will call the method.
If instead you want to enable this through a selection of a line in the table - then you can write a selectionListener on the table that will do the same thing that the link does.
(double click the link to generate its activation code in your backing bean). -
Multiple row select for table not working..
Hi Experts,
I have a table in ABAP Web Dynpro where I have enabled the multiple row select functionality. I can select all and deselect all. I can also select a block of adjacent rows of table by choosing first and last by pressing Shift key.
But I am not able to select multiple individual records for that table.
I tried the same thing in different system and it works fine there.
Please let me know if we are missing some standard plugin or we need to enable this in some settings.
System where the issue is:
SAP_APPL: release 600, level 18
SAP_BASIS: Release 700, level 22
System where it is working fine:
SAP_APPL: release 604, level 8
SAP_BASIS: release 701, level 8
Regards,
Anand KolteHi
Press CTRL key and Select records, you can select multiple records, continuously or randomly your desired selection.
Cheers,
Kris. -
Need to get the row selected in table control without ay action
Dear Team,
I have a requirement in which I need to pass the row selected of a table control to a variable.
Here I need to get the row selected with out any other action
then the action of selection of a row.
Is it possible to read table control values using FM DYNP_VALUES_READ.
thanks in advance,
regards,
SaiHI,
Sai Kumar Potluri
I tried in IDES it working.
Here is the code.
REPORT ZPRA_TC_D.
TABLES : SCARR.
CONTROLS TC TYPE TABLEVIEW USING SCREEN 1.
DATA : SELLINE TYPE I,
SELINDEX TYPE I.
DATA : ACT LIKE SCARR-CARRID,
ANT LIKE SCARR-CARRNAME.
DATA : ITAB LIKE SCARR OCCURS 0 WITH HEADER LINE.
CALL SCREEN 1.
*& Module STATUS_0001 OUTPUT
* text
MODULE STATUS_0001 OUTPUT.
SET PF-STATUS 'ME'.
* SET TITLEBAR 'xxx'.
SELECT * FROM SCARR INTO TABLE ITAB.
ENDMODULE. " STATUS_0001 OUTPUT
*& Module MOV OUTPUT
* text
MODULE MOV OUTPUT.
MOVE-CORRESPONDING ITAB TO SCARR.
ENDMODULE. " MOV OUTPUT
*& Module USER_COMMAND_0001 INPUT
* text
MODULE USER_COMMAND_0001 INPUT.
CASE SY-UCOMM.
WHEN 'BACK' OR 'UP' OR 'EXIT'.
LEAVE PROGRAM.
WHEN 'SEL'.
GET CURSOR FIELD SCARR-CARRID LINE SELLINE.
SELINDEX = TC-TOP_LINE + SELLINE - 1.
READ TABLE ITAB INDEX SELINDEX.
ACT = ITAB-CARRID.
ANT = ITAB-CARRNAME.
ENDCASE.
ENDMODULE. " USER_COMMAND_0001 INPUT
In Flow Logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
LOOP AT ITAB WITH CONTROL TC.
MODULE MOV.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT ITAB.
ENDLOOP.
MODULE USER_COMMAND_0001. -
How to handle multi row update in table?!
Hello,
I am searching for a solution to edit/update a lot of rows of a table at one time. The user has the ability to edit all cells of this table and then update this by pressing a submit button.
I have a managed bean with an collection of objects. Each object represents on row.
How is this handled in JSF? Is it only necessary to bind the datatable to the collection?
Thanks,
ThomasIs it only necessary to
bind the datatable to the collection?Yes.
Don't forget to put the collection in session scope. -
ABAP WD, Multiple Row selection in table control without using Crtl key
Hi all,
I am displaying the records using the table control, i have to select the multiple records in the list <b>without using Crtl key</b>.
How do i solve this?
ThanksHi,
you should set the table parameter selectionMode to multi or multinolead
than you can select multiple records,
these you can retrieve: lt_selected_elements = node->get_selected_elements( ).
also see this <a href="https://forums.sdn.sap.com/click.jspa?searchID=4209200&messageID=3544158">thread</a> for info
grtz,
Koen -
ABAP WD, Multiple Row selection in table control
Hi all,
I am populating and displaying the records using the table control, i have to select the multiple records in the list and want do some deletion,selection,so i could not select the more than one record.
How do i solve this?
Please give me your valuable suggestions.
ThanksHi ulli,
thanks for your quick reply,
now its working for me but i have to press the 'CTRL' key and select the row, for selecting the multiple rows.
one more thing i wanted some methods for "DELETION", "SELECTING ALL RECORDS","DESELECTING",in the displayed list.
plz suggest me..,
thanks and regards
kamal -
Multiple row selection in table control...
hi...
i can select one row from table control and display in a list..
the same thing i want to do for multiple lines...
thanks..use the table control wizard to create a table control on the screen...while going thru the steps, there will be a screen which asks you about the selection column (this is a single character field in your internal table). on this step there is a selection option for single/multiple selection of rows....
to access the selected records, use...
loop at itab where sel eq 'X'.
endloop.
where
<b>itab</b> is the underlying internal table for table control and <b>sel</b> is the name of the selection column
or if u already have a table control on screen...double click and open the properties window...there u can see radio buttons None, Single and Multiple for line selection. choose the multiple option.
rgds,
PJ
Message was edited by: Priyank Jain -
My Swing GUI appliaction has a large table in it, and I'm using a custom Table Cell Renderer. One of my columns uses a widget I wrote myself that is identical to the "star rating" widget you see in iTunes. (In fact, you can basically think of this app as being iTunes-like in terms of its UI.) It's working pretty well: when I see an item I want to rate, I can click on the widget in a particular row, and it shows the appropriate number of stars, etc.
But here's the problem: this doesn't work if the row has already been selected. I can only modify the star widget on rows that are unselected.
Does anyone have an idea of how I could correct this problem?
Thanks very much.Does anyone have an idea of how I could correct this problem?Given that we have very little information to go by, I'm guessing that you have a custom TableModel and you are not firing the TableCellUpdated() method when you change the data, so the table doesn't know it should repaint the cell.
Maybe you are looking for
-
When I download a file it is not in the download box whrn finished loading
When I download a new file (eg an update the file downloads (I see the bar and time left, but when it finishes downloading the box is blank. I also can't see previous files downloaded
-
Hi, I would like to create a multiline text field that the field starts on one pages but finishes on another? Here is an example of what I want. The text starts in the top of the box (1st box) and would continue in the bottom box (2nd box). I have Ad
-
How to see contents imported GPO ?
At this time ZCM-server: SLES10_x64 with ZCM10.3.1 and Standalone server WIN2003server with AD (This server only for creation GPO. To it nobody logs in ) In it the server has been created GPO. From the console of this server WIn2003 has launched IE7
-
Error InvalidNameException: Rename node in LDAP
import java.util.Hashtable; import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; * Insert the type's description here. * Creation date: (3/2/2001 9:28:09 AM) public class test1 { public static String INITCTX="com.sun.jn
-
Hello, I have a mid-2012 MacBook Air running Mavericks (10.9.2) that is no longer seeing any WiFi networks, when all other devices in my apartment (iPhones, iPads, an older MBP) are having no difficulty. The problem simply started yesterday morning