2010 Jan 20 9:36 AM
Hi there,
I have just copied a piece of working code to a new program. This new program still
uses the FM 'REUSE_ALV_GRID_DISPLAY'.
The only thing that has changed is the field names and the internal table name
When I run the old program this works fine.
However, when I run the new program I get a short dump:
Short text
Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.
What happened?
The current ABAP/4 program encountered an unexpected
situation.
Error analysis
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.
I have built up the field catalogue as:
column_names_wa = 'Short/Long Term'.
column_names_wa-field_name = 'SICK_IND'.
column_names_wa-just = 'C'.
APPEND column_names_wa TO column_names_tab.
CLEAR column_names_tab.
etc.....
I cannot understand why the original program works but the new one doesn't.
Any ideas anybody??
2010 Jan 20 10:00 AM
HI,
Problem is here in ur code,Instead of clearing the work area ur clearing the table.
APPEND column_names_wa TO column_names_tab.
CLEAR column_names_tab.
Replace clear statement to.
CLEAR column_names_wa .
Hi there,
I have just copied a piece of working code to a new program. This new program still
uses the FM 'REUSE_ALV_GRID_DISPLAY'.
The only thing that has changed is the field names and the internal table name
When I run the old program this works fine.
However, when I run the new program I get a short dump:
Short text
Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.
What happened?
The current ABAP/4 program encountered an unexpected
situation.
Error analysis
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.
I have built up the field catalogue as:
column_names_wa = 'Short/Long Term'.
column_names_wa-field_name = 'SICK_IND'.
column_names_wa-just = 'C'.
APPEND column_names_wa TO column_names_tab.
CLEAR column_names_tab.
etc.....
I cannot understand why the original program works but the new one doesn't.
Any ideas anybody??
2010 Jan 20 9:58 AM
hi andy ,
check the fieldcatalog table & check the field name which you are appending in the field catalog .
Clear Workarea in your program not Table .
Regards
Gaurav
2010 Jan 20 10:00 AM
HI,
Problem is here in ur code,Instead of clearing the work area ur clearing the table.
APPEND column_names_wa TO column_names_tab.
CLEAR column_names_tab.
Replace clear statement to.
CLEAR column_names_wa .
2010 Jan 20 10:08 AM
2010 Jan 20 10:21 AM
Hi Javed,
That worked ok.
I get another error now when I try running the program in the background:
ABAP/4 processor: GETWA_NOT_ASSIGNED
Again, the original programs works ok.
Anymore ideas???
2010 Jan 20 10:01 AM
fill the field catalog
wa_fcat-fieldname = 'YEAR'.
wa_fcat-ref_tabname = 'przb'.
wa_fcat-ref_fieldname = 'gjahr_von'.
wa_fcat-outputlen = '5'.
wa_fcat-coltext = 'Yr'.
wa_fcat-seltext_l = 'Yr'.
wa_fcat-just = 'L'.
wa_fcat-no_zero = 'X'.
APPEND wa_fcat TO it_fcat.
CLEAR: wa_fcat.
check with the old program field catalog decleration tooo
2010 Jan 20 10:37 AM
2010 Jan 20 10:42 AM
Hi,
There is not a progam error as such. If I look in the job detail log there is:
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
You attempted to access an unassigned field symbol
(data segment 93).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
Last error logged in SAP kernel
Component............ "EM"
Place................ "SAP-Server sapdv5_DV1_00 on host sapdv5 (wp 13)"
Version.............. 37
Error code........... 3
Error text........... "invalid Context Handle"
2010 Jan 20 10:43 AM
I think the problem is here.
column_names_wa = 'Short/Long Term'.
try to replace it to
column_names_wa-seltext_m = 'Short/Long Term'.
change at all the places where ur passing the colomn header.
column_names_wa-seltext_m
Edited by: Javed Parvez on Jan 20, 2010 11:44 AM
2010 Jan 20 10:49 AM
Hi mate,
chnaged the code to:
Short/Long Term Sickness Indicator
column_names_wa = 'ShortLong Term'.
column_names_wa-field_name = 'SICK_IND'.
column_names_wa-just = 'C'.
APPEND column_names_wa TO column_names_tab.
clear column_names_wa.
LOOP AT column_names_tab INTO column_names_wa.
MOVE: column_names_wa-column_name TO fieldnames-seltext_l,
column_names_wa-field_name TO fieldnames-fieldname,
column_names_wa-no_out TO fieldnames-no_out,
column_names_wa-just TO fieldnames-just,
'SICK_TAB' TO fieldnames-tabname.
APPEND fieldnames TO alv_fieldcat.
CLEAR fieldnames.
ENDLOOP.
But still getting the error. Any more ideas?
Really appreciate your help with this
2010 Jan 20 11:00 AM
ur problem is here.
column_names_wa = 'ShortLong Term'.
why ue using this statement?
this statment is assigning 'ShortLong Term' to the first field of ur workarea column_names_wa.
That should not haapen.
and i am not understanding why ur doing loop.
column_names_wa-seltext_m = 'ShortLong Term'. " text which should appear as colomn header
column_names_wa-field_name = 'SICK_IND'. " field name of a table
column_names_wa-just = 'C'. "alignment c,J,etc
APPEND column_names_wa TO column_names_tab. "appending work area to internal table
clear column_names_wa. "clearing work area.
don't use the loop,instead repeat the same code for other fileds of ur internal table changing the data.
2010 Jan 20 11:06 AM
Thanks,
I just copied the code.
I'll try what you said
Many thanks again
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |