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,
Ajay
The 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
Similar Messages
-
How to select multiple records from a TREE in the table
HI,
I have a tree structure which is in the table.When I open the node of the tree,all the subnodes are coming as one-one records in the table.I want to slect multiple record from this table.I applied onLeadSelect for this table,I can select only 1 record from the table.
Can any one plz suggest me how to select multiple records from the table so that I can get all the data of those selected record.
Regards
-SandipRashmi/Kukku,
First of all, Thanks for your help!
Is there any other way in which we can access tables other than using BAPIs or RFCs?
In my case, there is a table structure which has to be updated with values after validating a key. i don't think there is any RFC available now. do i need to create bapi/rfc for that?
Krishna Murthy -
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. -
How to select multiple records in the ALV POP UP by using oops
Hi All,
We have a requirement of ALV POP UP by using the OOPS. How to select the multiple records in the POP UP and After selecting that i want do Inteactive ALV means again one more POP UP in ALV.
Thanks for help....
Regards,
BharaniHello Bharani
Displaying an ALV list in a popup is by no means different from a list displayed on a main screen. The only thing you need to consider is that you set the right screen level when creating the parent container for the ALV.
For more details refer to thread in CL_GUI_SPLITTER_CONTAINER ALV list is not show in called screen
" step 1:
CREATE OBJECT gr_spliter
EXPORTING
parent = cl_gui_container=>screen0 " For first popup use: =>screen1
rows = 1
columns = 2.
Regards
Uwe -
How to select multiple records in an ALV by REUSE_ALVGRID_DISPLAY
Dear all ,
I am displaying a report by REUSE_ALV_GRID_DISPLAY. I have used "box_fieldname" property to select a record in the alv . but i am not able to select more tha one record at a time . Can anyboby suggest me how will be i able to select more than one record at a time .
regards
amarhttps://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=47808545
-
How to select multiple lines in ALV report
hi gurus,
I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
Regards,
Satyajithi,
try like this
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
TYPES: BEGIN OF t_ekko,
sel, "stores which row user has selected
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
DATA : BEGIN OF det_tab OCCURS 0,
ebeln LIKE ekpo-ebeln,
END OF det_tab.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM build_layout.
gd_layout-box_fieldname = 'SEL'.
"set field name to store row selection
gd_layout-edit = 'X'. "makes whole ALV table editable
gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_STAT'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_ekko
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. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'EBELN'.
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'DET'. "button add by me
CLEAR det_tab.
REFRESH det_tab.
LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
MOVE-CORRESPONDING wa_ekko TO det_tab.
APPEND det_tab.
ENDLOOP.
PERFORM build_cat.
PERFORM dis_data.
ENDCASE.
ENDFORM. "user_command
*& Form set_stat
* text
* -->RT_EXTAB text
FORM set_stat USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
ENDFORM. "set_stat
*& Form build_cat
* text
FORM build_cat.
CLEAR fieldcatalog1.
REFRESH fieldcatalog1.
fieldcatalog1-fieldname = 'EBELN'.
fieldcatalog1-tabname = 'DET_TAB'.
fieldcatalog1-seltext_m = 'Order No.'.
fieldcatalog1-outputlen = 10.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
ENDFORM. "build_cat
*& Form dis_data
* text
FORM dis_data.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_DS'
it_fieldcat = fieldcatalog1[]
i_save = 'X'
TABLES
t_outtab = det_tab.
ENDFORM. "dis_data
here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
here u can select morethan one line using control(ctrl)
reward if usefull... -
How do I get Siri on with out pressing that button on my I phone 5s
How do I get Siri to talk with out pressing that home button
It does for everyone else. You have to bring the phone up to your face (like making a call), activating the proximity sensor, for Siri to start.
-
How to select multiple chek in checkbox in alv
how to select multiple chek in checkbox in alv
Hi,
Following report is the checkbox alv sample report.
REPORT YMS_CHECKBOXALV.
TYPE-POOLS: slis.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
DATA: s_layout TYPE slis_layout_alv.
DATA: BEGIN OF itab OCCURS 0,
icon TYPE icon-id,
vbeln TYPE vbeln,
kunnr TYPE kunnr,
erdat TYPE erdat,
box TYPE c,
END OF itab.
DATA: v_repid TYPE syrepid.
START-OF-SELECTION.
Get the data.
SELECT vbeln kunnr erdat UP TO 100 ROWS
FROM vbak
INTO CORRESPONDING FIELDS OF TABLE itab.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'No data found'.
LEAVE LIST-PROCESSING.
ENDIF.
Modify the record with red light.
itab-icon = '@0A@'.
MODIFY itab TRANSPORTING icon WHERE NOT vbeln IS initial.
v_repid = sy-repid.
Get the field catalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'ICON'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-seltext_l = 'Status'.
s_fieldcatalog-icon = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'VBELN'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'KUNNR'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'KUNNR'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'ERDAT'.
APPEND s_fieldcatalog TO t_fieldcatalog.
Set the layout.
s_layout-box_fieldname = 'BOX'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = s_layout
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = t_fieldcatalog[]
TABLES
t_outtab = itab.
FORM SET_PF_STATUS *
--> EXTAB *
FORM set_pf_status USING extab TYPE slis_t_extab.
SET PF-STATUS 'TEST2'.
ENDFORM.
FORM user_command *
--> UCOMM *
--> SELFIELD *
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
Check the ucomm.
IF ucomm = 'DETAIL'.
LOOP AT itab WHERE box = 'X'.
itab-icon = '@08@'.
MODIFY itab TRANSPORTING icon.
ENDLOOP.
ENDIF.
selfield-refresh = 'X'.
ENDFORM.
Thanks,
Sankar M -
How to read data after select multiple record by checkbox,
hi experts
i m using simple report with check box , and itab whcih contain records
how to read data after select multiple record by checkbox,
thanksHi Prashant,
Try using this logic.This Code displays the list with check boxes. When you check a checkbox and press a button say 'Select All' or 'De Select all' or 'Display'. It will read the data of those records.
DATA :
fs_flight TYPE type_s_flight,
fs_flight1 TYPE type_s_flight1.
* Internal tables to hold Flight Details *
DATA :
t_flight LIKE
STANDARD TABLE
OF fs_flight,
t_flight1 LIKE
STANDARD TABLE
OF fs_flight1.
SET PF-STATUS 'SELECT' .
PERFORM selection.
PERFORM displaybasic .
* AT USER COMMAND EVENT *
AT USER-COMMAND.
PERFORM selectall .
*& Form SELECTION
* Select query to reteive data from SPFLI table
* There are no interface parameters to be passed to this subroutine.
FORM selection .
SELECT carrid " Airline Code
connid " Flight Connection Number
FROM spfli
INTO TABLE t_flight.
DESCRIBE TABLE t_flight LINES w_lines .
ENDFORM. " SELECTION
*& Form DISPLAYBASIC
* Display the basic list with SPFLI data
* There are no interface parameters to be passed to this subroutine.
FORM displaybasic .
LOOP AT t_flight INTO fs_flight.
WRITE :
w_check AS CHECKBOX,
w_mark,
fs_flight-carrid UNDER text-001,
fs_flight-connid UNDER text-002.
ENDLOOP. " LOOP AT T_FLIGHT..
CLEAR fs_flight-carrid .
CLEAR fs_flight-connid.
ENDFORM. " DISPLAYBASIC
*& Form SELECTALL
* To check all the checkboxes with a 'selectall' push button
* There are no interface parameters to be passed to this subroutine.
FORM selectall .
CASE sy-ucomm.
WHEN 'SELECT_ALL'.
w_check = 'X'.
w_line = 4 .
DO w_lines TIMES.
READ LINE w_line .
MODIFY LINE w_line FIELD VALUE w_check .
ADD 1 TO w_line .
ENDDO. " DO W_LINES TIMES
CLEAR w_line.
WHEN 'DESELECTAL'.
w_check = space.
w_line = 4 .
DO w_lines TIMES.
READ LINE w_line FIELD VALUE w_mark .
IF w_mark = space .
MODIFY LINE w_line FIELD VALUE w_check .
ENDIF. " IF W_MARK = SPACE
ADD 1 TO w_line .
ENDDO. " DO W_LINES TIMES
WHEN 'DISPLAY'.
IF sy-lilli BETWEEN 4 AND w_lines .
DO w_lines TIMES.
READ LINE w_num FIELD VALUE w_check INTO w_check
fs_flight-carrid INTO fs_flight-carrid
fs_flight-connid INTO fs_flight-connid.
IF sy-subrc = 0.
IF w_check = 'X'
SELECT carrid
connid
fldate " Flight date
seatsmax " Maximum capacity in economy
seatsocc " Occupied seats in economy class
FROM sflight
INTO TABLE t_flight1
WHERE carrid = fs_flight-carrid
AND connid = fs_flight-connid.
LOOP AT t_flight1 INTO fs_flight1.
WRITE :
/ fs_flight-carrid UNDER text-001,
fs_flight-connid UNDER text-002,
fs_flight1-fldate UNDER text-007,
fs_flight1-seatsmax UNDER text-008,
fs_flight1-seatsocc UNDER text-009.
ENDLOOP.
ENDIF. " IF SY-SUBRC = 0
ENDIF. " IF W_CHECK = 'X'.
ADD 1 TO w_num.
ENDDO. " DO W_LINES TIMES
CLEAR w_check.
w_num = 0.
ELSE .
MESSAGE 'INVALID CURSOR POSITION ' TYPE 'E' .
ENDIF. " IF SY-LILLI BETWEEN..
ENDCASE. " CASE SY-UCOMM
ENDFORM. " SELECTALL
Much Regards,
Amuktha. -
How we can select two records in alv report
how we can select two records in alv report
Hello,
You can use the method <b>get_selected_rows</b>.
CALL METHOD gv_alv->get_selected_rows
IMPORTING
ET_INDEX_ROWS =
et_row_no = lt_selected_rows.
READ TABLE lt_selected_rows INTO ls_selected_row INDEX 1 .
The table <b>lt_selected_rows</b> will contain all the selected rows.
Regards,
Beejal
**reward if this helps -
How do you delete records from table with data in a select option
how do you delete records from table with relevant to data in a select option..how to write coding
Hi,
Try
if not s_select_option [ ] is initial.
delete * from table
where field in s_select_option.
endif.
commit work.
Be careful though. If select option is emty, you will delete the entire table.
Regards,
Arek -
How to select multiple lines in reports
Hi,
how to select multiple lines in a reports and process those selected lines to other activities like BDC.
Please paste sample report here. or any demo examples . (don't paste ALV report , paste only classical report)
suppose there are 10 records in output, i want to select 3 records and process other activities like bdc.
Point will awarded.Hi ,
the o/p in ur case will be a basic list output with a check box enabled in the left .
Now say there are 10 records in the list output and i have checked 3 of them where checkboxes are enabled .
And i press a button to submit this to the BDC .
Here u need to make use of
READ LINE statement to read the records from the list output and then pass them to the BDC .
The code would be something like this
DO .
Read line index <field> where checkbox <> ' '.
ENDO.
You can have a look at the F1 help on read line . This will mkae u clear .
Hope this gives u an idea.
Regards,
Vijay. -
How to send multiple records in file2file and file2db or all scenarios//
I'm able to send single record for file2file and file2db,
how to send multiple records in file2file and file2db or all scenarios//
what should add or make changes for dis.1 put Occurance 1 to Unbounded in data type of IR
2 In the test tag of message mappings in IR,select one node and use "duplicate subtree" in its context menu
After that,you can download the test data in XML format with the button "save document source"
for example:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:ZFileDemo xmlns:ns0="http://hand-china.com/mm/po_01">
- <Item>
<ItemNo>1</ItemNo>
<Matnr>2</Matnr>
<Text>3</Text>
</Item>
- <Item>
<ItemNo>4</ItemNo>
<Matnr>5</Matnr>
<Text>6</Text>
</Item>
</ns0:ZFileDemo> -
How to Save Multiple Records In Data Block
Hi All,
I Have Two Blocks --> Control Block,Database Block
Please Any Idea How to Save Multiple Records In Data Block when User changed Data in Control Block.
Thanks For Your Help
SaNow i have to use each record of control block(ctl_blk) as where condition in data base block(dat_blk)and display 10 records from database table.>
Do you want this coordination to be automatic/synchronized or only when the user clicks a button or something else to signal the coordination? Your answer here will dicate which trigger to put your code in.
As to the coordination part, as the user selects a record in the Control Block (CB), you will need to take the Key information and modify the Data Block's (DB) "DEFAULT_WHER E" block property. The logical place to put this code is the CB When-New-Record-Instance (WNRI) trigger. You code will look something like the following:
/* Sample WNRI trigger */
/* This sample assumes you do not have a default value in the BLOCK WHER E property */
DECLARE
v_tmp_dw VARCHAR2(250);
BEGIN
v_tmp_dw := ' DB_Key_Column1 = '||:CONTROL.Key_Column1||' AND DB_Key_Column2 = '||:CONTROL.Key_Column_2;
Set_Block_Property('DATA_BLOCK', DEFAULT_WHER E, v_tmp_df);
/* If you want auto coordination to occur, do the following */
Go_Block('DATA_BLOCK');
Execute_Query;
/* Now, return to the Control Block */
Go_Block('CONTROL_BLOCK');
END;
The Control block items are assigned with values in Form level (Key_exeqry).If your CD is populated from a single table, it would be better to create a Master - Detail relationship (as Abdetu) describes.
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
How to get multiple records using fn-bea:execute-sql()
Hi,
I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
Regards,
Nagaraju
Edited by: user10373980 on Sep 29, 2008 6:11 AMHi,
Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
For example:
fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
Id Name
01 XXX
02 YYY
03 ZZZ
I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
<student>
<Name>XXX</Name>
</student>
I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
Please suggest.
regards,
Venkat
Maybe you are looking for
-
Audiobook sync issue with 2 ipods on ONE account... how to???
Hi, I have 2 ipods connected to my mac which we only use one account. The problem I have just discovered is if we sync audiobooks to one ipod, start listening to it and then we sync that book on the other ipod the history of of where you were at in t
-
How can i take out the glitches
the video i recorded has glitches. how can i take out the glitches. or minimize them.
-
How to change line item numbers
HI when we are creating sales order, if we enter material number, line item number will be autmaticallly assigned(for eg 10,20,30 ....). if i want to change that number what i have to do(eg: to 1, 4, 5, .....). in standard SAP, the field is grayed ou
-
Is there a command line program that converts WAV to SWF?
Is there a command line program that converts WAV to SWF? thanks
-
How oui creates key in windows registry?
Hi all, I have a question about Oracle 11g Client(32bit) installation. My question is how oracle universal installer create key in windows registry (Windows Server 2008 R2)? Is that info written in some parameter files? How oui decide witch path to g