Application Development 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: 

error: type of ... cannot be converted to the type of ...

Former Member
0 Kudos

hi i have a query..

in the program ...

data : lt_secresid TYPE /sapapo/om_resid_tab,

lt_sec_res TYPE /sapapo/pt_secres_tab.

CALL FUNCTION '/SAPAPO/RRP_PT_RES_GET_SECRES'

EXPORTING

iv_simid = '000'

it_resid = 'GxAp7t6MCllX00002X5EvG'

IMPORTING

et_sec_res = lt_sec_res.

lt_secresid = lt_sec_res

i get an error ..the type of lt_secresid cannot be converted to the type of lt_sec_res.

how 2 overcome this error ??

Moderator message: please use more descriptive subject lines from now on (subject adjusted).

Edited by: Thomas Zloch on Jun 21, 2010 1:30 PM

3 REPLIES 3

former_member536879
Active Contributor
0 Kudos

Hi,

See in the code itself you can cleary understand that the type of both are different. To over come this use the move-corresponding statment.

itab1 = itab2 .( your stmt).

The above statement needs to replace with

move-corresponding itab2 to itab1.

With Regards,

Sumodh.P.

0 Kudos

REPORT Z_1480178.

data : lt_secresid TYPE /sapapo/om_resid_tab,

lt_sec_res TYPE /sapapo/pt_secres_tab.

CALL FUNCTION '/SAPAPO/RRP_PT_RES_GET_SECRES'

EXPORTING

iv_simid = '000'

it_resid = 'GxAp7t6MCllX00002X5EvG'

IMPORTING

et_sec_res = lt_sec_res.

move-corresponding lt_sec_res to lt_secresid.

changed the code as follows...

but still get the error lt_sec_res is not a structure or internal table with header line

0 Kudos

Hi,

Can you check /sapapo/pt_secres_tab is an Line type or not? if so make that

itab type line of /sapapo/pt_secres_tab.

With Regards,

Sumodh.P