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: 

ALV Runtime Error : "NO_FIELDCATALOG_AVAILABLE"

Former Member
0 Kudos

Hi,

I am getting an error : "CL_GUI_ALV_GRID===============CM01J

" "SET_SORT_CRITERIA".

The program works fine in 4.6 but in 4.7 it is terminating.

*****************************************************

ERROR DESCRIPTION.

<b>Error analysis </b>

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

in the hierarchy, 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.

-

<b>Information on where terminated </b>

The termination occurred in the ABAP program "CL_GUI_ALV_GRID===============CP"

in "SET_SORT_CRITERIA".

The main program was "Z7IPPLRP_ZNAV_MSREPORT ".

The termination occurred in line 14 of the source code of the (Include)

program "CL_GUI_ALV_GRID===============CM01J"

of the source code of program "CL_GUI_ALV_GRID===============CM01J" (when

calling the editor 140).

<b>Source code extract</b>

000010 method set_sort_criteria.

000020

000030 *... (1) Trace?

000040 if not mr_trace is initial.

000050 call method mr_trace->add_trace_item

000060 exporting

000070 i_trace_item = 'SET_SORT_CRITERIA'

000080 ir_variant = m_cl_variant

000090 it_data = mt_data

000100 it_info = mt_info.

000110 endif.

000120

000130 if m_cl_variant->mt_fieldcatalog is initial.

> raise no_fieldcatalog_available.

000150 endif.

000160

000170 m_cl_variant->mt_sort = it_sort.

000180

000190 call function 'LVC_SORT_COMPLETE'

000200 exporting

000210 it_fieldcat = m_cl_variant->mt_fieldcatalog

000220 changing

000230 ct_sort = m_cl_variant->mt_sort.

000240

000250 endmethod.

*****************************************************

Any ideas ?

Thanks & Regards,

Ankur

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate

Does your program use a "hardcoded" or predetermined layout variant? Looks like the program may be having a hard time setting up the ALV Grid layout.

Regards,

Rich Heilman

14 REPLIES 14

RichHeilman
Developer Advocate
Developer Advocate

Does your program use a "hardcoded" or predetermined layout variant? Looks like the program may be having a hard time setting up the ALV Grid layout.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

That was quick..thanks.

CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING I_STRUCTURE_NAME = 'ZNAV_RECEIPTS'

IS_LAYOUT = GS_LAYOUT

IS_VARIANT = GS_VARIANT

I_SAVE = X_SAVE

I_DEFAULT = 'X'

CHANGING IT_OUTTAB = WEEK_TAB.

I am only passing report ID in GS_VARIANT-REPORT

and

a title in GS_LAYOUT-grid_title.

Thanks & Regards,

Ankur

0 Kudos

Hi

Are you sure the structure or table ZNAV_RECEIPTS there is in your system?

Perhaps there is in 4.6, but not in 4.7

Max

Former Member

Former Member
0 Kudos

Check if when calling the method SET_TABLE_FOR_FIRST_DISPLAY , you are passing a valid field catalog to "IT_FIELDCATALOG" or if you are passing a structure to the parameter "I_STRUCTURE_NAME" and this structure does not exist in your system.

Cheers .

0 Kudos

Does the structure 'ZNAV_RECEIPTS' exists in the new system?

Please try commented out the "Variant" parameters when calling the SET_TABLE_FOR_FIRST_DISPLAY method, just to see what happens.

Regards,

Rich Heilman

0 Kudos

Hi Sanjay,

Thanks, the problem is caught.

I have checked that structute ZNAV_RECEIPTS is not there in the system.

<b>PS: As per our company policy I couldn't reward u points as we belong to same company.</b>

Thanks & Regards,

Ankur

0 Kudos

Ankur,

That is some excellent policy. I wish all companies do that so that they don't misuse the rewards system, just to be able to get to the top of contributors list. But I do think Sanjay does deserve all the kudos for solving your problem. Maybe you can invite him for a cup of tea or something!!!

Srinivas

0 Kudos

Hi Ankur ,

We write here to help others and not for points. Glad to know you problem is solved.

Cheers.

0 Kudos

Maybe Sanjay deserves an unoffical "ABAP Guy of the Week" Award. Good for you, Sanjay.

Regards,

Rich Heilman

0 Kudos

Hi Srinivas /Rich ,

Thanks for your appreciation. Ankur and myself are located in different countries at present. Hopefully we will have a cup of tea when we meet if Ankur agrees.

Cheers.

0 Kudos

As they say here in US, may be a "rain check" for using the offer at a later date.

Srinivas

0 Kudos

Hi Srinivas,

Yes I completely agree with you.

Sanjay deserves a lot more than the link below.

/people/mark.finnern/blog/2005/10/10/small-announcements

Well done Sanjay.

Best Regards,

Ankur

Clemenss
Active Contributor
0 Kudos

Hi,

I don't know this particular error situation; just a hint: If you don't pass a fieldcatalog to the SET_TABLE_FOR_FIRST_DISPLAY Method, it is determined by I_STRUCTURE_NAME.

Maybe the processing sequence is wrong: If you try to SET_SORT_CRITERIA before the fieldcatalog is filled, this error will come up.

Check the sequence (may have been changed by SAP):

1. build field catalog - you may use function LVC_FIELDCATALOG_MERGE

2. SET_TABLE_FOR_FIRST_DISPLAY

3. SET_SORT_CRITERIA

Hope it helps,

C.