ALV Without Row Selection
Good Morning,
I've created a report using <b>REUSE_ALV_GRID_DISPLAY</b>.
I want to exclude de boxes for row selection in the left of the grid, how can i do that?
This should be basic...
Best Regards,
Pedro Gaspar
Hi Pedro,
try this:
DATA: EXCLUDING TYPE SLIS_T_EXTAB.
DATA: WA_EXCLUDING TYPE SLIS_EXTAB.
WA_EXCLUDING-FCODE = '&ETA'.
APPEND WA_EXCLUDING TO P_EXCLUDING.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = PROGNAME
I_CALLBACK_PF_STATUS_SET = 'MAIN'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_VARIANT = VARIANT
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
IT_EXCLUDING = EXCLUDING
IT_SORT = SORT
IT_FILTER = FILTER
I_SAVE = 'A'
IT_EVENTS = EVENTS
IT_EVENT_EXIT = EVENT_EXIT
IS_PRINT = PRINT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
Regards, Dieter
Similar Messages
-
Hi,
I have alv grid using cl_gui_alv_grid. I want to capture the row selection event and display the detail below the table.
how do I capture the row selection.? I want to display the details below as and when the row selection changed.
Regards
PanneerMore detail example, also works with multiple selections:
data go_alv type ref to cl_gui_alv_grid.
data go_handler type ref to lcl_event_receiver.
* CLASS lcl_event_receiver DEFINITION
class lcl_event_receiver definition.
public section.
methods delayed_change_select
for event delayed_changed_sel_callback of cl_gui_alv_grid.
endclass. "lcl_event_receiver DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
class lcl_event_receiver implementation.
method delayed_change_select.
message 'Selection changed' type 'S'.
endmethod. "delayed_change_selection
endclass. "lcl_event_receiver IMPLEMENTATION
*& Module STATUS_0100 OUTPUT
module status_0100 output.
data lt_fcat_lvc type lvc_t_fcat.
data lt_fcat_alv type slis_t_fieldcat_alv.
data ls_layo type lvc_s_layo.
set pf-status 'MAIN'.
if go_alv is initial.
ls_layo-sel_mode = 'A'.
* ls_layo-sel_mode = 'B'. "Also works
* ls_layo-sel_mode = 'C'. "Also works
* ls_layo-sel_mode = 'D'. "Also works
call method go_alv->set_table_for_first_display
exporting
is_layout = ls_layo
changing
it_fieldcatalog = lt_fcat_lvc
it_outtab = gt_data[].
create object go_handler.
set handler go_handler->delayed_change_select for go_alv.
call method go_alv->register_delayed_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_delayed_change_select.
endif.
endmodule. " STATUS_0100 OUTPUT -
Hai gurus,
In my ALV output I want to disable the left most button (Row selector) for some reasons Dynamically.
The user should not select the entire row for some condition.
loop at itab.
If itab-field1 eq 'AA'.
Disable row for selection.
endif.
endloop.
Thanks in advance .....Hi Shridhar,
I think it is difficult to have selection boxes on some condition.
We can have only one type of selection mode for alv.
Kindly refer following link for your solution
http://help.sap.com/saphelp_47x200/helpdata/en/ef/a2e9eff88311d2b48d006094192fe3/frameset.htm
I have tried it in many ways but not able to have its solution.
Kindly share it with all of us if you get the solution.
Hope it helps,
Pratik Vora
Edited by: Pratik Vora on Feb 23, 2009 11:23 AM -
ALV Grid row selection possible options
Hello Experts,
I have an ALV Grid output with rows color codes based on certain status for each rows.Now when the user selects one or more lines to do the next process, what happens now as sap standard is the selected lines becomes highlighted ( kind of yellowish) and the selection button gets pressed.
But what the user is requesting is ,lets say he selects one blue and another red line, then both becomes yellow (because of the SAP standard highlighting) ...he would like those line colors to be still red and blue and only the selection button pressed.
Is there a way to do that is ALV grid? I'm trying to convince him to look at the status colum if he gets confused with what colors he selected or I will have to use a checkbox field as the first column and and hide the ALV selection option.
But was curious to find if this is possible in ALV?Or any other suggestions to handle this requirement is welcome.
MatHi Mat,
I am curious if your user is so arogant when he buys a car too. Does he say to dealer "Sorry I don't want this gear lever to be placed here and here, I want it a litte bit higher. Can you please fix that?". This sounds like you are struggling with dumb user. I have never heard of someone complaining that the standard highlight is in wrong color. You already provided to him row colors, right? I think most of the users would be hugging you for such facilities.
I think in your case as the user is inalterable you should go for the checkboxes as you say. This way maybe you will somehow satisfy his needs (as the row colors will be kept even during selection). Personally I wouldn't bother such requirements. As long as the program reports correct data, he should not complain at all.
Good luck then
Marcin -
Can i raise any event on the ALV GRID row selection.
Hi All ,
Is there any way to trigger any event upon the selction of the ALV <b>GRID</b> rows?
Suppose i have 2 grid controls 1 for Header and the other for corresponding line items . I would have already the header data (differnt document headers) populated , upon selecting (i don't want any user click or button click) one of the header i want to do some changes to the corresponding line times for the header data selected...
Please give me some tips on how to go about on this .
Thanks,
ALFH<b>upon selecting ?</b>
how the user will select , since you dont want user click or button click?
one option is to have hotspot, but again user has to click .
Regards
Raja -
Alv colour row select first row
Hi. I hava an alv with colour in some rows. When i want to select another row distint the first, it always goes to de first row and it doesn't allow me select other row.
how can i solve this to select for example the third row.
thanks.Hi,
Are you programatically setting the selection of the ALV row anywhere in your program? This might happen if you set the lead selection of the node in the WDDOMODIFYVIEW method of your view. Can you please check that ? Also you can try changing the selection mode of your ALV:
lo_config_model_value = lo_interfacecontroller->get_model( ).
lo_config_model_value->IF_SALV_WD_TABLE_SETTINGS~SET_SELECTION_MODE(CL_WD_TABLE=>E_SELECTION_MODE-AUTO).
Best Rgds,
Viqar. -
Row Selection in ALV on Single click
Hi
Can we read the row in ALV on row selection ? i set gs_layout-sel_mode = 'D'.
My Scenario is as under
there is an ALV on the screen in which i have displayed the data . there is a push button on the screen. User will select the row and then click the push button. on click of that push button selected row should move to the work area.
I am using following method
CALL METHOD g_Grid->SET_TABLE_FOR_FIRST_DISPLAY
Regards
AmmadIf the method [g_grid->get_selected_rows|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b55312d30911d2b467006094192fe3/frameset.htm] returns no row, then try a [g_grid->get_current_cell|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b552fad30911d2b467006094192fe3/frameset.htm] (Don't forget the [cl_gui_cfw=>flush|http://help.sap.com/saphelp_erp2004/helpdata/en/06/3fa1879f2811d2bd68080009b4534c/frameset.htm] to synchronize the automation queue.)
Regards,
Raymond -
Select multple rows in ALV without pressing pressing CTRL key
Hi experts,
Is there any way that I can select multple rows in an ALV without pressing pressing CTRL key?
I am using set_table_for_first_display method for displaying the ALV.
I tried different options of sel_mode, but none of them works without the CTRL key.
Thanks,
Mohit.Hi,
You can add checkbox using ALV grid display.
Call your ALV grid as below. Pass 'wa_layout' with 'WA_LAYOUT-BOX_FIELDNAME' as your selection column name.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'F_GUI_STATUS'
I_CALLBACK_USER_COMMAND = 'F_USERCOMMAND'
I_GRID_TITLE = TEXT-026
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = I_FIELDCAT
TABLES
T_OUTTAB = I_OUTTAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
Check below link for more help.
[http://www.sapfans.com/forums/viewtopic.php?t=40968]
Thanks,
Archana -
ALV - problem to disable row selection (SET_ROW_SELECTABLE)
Hi,
I'm using an (non editable) ALV with a supply function to display details to each line.
I have to buttons "New" and "Modify" to insert a new line or to modify an existing row (in the details).
This works fine.
Now what I want to do is, if the user press one of the buttons "New" or "Modify", I want to disable the row selection of the ALV, so the user can't select another row during inserting or editing.
For this, I've implemented in the WDDOMODIFYVIEW of the view the coding to enable or disable the row selection
lo_value->if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_TRUE ).
* or
lo_value->if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_FALSE ).
In case of "New" this works fine. The row selection is disabled.
But not in case of "Modify".
There is a strange behaviour:
The row selection is not completely disabled. It looks like you can select rows, but if you select another row, it is automatically jumping to the first row and also the details is updated to the first row.
The different between "New" and "Modify" is, that in "New", I create a new element in the ALV.
Than it works correct. If I do the same in "Modify", I have the same correct behavior.
But of course, I don't want to insert a new row in my "modify" mode.
So maybe it has something todo with set lead selection?
Maybe I do something wrong or that is a problem in the abap release. But I can't find anything in OSS.
Thanks in advance!
AndreasHi,
I would like to propose another approach here,
I assume that ALV is in read only mode.
1. User select the row and press the "Modify" button. As soon as user press the modify button "disable" the Modify and New button.
2. Once the user is finish with the changes and press save. Enable the new and modify button.
3. Without saving if user select anyother row then raise the "Save" confirmation popup with Yes, NO and Cancel button.
4. If User press the New button then add new row and disable the "New" and "Modify button". Follow the Step 2 and 3 for this case also.
I hope this will give you some idea.
Thanks,
Rahul -
Cell(Row) Selection not display in OOPS ALV
Hi all,
I am not able to get the cell(row) selection in the oops ALV when i called it second time.
I am displaying some information using oops alv in 100 screen. After user action on 100 screen i am calling 200 screen with different information which is also display in oops alv. When i displaying information in second time the cell(row) selection is not getting displayed.
For both ALV the fieldcatelog is different.
Initially i tried using same container but i face same problem, so i am trying to call second alv in new screen.
But problem remain same.
Can anyone help me to solve this problem ?
Regards
Nileshhi,
can u send ur report so dat i can look furhter to it.and help u out -
Error:Cannot add row without complete selection of batch/serial numbers
Dim oPDN As SAPbobsCOM.Documents
oPDN = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
Dim serno As String = "SH-A1,SH-A2"
Dim sernoval As String() = serno.Split(",")
Dim mnfser As String = "SH-B1,SH-B2"
Dim mnfserval As String() = mnfser.Split(",")
For k = 0 To sernoval.Length - 1
oPDN.Lines.SerialNumbers.InternalSerialNumber = sernoval(k).Trim
oPDN.Lines.SerialNumbers.ManufacturerSerialNumber = mnfserval(k).Trim
oPDN.Lines.SerialNumbers.Quantity = linedetails(iRowNo).Quantity
oPDN.Lines.SerialNumbers.SetCurrentLine(k)
oPDN.Lines.SerialNumbers.Add()
Next
oPDN.CardCode = "C232323"
oPDN.Lines.ItemCode = "A00004"
'oGR.Lines.LineNum = 0
oPDN.Lines.BaseLine = 1
oPDN.Lines.BaseEntry = 202
'oGR.Lines.BaseRef = 203
oPDN.Lines.BaseType = 20
oPDN.Lines.Quantity = 1
oPDN.Lines.UnitPrice = 2
oPDN.Lines.WarehouseCode = '01'
oPDN.Lines.Add()
lRetCode = oPDN.AddHi Vasanth,
Invert the SetCurrentLine () and Add() at the end of the SSSerialNUmbers loop.
Regards,
Eric -
'Another user or another operation modified data, to continue open the window again ' Inventory Transaction Log' (OITL)(ODBC-2039) (Message 131-183). If I click again on add I get the following message : 'Cannot add row without complete selection of Batch / Serial Nos. [Message-29-77]
Path:
Inventory -> Item Management -> Batches -> Batch Management - Complete form.
Before this I use Return Components on Receipts from Production as I am mistakenly issued it more than what was needed.
Were anyone be able to explain why it worked for certain items and not for others? I have successfully done “return components with some batches"Hi Nagarajan,
I'm one of colleague of caterine, we only accessing the batch management-complete window, no other window is open, still the error occurs; see image below
Before that error occurs(in image); first error we encounter was batch number is already exist, then upon click add another person modified the window; but we tried to restore the db then try to add the batch number in different transaction like SI 1658(Goods Issue), and it is okay.. but on the SI 50003 which is Receipt from production we can't add it.
Hope you can help us.
Regards,
Lean -
How to make the first row selected before the display of ALV grid
Hello Experts,
I created a ALV grid using custom container in a screen . Now i want do the follwing:
1. i want that, the <b>first line must be selected before the display of ALV.</b>
2. I have selection buttons . But i dont want the multiselect button and the
standard toolbar in the ALV grid.
Could any one please help me regarding the above?
Thanks & Regards
Sudhansucan u pls explain in more details with an example?
I am telling u the scenario.
1. i have a screen(Modal dialog Box) containing ALV grid with selection buttons for each row (top part) and a subscreen(second part).
Now when i click on a selection button, it will display the corresponding values in the subscreen.
When this screen will display for the first time , then first row of the ALV grid should be selected and the corresponding values should be displayed in the subscreen.
i wrote the following code in the PAI. But when i select a record its not triggering the PAI.
DATA:
gi_index_rows TYPE lvc_t_row, " Internal table for indexes of selected rows
g_selected_row LIKE lvc_s_row, " Information about 1 row
l_lines TYPE i.
CLEAR g_wa_vdmeko.
*get selected row
CALL METHOD g_alv_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
DESCRIBE TABLE gi_index_rows LINES l_lines.
LOOP AT gi_index_rows INTO g_selected_row.
READ TABLE g_int_vdmeko INDEX g_selected_row-index INTO g_wa_vdmeko.
SELECT SINGLE *
FROM vdmepov
WHERE bukrs = g_wa_vdmeko-bukrs AND
styp = g_wa_vdmeko-styp AND
sbez = g_wa_vdmeko-sbez AND
svym = g_wa_vdmeko-svym AND
svnr = g_wa_vdmeko-svnr.
ENDLOOP.
I am displayinng the ALV using method "set_alv_for_first_display".
Please help if u have any idea..................
Thanks
Sudhansu -
ALV Grid multiple row selection, disabling some
Does anyone know if it is possible to have an ALV grid with multiple row selection allowed but for some rows the row selection is disabled?
Kind regards,
John.Hi John,
You can add a check box and select multiple rows. I am using the same technique. I have used OO.
a) Use Even handler "Double Click"
b)Using "SELECT_ALL_ENTRIES CHANGING PT_OUTTAB TYPE STANDARD TABLE" and I am sorting based Check box selection.
Need more help please let me know. I will send you the code.
Lanka
Message was edited by: Lanka Murthy -
Using row selection in ALV using class cl_salv
Hi,
how to use row selection by using cl_salv classes...
I need to display scarr table in the basic list in ALV wthout using screens and function modules...
On multiple selection of carrid from ALV, need to display flight details from sflight.
Also how to get the selection buttons for corresponding rows.
NOTE : Using class cl_salv*
Thanks,
SiddarthYou may need to look into Rich's example code by the following thread
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01
a®
Maybe you are looking for
-
Disable pushbuttons from Attachment list for Service Object
Hi, I want to disable push buttons for delete and edit from the toolbar of Attachment list from service objects. how can this be achieved ? thanks in advance. Best Regards, Vinayaka
-
HT1551 Hi, i have an Apple TV and i need to add storage to it,is that possible?
i have a task of connecting an external storage accesible through apple tv.please suggest me the best solution on it.
-
Is there is any BAPI/FM/LSMW for BOMBOS Interface?
I have a requirement to write a custom program to transfer BOM to BOS. This we can do through CG37, But I want to execute CG37 functionality through custom program. Could you please let me know if any one knows BAPI/FM/LSMW for this? Thanks in advanc
-
ICloud does not accept 120MB of pages file to be uploaded using my MAC
I wrote a book with sone pictures having a size of 120MB. When I tried to upload it to icloud after a certain time icloud stops the uploading process. I tested small size pages document . Uploadig process worked fine. I have 1.6GB free space however
-
Per Web Application singleton pattern
Hello I have a application (ear) file that look something like this: App.ear -- Web_1.war ----- WEB-INF/lib/helper.jar -- Web_2.war ----- WEB-INF/lib/helper.jar -- Web_3.war ----- WEB-INF/lib/helper.jar inside helper.jar there is a singleton class.,