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

Copy data from one structure to another

sudha_naik
Product and Topic Expert
Product and Topic Expert
0 Likes
4,308

hello

I have two data types like this ..

DATA: BEGIN OF XDMEAN OCCURS 20.

INCLUDE STRUCTURE XDMEAN .

DATA: END OF XDMEAN .

DATA: BEGIN OF XDMEANTEMP OCCURS 20.

INCLUDE STRUCTURE XDMEAN.

DATA: END OF XDMEANTEMP.

I want to copy data from XDMEAN to XDMEANTEMP. Kindly tell me whether

this move statement is correct.

MOVE XDMEAN TO XDMEANTEMP.

During debugging i found that the data is not copied to XDMEANTEMP.

Please help.

Regards

Sudha

Message was edited by:

Sudha Naik

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,516

try

XDMEANTEMP[] = XDMEAN[].

regards

shiba dutta

try

XDMEANTEMP[] = XDMEAN[].

regards

shiba dutta

7 REPLIES 7
Read only

Former Member
0 Likes
1,517

try

XDMEANTEMP[] = XDMEAN[].

regards

shiba dutta

Read only

Former Member
0 Likes
1,516

Hi,

You have used the 'OCCURS' keyword, which makes it a table,

Use XDMEANTEMP[] = XDMEAN[].

Regards,

Samson Rodrigues.

Read only

Former Member
0 Likes
1,516

APPEND LINES OF XDMEAN TO XDMEANTEMP.

or

XDMEAN = XDMEANTEMP[].

Read only

Former Member
0 Likes
1,516

Please try with MOVE XDMEAN TO XDMEANTEMP[]

Thanks,

Max

Read only

Former Member
0 Likes
1,516

HI.

refer this code.

APPEND LINES OF XDMEAN TO XDMEANTEMP.

or

XDMEAN = XDMEANTEMP[].

Reward all helpfull answers.

Regards.

Jay

Read only

sudha_naik
Product and Topic Expert
Product and Topic Expert
0 Likes
1,516

Thanks all

Read only

Former Member
0 Likes
1,516

Hi ,

If Both internal tables has same structure u can use

XDMEANTEMP[] = XDMEAN[]

If structure differs

Loop at XDMEAN.

Move-corresponding XDMEAN to XDMEANTEMP.

Append XDMEANTEMP.

Endloop.

Regards,

A.Thuyavan