on 09-26-2016 12:35 PM
Hi
I am using Editable ALV in my application in webdynpro,date fields are editable .So I entered dates and I click on Save button.
I want to be date fields should come to non-editable.
code as below
* Declare ALV config table
DATA: alv_config_table TYPE REF TO cl_salv_wd_config_table.
DATA: wd_table_usage TYPE REF TO if_wd_component_usage.
* Create an instance of ALV component created ALV_COMP is usage name
wd_table_usage = wd_this->wd_cpuse_alv_task( ).
IF wd_table_usage->has_active_component( ) IS INITIAL.
wd_table_usage->create_component( ).
ENDIF.
*ALV Settings.
* Get ALV component
DATA: wd_table TYPE REF TO iwci_salv_wd_table.
wd_table = wd_this->wd_cpifc_alv_task( ).
alv_config_table = wd_table->get_model( ).
* Declare variable to store column details
DATA: column_settings TYPE REF TO if_salv_wd_column_settings,
column TYPE REF TO cl_salv_wd_column.
column_settings ?= alv_config_table.
DATA lr_input TYPE REF TO cl_salv_wd_uie_input_field.
CREATE OBJECT lr_input
EXPORTING
value_fieldname = 'PLANNEDSTARTDATE'.
column = column_settings->get_column( 'PLANNEDSTARTDATE' ).
column->set_cell_editor( value = lr_input ).
*
Hi Kiran
I am not sure on how the system would know that the user has finished editing ?
Generally I use a EDIT button to make the fields editable and a Save button which when clicked should make the fields read only
Is that an option for you ?
Regards
Vinita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
As shown in the figure.after the enter the date values in start date and end date and select the line in alv and then press save button.
so data saved in database table..here i want both dates fields should be non-editable.
hope this clears the requirement.
and also i want to know how to select all rows in alv at atime.
Then you can create an Read-only attribute in the structure where you keep the data value with the same name for example DATE_RO, bind it to the readonly control of the field:
lr_input->set_read_only_fieldname( 'DATE_RO' ).
And later when the value of DATE is not initial control the value of this field readonly field:
lr_element->set_attribute( EXPORTING name = 'DATE_RO'
value = lv_readonly ). " true/false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.