on 09-25-2008 6:38 AM
hi ,
i have created ztable and sucessfully able to display through webdynpro but my requirement is that the user should be able to select any of the record n that should be editable and after that the editable data should be saved again to data database .
i have also alv components in methods of a view
Create component usage for alv component
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ). >>>>>>errror
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
Get config model
*
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).>>>>>error
data: l_value type ref to cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model( ).
set visible row count
l_value->if_salv_wd_table_settings~set_visible_row_count( '5' ).
Sort rows by seatsocc descending
*
data: lr_field type ref to cl_salv_wd_field.
*
*
*
lr_field =
*
l_value->if_salv_wd_field_settings~get_field( 'SEATSOCC' ).
*
lr_field->if_salv_wd_sort~create_sort_rule( sort_order =
*
if_salv_wd_c_sort=>sort_order_descending ).
*
Display icon in column seatsocc
data: lr_column type ref to cl_salv_wd_column,
lr_image type ref to cl_salv_wd_uie_image,
lv_icon type string. "#EC NEEDED
*
lr_column = l_value->if_salv_wd_column_settings~get_column(
'SEATSOCC'
).
create object lr_image.
lr_image->set_source_fieldname( 'STATUS' ).
lr_column->set_cell_editor( lr_image ). "Display traffic
*light images in column 'SEATSOCCC'
delete column STATUS
l_value->if_salv_wd_column_settings~delete_column( 'STATUS' ).
set cell editor for input fields (~make colum PRICE editable)
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_settings ?= l_value.
lr_column = lr_column_settings->get_column( 'MATERIAL' ).
CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'MATERIAL'.
lr_column->set_cell_editor( lr_input_field ).
data: lr_table_settings type ref to if_salv_wd_table_settings.
lr_table_settings ?= l_value.
lr_table_settings->set_read_only( abap_false ).
here in the code >>>error i have marked it is saying that the method wd_cpuse_alv is unknown even with the method wd_cpifc_alv, firstly iam uable to edit the fields , ater that i can go futher , plz give me the step by step solution as iam new to it
Hi shaik,
I think the error is becoz u didn't use that alv component usage in the view level.
Go to the properties of the view and give the component use name in your case it is ALV, along with the component name SALV_WD_TABLE and the controller should be from the interface controller.
Regards...
Arun.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.