on 03-21-2009 4:54 AM
Hi Experts,
I am enhancing a standard e-recruiting WD ABAP component.
It produces a search result as ALV.
I am not able to select any row in ALV by clicking it like we normally do in ALV.
I wrote below code to allow selection:
lo_value->if_wd_salv_table_settings~set_selection_mode( cl_wd_table=>e_selection_mode-single).
.
Even after this I am not able to select any row by clicking it.
Need help to solve this.
Regards,
Sumit Oberoi
Hi Sumit,
You may try to do this
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
lo_alv = lo_interfacecontroller->get_model( ).
*** No row is selectable
lo_alv->if_salv_wd_table_settings~set_row_selectable(
value = abap_true ).
Regards
Gopi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gopi,
I have ried everything.
This all is fine.
I have solved it.
The reason is :
The data is getting binded to the ALV in WDDOMODIFY everytime.
This was not showing the row as selected.
I put the binding code in below if condition.
st_time = 'x'.
Endif.
Everything is fine.
Thanks for help everyone!
Regards,
Sumit Oberoi
to confirm this I tried doing the same in
Hi ,
Please check the cardintality of the node property for selection 1:1 or 1:n or 0:N to which the ALV DATA is bound.
Check wether the lead selection is set to true.
This is for the multiple selection of rows without the leadselect being set.
CALL METHOD lv_model->if_salv_wd_table_settings~set_selection_mode
EXPORTING
value = cl_wd_table=>e_selection_mode-multi_no_lead.
for single selection check out with this if requried
cl_wd_table=>e_selection_mode-single_no_lead.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit,
Try to do the same with the E_SELECTION_MODE as Auto.
Single means the lead selection is set and can be viewed as a highlighted one.
Single NoLead means the lead selection is set but cannot be seen as higlighted one when run the application.
If that doesnt work fine
Please check out the selection behaviour E_SELECTION_CHANGE_BEHAVIOUR what it is set to
(Auto,Manual, IfNo loss).
Check out where you have set this selection Mode. Are you modifying the same in any event.
One more thing, If you are using the latest version based on the selection mode you have set for ALV you can see the SELECTALL/DELESECT SELECTION icon. You can also check that way.
Regards,
Lekha.
Hi Lekha,
Thanks for your constant support!
I checked there is no icon on the top left corner (which i am seeing in other ALVs)
I wrote a handler for ON_LEAD_SELECT event.
Following is the code:
wd_this->zlv_index = r_param->index.
lo_nd_rcf_assignments->set_selected( index = wd_this->zlv_index ).
It is not showing any effect on the screen,
Regards,
Sumit Oberoi
Hi Sumit,
If there is no such icon visible then it means that there is no Selection set for your ALV.
Moreover setting of selection mode is usually done in any Inbound plug/WDDOINIT/WDDOMODIFYVIEW
as per the requirement.
ON_LEAD_SELECT will trigger only when there is already a lead selection set for that ALV.
Try to set the selection mode in WDDODINT of that view. Then use the ON_LEAD_SELECT event to get the details of the selected index one.
As per your requirement, You are setting index in this event ON_LEAD_SELECT .
Regards,
Lekha.
Hi lekha,
I creatred the alv table and displed the data from the sflight.
how to edit the each and every cell,i mean how to put the cell to property inputfield in the ALV(salv_wd_table).
in this table i have to add extra row and fill the details in that row and save it.this is my requirement.
How to edit the fileds in ALV table.
thakns&Regards
Rams
Hi,
To have the inputfields for the ALV.
Get the column references of the ALV table and for each column rference create a inputfield object
type CL_SALV_WD_UIE_INPUT_FIELD.
lo_value is model object.
CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
RECEIVING
value = wd_this->lit_columns.
LOOP AT wd_this->lit_columns INTO wd_this->lis_columns.
lv_id = wd_this->lis_columns-id.
wd_this->gref_column = wd_this->lis_columns-r_column.
case lv_id.
when ' colname'.
CREATE OBJECT lr_input
EXPORTING
value_fieldname = lv_id.
CALL METHOD wd_this->gref_column->set_cell_editor
EXPORTING
value = lr_input.
when ' colname'.
CREATE OBJECT lr_input
EXPORTING
value_fieldname = lv_id.
CALL METHOD wd_this->gref_column->set_cell_editor
EXPORTING
value = lr_input.
endcase.
endloop.
Or you can take a attribute READ_ONLY for the node to which ALV table is bound.
Set the readonly property to abap_false (for input field) by looping through the table.
Get the column references and get the textview reference for each column and use the set_read_only
method by passing the attribute name.
This way the textview will now become the inputfield when the read_only property is set to abap_false.
Regards,
Lekha.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.