Multiple selection in alv
how to select multiple values in the generated output list for futher selection criteria in alv's without using oop's concept
basically using " reuse_alv_grid_display" function module
Hi
First, are you using the function module 'REUSE_ALV_GRID_DISPLAY'.
If so, MAYBE u can try this.
1. In the internal table for displaying in ALV, u can add a field
say 'SELK'.
2. In the ST_LAYOUT, you assign the name of this field to the field
"BOX_FIELDNAME" in ST_LAYOUT structure.
FORM layout_build USING p_st_layout TYPE slis_layout_alv.
p_st_layout-box_fieldname = 'SELK'. " Checkbox
ENDFORM. " LAYOUT_BUILD
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = st_layout
IMPORTING
E_EXIT_CAUSED_BY_CALLER* ES_EXIT_CAUSED_BY_USER TABLES
t_outtab = itab.
For further reference
http://www.sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm
Re: How to select multiple rows in OO ALV list....?
Regards
Pavan
Similar Messages
-
How to avoid multiple selection in ALV tree control?
Hi,
Experts,
I want to avoid multiple selections on Alv tree control after pressing control keyboard button(Ctrl). Even by pressing Ctrl keyword button i want to select only one row of a Alv tree control.i have used cl_salv_tree class for it is there any method to achieve this please pass some code/idea on it.
Thanks in advance,
Shabeer ahmed.I haven't tried it before but it should help.
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01] -
how to do multiple rows selection in alv's....
do you use the function or the alv grid control (i.e. the classes)?
bye
enzo -
Multiple Selection in ALV grid
HI All,
I am displaying output using ALV grid method. On screen i am selecting multiple rows & based on selection i want process further. How can i determine whcih rows user has selected ?
Regards,
RahulHi,
In IT_FIELDCAT you can pass one field with attributes of check box.
for example.
Declare:
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_LN LIKE LINE OF GT_FIELDCAT.
Pass the below values.
FIELDCAT_LN-FIELDNAME = 'CHECK'.
FIELDCAT_LN-TABNAME = 'ITAB1'.
FIELDCAT_LN-KEY = ' '. "SUBTOTAL KEY
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'Check Box'.
FIELDCAT_LN-CHECK-BOX = 'X'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
<b>rEWARD IF USEFULL</b> -
Get Selections From ALV on Multiple Selection Mode
Hi,
How can i get values of selected rows from ALV that has selection '0..n' (multiple selection) ?
Can somebody help me pls?
Thanks.Hi Nurullah,
Steps to make multiple rows selectable in ALV:
1) Create the selection property of the node that you are binding to the DATA node as o..n
2) Un-check the, "Initialization Lead Selection" checkbox for the node which you are using to bind to the DATA node
3) In the WDDOINIT method specify the ALV's selection mode as MULTI_NO_LEAD. It is important that you set the selection mode to MULTI_NO_LEAD or else in the end you would be capturing 1 row lesser than the total number of rows the user has selected. This is because 1 of the rows would have the LeadSelection property & our logic wouldnt be reading the data for that row. Check the example code fragment as shown below:
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model( ).
CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
EXPORTING
value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.
Steps to get the multiple rows selected by the user
In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. So as you can see its no different from how you would get the multiple rows selected by the user in a table ui element. First get the reference of the node which you have used to bind to the ALV & then call this method on it. Check the example code fragment below:
METHOD get_selected_rows .
DATA: temp TYPE string.
DATA: lr_node TYPE REF TO if_wd_context_node,
wa_temp TYPE REF TO if_wd_context_element,
ls_node1 TYPE wd_this->element_node_flighttab,
lt_node1 TYPE wd_this->elements_node_flighttab.
lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
" This would now contain the references of all the selected rows
lt_temp = lr_node->get_selected_elements( ).
LOOP AT lt_temp INTO wa_temp.
" Use the references to get the exact row data
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
ENDMETHOD.
Hope this helps resolve your problem.
Regards,
Uday -
How to select multiple row in ALV report
Hi friends,
1. How to select multiple row in ALV report
( How to set tab in ALV report and want to select multiple line.)
Thanking you.
SubashHi Sahoo,
If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
in layout structure you will find field SEL_MODE
pass :
LS_LAYOUT-SEL_MODE = 'A'.
In PAI.
CALL METHOD GRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = T_ROWS
ET_ROW_NO = T_ROWID.
Hope these will solve your problem.
Regards,
Kumar M. -
Hi,
in sapgui java 7.10 (on mac osx 10.5.1) I cannot select multiple columns in ALV reports.
I can do it only in some transactions (like SE16). But on all our custom reports (REUSE_ALV_GRID_DISPLAY) in does not work.
Any hint?
Many thanks,
LorenzoHi Lorenzo,
did you double check if selecting multiple columns works with SAP GUI for Windows in the same report?
If yes, I suggest to file a bug report so we can do a remote logon to run your custom report.
If not it might be because of REUSE_ALV_GRID_DISPLAY itself or your parameters calling REUSE_ALV_GRID_DISPLAY.
Best regards
Rolf-Martin -
How to disable multiple select option in OO ALV.?
I want to display an ALV with the multiple select button disabled.I want the "select" button at the start of each row but the "select all/deselect all" button at the right hand top corner of the display be
disabled.
Please help me out.Hi
You can add a new column to your internal table for the selection field.
After registering the required events, for eg:
METHOD alv_set_events.
DATA: lr_events TYPE REF TO cl_salv_events_table.
lr_events = mcn_alv->get_event( ).
*- Register the event Double click
SET HANDLER me->mt_on_double_click FOR lr_events.
*- Register the event User command
SET HANDLER me->mt_on_user_command FOR lr_events.
ENDMETHOD.
you can process the selected records and mark them as "Processed" by setting a color to the record.
DATA: BEGIN OF lw_farb , " Farbstruktur für ALV
farb1(1) VALUE 'C',
farb2(1),
farb3(1) VALUE '0'.
DATA: END OF lw_farb.
DATA: lf_col_bearbeiten TYPE i VALUE 5.
lw_farb-farb2 = lf_col.
ef_col = lw_farb.
Regards
Raj -
How to select multiple records in ALV with out pressing ctrl
Hi Experts,
Is there a way to select multiple records in ALV with out pressing ctrl button on the key board?
Selection and deselection should allow multiple records.
any clue is highly appreciated.
regards,
AjayThe keyboard always plays a role, although with the Shift key you can select blocks of records.
○ CTRLclick, CTRLspacebar
Toggles a selection.
○ SHIFTclick, CTRLshift
Selects the area from the lead selection to the row selected. If no lead selection is set, the selection starts from the first row. In the multiNoLead mode, the selection starts from the row last selected -
Multiple selection in the ALV is not possible after system upgrade
Hi Colleague,
I had been using an ALV, which was performing as desired before, but recently we had a system upgrade to NW7.0 and after that in this ALV multiple selection of records/rows is not allowed.
The colleagues who upgraded the system suggested that this may be because this ALV is instantiated at many places. I would request you to kindly provide a solution for the same ASAP, as I am not able to proceede ahead.
Warm regards,
RoopeshHi all,
Thanks for your replies, I had figured out the actual problem. The reason was, the referance of the selected rows was lost as I was doing bind elements to the context after moving to wddomodify.
So I figured out an alternative solution to avoid binding on selection of records.
Best regards,
Roopesh
Edited by: Roopesh Dolle on Apr 14, 2011 7:04 AM
Edited by: Roopesh Dolle on Apr 14, 2011 7:05 AM -
How to create Multiple Selection Screen in ALV
Hi,
Can anybody tell me how to create the Multiple Selection screen in ALV reports.
Plse give me code sample if possible.
Thanks in advance
KPHi Rich,
thanks for the reply.
I am creating a report. in that for one field, i need to create a multiple selection screen. i mean in the output screen , i need to get the multiple selection screen for that field. in that i should be able to select multiple values, or single values or range of values.
eg: if i take the field kunnr, i should be able to select the multiple kunnar values in the output screen.
Hope my problem is understood.
Thanks
KP -
CAN ANYONE PLZ TEMME HOW TO SELECT MULTIPLE RECORDS IN ALV AND EDIT THEM...........................
EG....SELECT MULTIPLE VALUES AND CHANGE D ACTIVE INDICATOR.........
THANX IN ADVANCE...........Hi,
Reprots
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV? http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV? http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV? http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Check this for basic concepts of OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
Tabstrip
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
Editable ALV
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
Tree
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
General Tutorial for OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
http://www.sap-img.com/abap/what-is-alv-programming.htm
http://www.sap-img.com/abap-function.htm
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
http://www.sap-img.com/abap-function.htm -
Multiple Selection on Matchcode in ALV Grid
I need to implement a Matchcode with multiple selection on a Field in an ALV Grid. On F4 in this specific Field the specific matchcode muss be enable with multiple selection. And after multiple selection by the user, the result muss be concatenate and insert to this field.
Any suggestions or code?
Thanks and Best Regards
FranckCheck the program: BCALV_TEST_GRID_F4_HELP.
IN the code, search foor the fm: F4IF_FIELD_VALUE_REQUEST.
You should pass the parameter MULTIPLE_CHOICE = 'X' for multiple choice in the F4 pop up.
Once you get the returned table, you can concatenate the result and put it it the target field.
Regards,
Ravi -
hi,
my report is used to tigger a bdc .now in my alv report i have to select multiple clomuns but without using 'control key' in the keyborad.can anybody give me the coding for this requirement......There is an option you should activate so you can make multiple selection. Check the example programs in SAP.
edit:
Just noticed: you're talking about columns and not rows.
Edited by: Maen Anachronos on Oct 6, 2008 1:37 PM -
Multiple Rows and Columns selection on ALV
Hi all,
What is the best solution to allow the multiple selection or combination of selection (rows and columns) on an ALV ?
I would like to be able to select some rows and some columns and to get the result cells in order to update them.
Thanks in advance for your help.
DavidThanks Srinivas and Seela,
I forgot to precise that my ALV is dynamic, I used the method 'add_new_child_node'.
I tried the different possibilties with method attributes but I don't find the good attributes combination to allow columns selection.
I add also that I have to be able to select several no adjacent columns.
What do you think about this workaround :
Is it possible to add a line on my ALV with checkbox between the header line (with column title) and data line.
I will search using the method add_cell_variant but I don't know if it's possible with dynamic ALV.
Thanks.
David
Maybe you are looking for
-
How do I get Messages to sync with iMessage on my iPhone?
I have read all of the reviews and seen all of the intro videos for Mountain Lion and where they say that Messages from my MBP (using Mountain Lion) will sync seemlessly with the iMessages on my iPhone. I have yet to be able to figure out how to mak
-
How to detect a selected row in ALV GRID
Hi, Can anyone tell me how to detect and catch an event when a row is selected in an ALV GRID? I would like to catch such event when the end user presses Ctrl + Shif + Space bar. Thank you and best regards. Hassane.
-
XSL Database Functions throwing "ORA-01000: maximum open cursors exceeded"
In my BPEL process, I have a large dataset requiring enrichment of the data by looking up values in a database. I'm doing this in an XSL transformation using either; orcl:lookup-table() or orcl:query-database() functions. This works ok for a number o
-
Damage Macbook pro by turning it off?
Hi I just recently went over to mac, and i am pretty exited about it, beats the **** our of the crap i used before.. i got a question though, people seem to be all hypen about the sleep function on the mac, i am personally used to always turning it o
-
Hello, I have written a java program in JDK 1.4 ( Which I have compiled in J++). I am dont know how to connect oracle ( 9i / 10g) as Backend to my java program. Please send the code / instructions to connect my backend. my program includes oracle tab