on 02-04-2010 3:59 PM
Hi everyone,
I have developed a webdynpro application and I have declared component usage for SALV_WD_TABLE.
The data gets displayed in the ALV, but always the first row is selected.
When I try to select another row,I am not able to select.
Could anyone please suggest what might be the problem ?
Thanks in advance.
Regards,
Kumudha.
Hi Kumudha,
After going through all replies, I think ur looking for a Application Just similar to
Web Dynpro Component : WDT_ALV
Description : Sample solution for tutorial ALV in Web Dynpro A
Web Dynpro Component : WDR_TEST_DYN_ALV_USAGE
Description : Web Dynpro Application wdr_test_dyn_alv_usage / Component WDR_TEST_DYN ALVUSAGE
Here U can check, for selection of rows in ALV.
Note: To see this in your system please do activate these services
sap/bc/webdynpro/sap/wdt_alv and sap/bc/webdynpro/sap/wdr_test_dyn_alv_usage in T-code SICF
if still ur not getting the requested result then, it is due to Patch Update in your SAP S/m.
Regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kumudha,
Just check the selection property of the node (which you have binded to the data node of the ALV component) to 0:1 or 0:n.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First row may be selected because you must have set Initialize Lead Selection to True in your context node bound to ALV.
Other is you have to set the Row selectable property of ALV to true using the below code
SET row selectable as true
CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_TABLE_SETTINGS~SET_ROW_SELECTABLE
EXPORTING
VALUE = ABAP_TRUE.
where LR_FUNCTION_SETTINGS is TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
Hope you got the idea.
Regards
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As said above cardinality should be 0..n as your alv can have 0 or N rows.
Selection can be 0..1 or 0..N based on your scenario.
Can you paste the piece of code you have written, so that we can try to figure out if something is wrong.
Ideally, with above mentioned steps it should work.
Regards
Manas Dua
Hi Manas,
Thanks for the inputs.
I am placing the code below for your reference.
I try to change the below as Display Text as Code...But it is not happening Plz check
-
method wddoinit.
if wd_this->ls_setup is initial.
select single * from yyua_c_setup into wd_this->ls_setup
where system_id = sy-sysid.
endif.
"adjustments for ALV
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
data: l_value type ref to cl_salv_wd_config_table,
lr_header_t type ref to cl_salv_wd_header,
lv_text type string.
l_value = l_ref_interfacecontroller->get_model( ).
data: lr_column_settings type ref to if_salv_wd_column_settings,
lr_input_field type ref to cl_salv_wd_uie_input_field,
lr_column type ref to cl_salv_wd_column.
Set column title and position
lr_column = l_value->if_salv_wd_column_settings~get_column( 'CSINSTA' ).
lr_column->set_position( 1 ).
lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/REQUEST_NUMBER' ).
lr_column->r_header->set_text( 'Installation' ).
lr_column->r_header->set_ddic_binding_field( '00' ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'ERFUNAME' ).
|
|
lr_column->set_position( 18 ).
lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/ACTIVITY_DATE' ).
lr_column->r_header->set_text( 'Job profile ext' ).
lr_column->r_header->set_ddic_binding_field( '00' ).
Hide columns
lr_column = l_value->if_salv_wd_column_settings~get_column( 'ERFTSTMP' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'AETSTMP' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'STATUS' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'PRIO' ).
lr_column->set_visible( 0 ).
lr_column = l_value->if_salv_wd_column_settings~get_column( 'ISSUE' ).
lr_column->set_visible( 0 ).
*
data: lr_functions type ref to if_salv_wd_function_settings,
lr_function type ref to cl_salv_wd_function,
lr_button_t type ref to cl_salv_wd_fe_button.
Add self-defined functions in toolbar
lr_functions ?= l_value.
lr_function = lr_functions->create_function( 'SELECT' ).
create object lr_button_t.
lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/VIEW' ).
lr_button_t->set_text( 'Select' ).
lr_function->set_editor( lr_button_t ).
data : LR_FUNCTION_SETTINGS TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
create object LR_FUNCTION_SETTINGS.
SET row selectable as true
CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_TABLE_SETTINGS~SET_ROW_SELECTABLE
EXPORTING
VALUE = ABAP_TRUE.
endmethod
-
Regards,
Kumudha.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.