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: 

which statement is used to move identically named fields between structures

Former Member
0 Kudos

hi

which statement is used to move identically named fields between structures

6 REPLIES 6

Former Member
0 Kudos

Hi,

If the both structures are same you can use

MOVE str1 TO str2.

This means that both the structures should have same number of fields and moreover the field names should be the same but length of the fileds may vary.

<b>Example:</b> str1-name may have 20 chars length and str2-name may have 15 chars length.

If the both structures are not same you can use

MOVE-CORRESPONDING str1 TO str2.

Former Member
0 Kudos

Hi..

'Move corresponding' will do..

Former Member
0 Kudos

Hi,

use move corresponding,

or

move table1[] to table2[]

reward if helpful

vivekanand

Former Member
0 Kudos

MOVE-CORRESPONDING STRUCT1 to STRUCT2.

Former Member
0 Kudos

Hi,

Move-corresponding struct1 to struct2.

Regards,

Chitra

Former Member
0 Kudos

Hello Jyothsna,

We use

<b>MOVE-CORRESPONDING STRU1 TO STRU2.</b>

Example:

Data: begin of stru1,

f1,

f2,

f3,

end of stru1.

Data: begin of stru2,

f1,

f2,

f3,

end of stru2.

stru1-f1 = 'a'. stru1-f2 = 'b'. stru1-f3 = 'c'.

MOVE-CORRESPONDING STRU1 TO STRU2.

write: stru2-f1, stru2-f2, stru2-f3.

Reward If Helpful.

Regards

--

Sasidhar Reddy Matli.