cancel
Showing results for 
Search instead for 
Did you mean: 

External mapping to interface controller of ALV?

Former Member
0 Kudos

Hi All,

i have created a context node in Component controller for the table VBAP by ADD attributes from structue...And i selected some fileds to the context....

and used a standard component of ALV (SALV_WD_ALV) ....and i mapped that context to interface controller of ALV...And tested my application...

But in my application it is displaying the all the fields of VBAP instead the fields which are in the context of Component Controller...

How should i resolve this...

Regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravi,

NODE PROPERTY:

Simply remove the VBAP in the DICTIONARY STRUCTURE in the node to which VBAP is defined.

Then only the requireed fields you have defined will be displayed in the layout.

As long this VBAP structure is there in DICTIONARY STRUCTURE all the fields willbe displayed.

Once you have added attributes to the node remove the reference of the dictionary structure in the node property.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

Thanks alot.....solved problem

Answers (1)

Answers (1)

saket_abhyankar
Active Participant
0 Kudos

Hi Ravi,

You can hide the unwanted columns i.e. display only required columns

Sometimes there is requirement where we want the data from perticular field (column) for processing but don't want to display in the ALV in that case use following code in WDDOINIT:

data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .

l_ref_interfacecontroller = wd_this->wd_cpifc_alv_table1( ). " Value from the prop tab of the view

data: l_value type ref to cl_salv_wd_config_table.

l_value = l_ref_interfacecontroller->get_model( ).

data:

lr_table_settings type ref to if_salv_wd_table_settings,

lr_column_settings type ref to if_salv_wd_column_settings,

lr_column type ref to cl_salv_wd_column,

lt_columns type salv_wd_t_column_ref,

ls_column type salv_wd_s_column_ref.

lr_column_settings ?= l_value.

lt_columns = lr_column_settings->get_columns( ).

loop at lt_columns into ls_column.

case ls_column-id.

when 'MANDT'. "This is the name of column to be hidden

ls_column-r_column->set_visible( cl_wd_uielement=>e_visible-none ).

endcase.

endloop.

Regards,

Saket.