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

read a internal table in method.

Former Member
0 Likes
1,939

Hi,

i have an internal table, containing multiple records.

the problem is when i m going to read this internal table in METHOD HANDLE_ITEM_DOUBLE_CLICK..

Error is comming - "Statement "I_FINAL" is not defined. Check your spelling. .

i have al ready declare this internal tabl globly.

Edited by: Anshuman Singh on Jun 3, 2008 11:13 AM

13 REPLIES 13
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,485

As the message stipulates, check your syntax, there is no I_FINAL statement in Abap. Could you post more of your code.

Regards

Read only

0 Likes
1,485

i_final is my internal table.

Read only

0 Likes
1,485

I understood that, can you post the code lines in errors. Remember there is a more severe check in object/method Abap programing, many restrictions exist in OO context.

Here you have a syntax error. If the check did not found the table you should have get an error reporting a missing field or interface.

If it were on work area you got an error stipulating that INTO or TRANSPORTING NO FIELDS are required.

Regards

Read only

Former Member
0 Likes
1,485

Hi,

As you are using Methods, it does not allow internal table with header line.

If you have used i_final with header line, change the code into itab and workarea.

Thanks

Read only

peter_ruiz2
Active Contributor
0 Likes
1,485

hi,

please check if you have declared your class before the declaration of the internal table. if yes, declare your internal table first before the class.

regards,

Peter

Read only

Former Member
0 Likes
1,485

Hi,

Please Post ur sample Code where the error has been.Probably there could be a syntax error at Loop At statement.Check it out.

Loop at i_final into w_final.

endloop.

Read only

0 Likes
1,485

METHOD HANDLE_ITEM_DOUBLE_CLICK.

G_EVENT = 'ITEM_DOUBLE_CLICK'.

G_NODE_KEY = NODE_KEY.

G_ITEM_NAME = ITEM_NAME.

ENDMETHOD.

Actually i want to read my internal table under above section.

when i am going to read internal table or Work Area like this:

METHOD HANDLE_ITEM_DOUBLE_CLICK.

Read itab index 1.

G_EVENT = 'ITEM_DOUBLE_CLICK'.

G_NODE_KEY = NODE_KEY.

G_ITEM_NAME = ITEM_NAME.

ENDMETHOD.

error is comming:

Field "Itab" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement. .

i have already define internal table and fill above class calling

Edited by: Anshuman Singh on Jun 4, 2008 7:33 AM

Read only

0 Likes
1,485

Hi,

there is a syntax issue for READ..

METHOD HANDLE_ITEM_DOUBLE_CLICK.

Use READ TABLE ITAB INDEX 1.

G_EVENT = 'ITEM_DOUBLE_CLICK'.

G_NODE_KEY = NODE_KEY.

G_ITEM_NAME = ITEM_NAME.

Edited by: Shruthi R on Jun 4, 2008 7:39 AM

Read only

0 Likes
1,485

Use READ TABLE ITAB INDEX 1.

is this syntax statement????

Read only

0 Likes
1,485

Yes,

Syntax of read statement using index is:

READ TABLE <itab> index 1

Read only

0 Likes
1,485

READ TABLE ITAB INDEX 1.

i have already use this.

but same error is comming

Read only

0 Likes
1,485

where is the table declared and does it have a header line ?

it should be declared globally.

Read only

0 Likes
1,485

tHANX NOW I M ABLE TO READ INTERNAL TABLE