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

doubt in 2 structure assignment.

Former Member
0 Likes
959

Hi All,

im getting error in assgnment of two structures.

ex:

data: begin of str1,

a type c,

b(1500 type c,

end of str1.

data: begin of str1,

ss type c,

aa type c,

end of str2.

data: wa_str1 type str1.

data: wa_str2 type str2.

wa_str1 = wa_str2-b.

here wa_str1 = wa+str2-b are not mutually compatible in unicode conversion.

please gv me how to assign this type structure..

8 REPLIES 8
Read only

Former Member
0 Likes
924

here you have to specify the field name

wa_str1-ss = wa_str2-b.or

wa_str1-bb = wa_str2-b.

regards

shiba dutta

Read only

0 Likes
924

but in sec structure tehre is no component which is present in structure2

these two structures are having different flds with different lenght

then how to assign between them?

Read only

Former Member
0 Likes
924

move corresponding wa_str2 to wa_str1.

append wa_str2.

Read only

Former Member
0 Likes
924

You can't assign a field to the structure.

wa_str1 = wa_str2-b is wrong.

Do this way...

wa_str1-ss = wa_str2-a.or

wa_str1-aa = wa_str2-a.

Regards,

Pavan P.

Read only

Former Member
0 Likes
924

actually what is your requirement? as per your code the first cahr of wstr1-b will transfer to the wstr2 bb or ss field.... Pls let us clear about your rquirement.

regards

shiba dutta

Read only

0 Likes
924

my req is to make unicode enabled ..in ecc6.10.

code is:

TYPES: BEGIN OF xs_pa0007,

country(2),

national_id(20),

schkz type pa0007-schkz, "work schd rule

teilk(3), "type pa0007-teilk Part time EE yes/no

empct type pa0007-empct, "Emp percent

wostd(6). "Weekly work hours

TYPES: END OF xs_pa0007.

TYPES: BEGIN OF gs_paxxxx,

fill1,

begda TYPE pa0000-begda,

fill2,

seqnr TYPE pa0000-seqnr,

infty(4),

fill3,

subty TYPE pa0000-subty,

fill4,

pernr TYPE pa0000-pernr,

fill5,

copied,

fill6,

rec(1500),

END OF gs_paxxxx.

data: gw_pa0007 type xs_pa0007,

ga_paxxxx type gs_paxxxx.

gw_pa0007 = ga_paxxxx-rec.

in this libne im getting error that

gw_pa0007 and ga_paxxxx-rec are not mutualy compatible in unicode program.

please tell me how to solve this ..

Read only

0 Likes
924

Hi Try like this

TYPES: BEGIN OF xs_pa0007,
country(2),
national_id(20),
schkz type pa0007-schkz, "work schd rule
teilk(3), "type pa0007-teilk Part time EE yes/no
empct type pa0007-empct, "Emp percent
wostd(6). "Weekly work hours
TYPES: END OF xs_pa0007.



TYPES: BEGIN OF gs_paxxxx,
fill1,
begda TYPE pa0000-begda,
fill2,
seqnr TYPE pa0000-seqnr,
infty(4),
fill3,
subty TYPE pa0000-subty,
fill4,
pernr TYPE pa0000-pernr,
fill5,
copied,
fill6,
rec(1500),
END OF gs_paxxxx.

data: gw_pa0007 type xs_pa0007,
ga_paxxxx type gs_paxxxx.

Read table gw_pa0007. 
append ga_paxxxx to gw_pa0007.

Reward all helpfull answers

REgards

Pavan

Read only

Former Member
0 Likes
924

anybody please help me in this ...