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 message: cannot be converted to the type of...

Former Member
0 Likes
8,154

hi friends,

i got this error, when i write this:

data: pt_req type hrobject,

p_hrobject_list type rcf_t_hrobject.

pt_req = pt_hrobject_list.

ho can i do that?

thanks.

dana.

1 ACCEPTED SOLUTION
Read only

faisalatsap
Active Contributor
0 Likes
3,322

Hi,

Use the following Code will Solve out your Problem,

data: pt_req type hrobject,
p_hrobject_list type HROBJECT.

pt_req = p_hrobject_list.

Or the following,

data: pt_req type hrobject,
p_hrobject_list type LINE OF rcf_t_hrobject." HROBJECT.

pt_req = p_hrobject_list.

Please Reply if any Else Issue.

Kind Regards,

Faisal

Edited by: Faisal Altaf on Feb 2, 2009 12:44 PM

hi friends,

i got this error, when i write this:

data: pt_req type hrobject,

p_hrobject_list type rcf_t_hrobject.

pt_req = pt_hrobject_list.

ho can i do that?

thanks.

dana.

5 REPLIES 5
Read only

Former Member
0 Likes
3,322

Hi Dana,

The type for both the variables which you are equating should be same.

i think the type is not same and thats y u r getting an error.

Thanks.

Read only

faisalatsap
Active Contributor
0 Likes
3,323

Hi,

Use the following Code will Solve out your Problem,

data: pt_req type hrobject,
p_hrobject_list type HROBJECT.

pt_req = p_hrobject_list.

Or the following,

data: pt_req type hrobject,
p_hrobject_list type LINE OF rcf_t_hrobject." HROBJECT.

pt_req = p_hrobject_list.

Please Reply if any Else Issue.

Kind Regards,

Faisal

Edited by: Faisal Altaf on Feb 2, 2009 12:44 PM

Read only

0 Likes
3,322

thank you for replying.

no, its not working.

pt_hrobject_list is a sap variable, and i cant change it.

i want to "play" with his data, and that why i need to

give the data to pt_req.

pt_hrobject_list declare as rcf_t_hrobject

and i dont know how can i give the same values to pt_hrobject.

thanks,

dana.

Read only

0 Likes
3,322

Hi,

Test the folloing Hope this time it will work.

DATA: pt_req TYPE hrobject,
pt_hrobject_list TYPE LINE OF rcf_t_hrobject." HROBJECT.

pt_req = pt_hrobject_list .

Or Please Send you Complete Code.

Please Reply if problem is still there.

Kind Regards,

Faisal

Edited by: Faisal Altaf on Feb 2, 2009 1:09 PM

Read only

Former Member
0 Likes
3,322

thanks very much.