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

Error: Internal table is not type compatible

Former Member
0 Likes
2,866

Hi,

I am passing an internal table data to a z-method . but when i am activating my abap program it is giving error:Internal table is not type compatible.then i have changed my declaration but only one record is coming into method from it_tab.It_tab is having more than 1 record.

my It_tab declaration in abap program :

Table:ztest.

DATA:BEGIN OF it_tab OCCURS 0.

INCLUDE STRUCTURE Ztest.

DATA:END OF it_tab.

appending data to it_tab.

calling a mthod

CALL METHOD zcl_test->update_test.

EXPORTING

i_itab = it_tab

iv_task = l_task

but i am getting only one record in i_itab from it_tab.

I_tab has been declared as I_tab type ztest.

and also I tried with table type l_tab type ztt_test but in abap program i am getting error:Internal table is not type compatible.

any idea?

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,363

Try this

CALL METHOD zcl_test->update_test.

EXPORTING

i_itab = it_tab[]

iv_task = l_task

3 REPLIES 3
Read only

Former Member
0 Likes
1,364

Try this

CALL METHOD zcl_test->update_test.

EXPORTING

i_itab = it_tab[]

iv_task = l_task

Read only

Former Member
0 Likes
1,363

Declare I_tab as type TABLE of ZTEST in your method.

Regards,

Ravi

Read only

Former Member
0 Likes
1,363

Hi srinisap,

You had defined internal table with header line and u r passing the header... so u will get only the last record in the header... you pass the body of the table... like ITAB[].

Hope this may solve..

<removed_by_moderator>

Regards

Narin Nandivada

Edited by: Julius Bussche on Jun 23, 2008 9:13 PM