10-17-2005 3:53 PM
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
10-17-2005 3:59 PM
10-17-2005 3:59 PM
10-17-2005 4:07 PM
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
10-17-2005 4:12 PM
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
10-17-2005 4:05 PM
Hi,
check this may be it can help you...
http://help.sap.com/saphelp_erp2004/helpdata/en/e9/e5eb40c4f8712ae10000000a155106/frameset.htm
regards,
venu.
10-17-2005 4:09 PM
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 .
10-17-2005 4:11 PM
10-17-2005 4:18 PM
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
10-17-2005 4:23 PM
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
10-17-2005 4:23 PM
Hi Ankur ,
We write here to help others and not for points. Glad to know you problem is solved.
Cheers.
10-17-2005 4:27 PM
10-17-2005 4:28 PM
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.
10-17-2005 4:30 PM
As they say here in US, may be a "rain check" for using the offer at a later date.
Srinivas
10-17-2005 4:38 PM
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
10-17-2005 4:33 PM
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.