10-09-2007 7:53 AM
hi
which statement is used to move identically named fields between structures
10-09-2007 7:55 AM
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.
10-09-2007 7:56 AM
10-09-2007 7:56 AM
Hi,
use move corresponding,
or
move table1[] to table2[]
reward if helpful
vivekanand
10-09-2007 7:56 AM
10-09-2007 8:02 AM
10-09-2007 8:04 AM
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.