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

Unicode Error : Type incompatible - structures

Former Member
0 Likes
444

Hi ,

Here is a new requirement in HR Transaction PA30 which calls an include.

do znumber_of_lgart_in_p0008 times

varying zstr_p0008 from rs_p0008-lga01 next rs_p0008-lga02

varying zstr_indbw from rs_p0008-ind01 next rs_p0008-ind02.

but zstr_p0008 and rs_p0008-lga01 ... or structures.

It says "type incompatible ERROR".

2 REPLIES 2
Read only

Former Member
0 Likes
398

Here is an example of how we have this for infotype 0041. It probably has to do with your variable declarations:

data: w_dar           LIKE pa0041-dar01,
        w_dat           LIKE pa0041-dat01.

    DO 12 TIMES VARYING w_dar FROM p0041-dar01 NEXT p0041-dar02
                VARYING w_dat FROM p0041-dat01 NEXT p0041-dat02.

You must ensure that zstr_p0008 is declared like rs_p0008-lga02 and zstr_indbw is declared like rs_p0008-ind02.

Best Regards,

Chris H.

Read only

0 Likes
398

Chris ,

in my case w_dar is a structure .

data: begin of zstr_p0008,

lgart like p0008-lga01,

betrg like p0008-bet01,

anzhl like p0008-anz01,

ein like p0008-ein01,

opken like p0008-opk01,

end of zstr_p0008.

and the error happens in the following code as type incompatible,

do znumber_of_lgart_in_p0008 times

varying zstr_p0008 from rs_p0008-lga01 next rs_p0008-lga02

varying zstr_indbw from rs_p0008-ind01 next rs_p0008-ind02.