cancel
Showing results for 
Search instead for 
Did you mean: 

ALV editable

Former Member
0 Kudos

i type the following in my method.

DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,

lr_column TYPE REF TO cl_salv_wd_column,

lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.

lr_column_settings ?= l_value.

lr_column = lr_column_settings->get_column( 'ZZSAFRA' ).

here i get an error for l_value not being declared.

can someone tell me the concept behind this. All tutorials mention this L_VALUE but i m not clear on how to declare it and subsequently use it.

I am new to webdynpro so all help is appreciated.

regards,

Priyank

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Basically the ALV component has a special MODEL class that supports the configuration of the tool.

You call the ALV component interface to get a handle to this beast.

Sometime called model.

With this handle you get handle to more manageable chunks.

Eg model give me handle to columns.

see sample below

cheers

Phil.



 DATA: LR_TABLE type ref to CL_SALV_WD_CONFIG_TABLE  .
* check if ALV component usage is allready instantiated
  DATA: lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage.

  lr_salv_wd_table_usage = wd_this->wd_cpuse_alv_child( ).
  IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
    lr_salv_wd_table_usage->create_component( ).
  ENDIF.


* get reference to ALV component interface
  DATA: lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
  lr_salv_wd_table = wd_this->wd_cpifc_alv_child( ).


******************* GET MODEL ********************************************
* get ConfigurationModel from ALV Component: This reference is used to set ALV properties
  lr_table = lr_salv_wd_table->get_model( ).



********************* COLUMN SETTINGS *****************************************
* init ColumnSettings
  DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
  lr_column_settings ?= LR_TABLE.

* get table of column settings - each line one column
  DATA: lt_columns TYPE salv_wd_t_column_ref.
  lt_columns = lr_column_settings->get_columns( ).

Former Member
0 Kudos

it now says wd_cpifc_alv_child is unknown !!!!!

????????????????

regards,

Priyank

Former Member
0 Kudos

Hi Priyank.

It says that cause you named the component usage in a different way.

try wd_cpifc_ + name of usage (check properties tab of view controller to find name).

Cheers,

Sascha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Priyank,

I guess this query of yours has been covered in one of my posts in your thread "ALV webdynpro".

If your issue gets resolved kindly close this thread.

Regards,

Anoop