Application Development and Automation 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: 
Read only

ALV Reporting Issue

Former Member
0 Likes
1,658

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??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,556

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??

11 REPLIES 11
Read only

Former Member
0 Likes
1,556

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

Read only

Former Member
0 Likes
1,557

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 .

Read only

0 Likes
1,556

Many thanks Javed for solving the problem

Read only

0 Likes
1,556

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???

Read only

Former Member
0 Likes
1,556

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

Read only

Former Member
0 Likes
1,556

please provide the code where it is giving error.

Read only

0 Likes
1,556

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"

Read only

Former Member
0 Likes
1,556

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

Read only

0 Likes
1,556

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

Read only

0 Likes
1,556

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.

Read only

0 Likes
1,556

Thanks,

I just copied the code.

I'll try what you said

Many thanks again