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

Moving data between two structures

Former Member
0 Likes
3,003

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.

8 REPLIES 8
Read only

Former Member
0 Likes
1,488

try with move-corresponding

Read only

Former Member
0 Likes
1,488

Hi,

If the number of fields between your structures differ use,

MOVE-CORRESPONDING.

else,

MOVE explicitly,

ie,

MOVE

hope this helps.

Read only

0 Likes
1,488

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....

Read only

Former Member
0 Likes
1,488

Can u tell me the short description of shortdump.

Thanks

Read only

former_member402443
Contributor
0 Likes
1,488

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

Read only

Former Member
0 Likes
1,488

Hi,

could you post your code where you are moving data?

Read only

Former Member
0 Likes
1,488

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

Read only

Former Member
0 Likes
1,488

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