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

which statement is used to move identically named fields between structures

Former Member
0 Likes
957

hi

which statement is used to move identically named fields between structures

6 REPLIES 6
Read only

Former Member
0 Likes
826

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.

Read only

Former Member
0 Likes
826

Hi..

'Move corresponding' will do..

Read only

Former Member
0 Likes
826

Hi,

use move corresponding,

or

move table1[] to table2[]

reward if helpful

vivekanand

Read only

Former Member
0 Likes
826

MOVE-CORRESPONDING STRUCT1 to STRUCT2.

Read only

Former Member
0 Likes
826

Hi,

Move-corresponding struct1 to struct2.

Regards,

Chitra

Read only

Former Member
0 Likes
826

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.