Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

No Field Catalog

former_member654002
Participant
0 Kudos

Dear Abapers,

I am asking for help in the folowing code.

I get a message that i have not sort criteria but i have not field catalog .

typesbegin of gty_s_t001,

        bukrs like t001-bukrs,

        end of gty_s_t001.

*     estruturas e tabelas internas para os processos

DATA: gs_T001 TYPE gty_s_t001,

       gt_T001 TYPE TABLE OF gty_s_t001,



FORM inicializar_dados.

* carregar tabela de processos

   SELECT BUKRS FROM T001

      INTO TABLE gt_T001

      order by bukrs.

ENDFORM.



perform build_sortcat.

PERFORM build_fieldcat_processos.

FORM build_fieldcat_processos .

   FIELD-SYMBOLS: <f_catw> TYPE lvc_s_fcat.

   CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

     EXPORTING

*     I_BUFFER_ACTIVE        =

       i_structure_name       = 'GS_T001'

       i_client_never_display = 'X'

*     I_BYPASSING_BUFFER     =

       i_internal_tabname     = 'GT_T001'

     CHANGING

       ct_fieldcat            = gt_proc_fcat

     EXCEPTIONS

       inconsistent_interface = 1

       program_error          = 2

       OTHERS                 = 3.

   LOOP AT gt_proc_fcat ASSIGNING <f_catw>.

     CASE <f_catw>-fieldname.

       WHEN 'BUKRS'.

         <f_catw>-edit      = ' '.

         <f_catw>-hotspot   = 'X'.

       when OTHERS.

         <f_catw>-no_out    = 'X'.

     ENDCASE.

   ENDLOOP.

ENDFORM.                    " BUILD_FIELDCAT_PROCESSOS

FORM build_sortcat .

   wa_sort-spos      = 1.

   wa_sort-fieldname = 'BUKRS'.

    APPEND wa_sort to it_sortcat.


ENDFORM.                    " build_sortcat


I put here the relevant code. let me now if you need something else.


I am getting


Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.

e aconteceu ?

The current ABAP/4 program encountered an unexpected

situation.

ise do erro

A RAISE statement in the program "CL_GUI_ALV_GRID===============CP" raised the

exception

condition "NO_FIELDCATALOG_AVAILABLE".

Since the exception was not intercepted by a superior

program, processing was terminated.

Short description of exception condition:

For detailed documentation of the exception condition, use

Transaction SE37 (Function Library). You can take the called

function module from the display of active calls.

-




Programa                                CL_GUI_ALV_GRID===============CP

Include                                 CL_GUI_ALV_GRID===============CM01J

Linha                                   14

Tipo de módulo                          (METHOD)

Nome do módulo                          SET_SORT_CRITERIA

ento texto fonte

a Txt.fonte

1 method set_sort_criteria.

2

3 *... (1) Trace?

4   if not mr_trace is initial.

5     call method mr_trace->add_trace_item

6       exporting

7         i_trace_item = 'SET_SORT_CRITERIA'

8         ir_variant   = m_cl_variant

9         it_data      = mt_data

0         it_info      = mt_info.

1   endif.

2

3   if m_cl_variant->mt_fieldcatalog is initial.

>     raise no_fieldcatalog_available.

5   endif.

Thank you and Best Regards,

João Fernandes

1 ACCEPTED SOLUTION

nabheetscn
Active Contributor
0 Kudos

If you will debug your program you will your field catalog is empty. This function module for making field catalog works for data dictionary objects

Nabheet

3 REPLIES 3

nabheetscn
Active Contributor
0 Kudos

If you will debug your program you will your field catalog is empty. This function module for making field catalog works for data dictionary objects

Nabheet

adrian_mejido
Contributor
0 Kudos

Hi Joao,

Look at this disscusion it might help you:

Best regards.

Former Member
0 Kudos

Hi Joao,

In your Field catalog merge function call exporting parameters, perform following steps and try:

1. Include i_program_name = syrepid,

2. Comment out 

       i_structure_name       = 'GS_T001'      and

       i_client_never_display = 'X'

Thank You,

Gajendra.