cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP dump ASSIGN_TYPE_CONFLICT using dynamic table

calvinkarlo
Explorer
0 Kudos

Hi 

ABAP dump ASSIGN_TYPE_CONFLICT using dynamic table on an alv when clicking buttons how to fix this ?

calvinkarlo_0-1706707987077.pngcalvinkarlo_1-1706708018865.pngcalvinkarlo_2-1706708035065.png

here's my code

 

** Dynamic Table Declarations
DATA :
gt_dyn_table     TYPE REF TO data,
 gw_dyn_line      TYPE REF TO data,
gw_dyn_line1     TYPE REF TO data,

FIELD-SYMBOLS: <gfs_line>,<gfs_line1>,
<gfs_dyn_table> TYPE STANDARD TABLE ,
<fs1>,<fs_color>.

* RTTS Declaratoins.
DATA :   gr_struct_typ   TYPE REF TO  cl_abap_datadescr,
         gr_dyntable_typ TYPE REF TO  cl_abap_tabledescr,
         ls_component    TYPE         cl_abap_structdescr=>component,
         gt_component    TYPE         cl_abap_structdescr=>component_table,

CREATE DATA:
gt_dyn_table TYPE HANDLE gr_dyntable_typ,
gw_dyn_line TYPE HANDLE gr_struct_typ,
gw_dyn_line1 TYPE HANDLE gr_struct_typ.

ASSIGN gt_dyn_table->* TO <gfs_dyn_table>.
ASSIGN gw_dyn_line->* TO <gfs_line>.

** Populate the dynamic table*****************

** SALV Declarations.
DATA  : 

lo_columns type ref to cl_salv_columns_table.

         lo_cols                TYPE REF TO cl_salv_columns,
        lo_salv_table          TYPE REF TO cl_salv_table,
        lo_column              TYPE REF TO cl_salv_column,
        col_name(30),
        col_desc(20).
  try.
      cl_salv_table=>factory(
        importing
          r_salv_table = lo_salv_table
        changing
          t_table      = <gfs_dyn_table> ). """""""""""
    catch cx_salv_msg.

  endtry.
* get columns object
lo_cols = lo_salv_table->get_columns( ).

lo_salv_table->get_functions( )->set_all( abap_true ).

lo_salv_table->get_columns( )->set_optimize( abap_true ).

lo_salv_table->get_columns( )->set_color_column( 't_color' ).

LOOP AT gt_component INTO ls_component.
TRY.
col_name = ls_component-name.
lo_column ?= lo_cols->get_column( col_name ).
col_desc = col_name.
lo_column->set_medium_text( col_desc ).
lo_column->set_output_length( 15 ).

CATCH cx_salv_not_found.                            
ENDTRY.

ENDLOOP.

  lo_salv_table->display( ).

 

 

Sandra_Rossi
Active Contributor
0 Kudos
The short dump is "ASSIGN_TYPE_CONFLICT" in the standard program "SAPLKKBL". Show the lines in SAPLKKBL where it happens and the types and values of the concerned fields. It's standard so please search the SAP Notes or contact SAP Support.
View Entire Topic
Subhamoy
Explorer
0 Kudos

Hi ,

I assume you are getting the error due to 

field symbol <gfs_line>

You can declare as type any and try