Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: Exception condition "NO_FIELDCATALOG_AVAILABLE" raised

$
0
0

Hi...

 

Check your internal table was declared with LIKE statement instead of TYPE.

 

I suggest you to use class:

 

DATA: fo_sdescr TYPE REF TO cl_abap_structdescr,

   fs_component  TYPE abap_compdescr.

 

DATA: your_line LIKE LINE OF "pv_tabname".

DATA: fs_fieldcatalogue TYPE slis_fieldcat_alv,

           ft_fieldcatalogue  TYPE slis_t_fieldcat_alv.

 

 

    fo_sdescr ?= cl_abap_typedescr=>describe_by_data( your_line).

 

LOOP AT fo_sdescr->components INTO fs_component.

 

     fs_fieldcatalogue-fieldname = fs_component-name.

     fs_fieldcatalogue-ref_tabname = 'pv_tabname'.

     APPEND fs_fieldcatalogue TO ft_fieldcatalogue.


ENDLOOP..

 

Hope to help

Bye


Viewing all articles
Browse latest Browse all 9091

Trending Articles