‎2007 Dec 24 11:55 AM
hi folks,
i am trying to move data between two structures.but its going to dump because one structutre is of table type and other is normal structure...can any one give me suggestion how to solve the problem/......thnx in advance...
santosh.
‎2007 Dec 24 11:57 AM
‎2007 Dec 24 11:59 AM
Hi,
If the number of fields between your structures differ use,
MOVE-CORRESPONDING.
else,
MOVE explicitly,
ie,
MOVE
hope this helps.
‎2007 Dec 24 12:01 PM
hi i tried with both options still not getting..actually here i have to use colelt..even if i use that also its not taking....
‎2007 Dec 24 12:04 PM
‎2007 Dec 24 12:04 PM
Hi Santosh,
To move the data from one structure to another structure, the structure of both should be same type.
If structure is same , then you will assign directly like that
struc2 = struc1 .
or if the structure differ then use the
move-corresponding statement
or use the move statement like
move struc1-field1 to struc2-field1.
Reward points, if useful
Regards,
Manoj Kumar
‎2007 Dec 24 12:05 PM
‎2007 Dec 24 12:17 PM
Hi santosh,
the structure with type table structure act as an internal table which can hold many records.
the structure with type normal structure act as work area which can hold one record at a time.
stru1 - table type structure
stru2 - normal structure
form table type structure to work area you can move the data like below.
loop at stru1 into stru2.
endloop.
( you can use read statement also)
you can append the data from normal structure to table type structure using append statement as below.
append stru2 to stru1.
I think now you get the idea about the usage of internal table and work area.
regards
Vijay Reddy
‎2007 Dec 24 12:26 PM
Hi Santosh,
1. To move the data from structure to another structure, the structures should be same type.
If structure is same , then you will assign directly like that
structure2[] = structure1[] .
2. If the two structure differ use move-corresponding structure1 to structure2.
If it is helpfull pls do reward
Regards
Srimanta