How build fieldcatalog dynamically


Building fieldcat dynamically.

Class-Method:

 1

Parameters:

 2

 

Codes:

 

data lt_fieldcat type slis_t_fieldcat_alv.

data ls_fieldcat type slis_fieldcat_alv.

data ls_layout   type      slis_layout_alv.

data lo_aele  type ref to cl_abap_elemdescr.

data lo_asdes type ref to cl_abap_structdescr.

data ls_dfies type        dfies.

field-symbols <fs_comp>  

          like line of lo_asdes->components.

field-symbols <fs_field> type any.

* Creating Structure Obj.

lo_asdes ?= cl_abap_structdescr=>describe_by_data(

   p_data is_structure ).


Leave a comment

Your email address will not be published. Required fields are marked *