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

Corresponding fields of ???

Former Member
0 Likes
1,156

I want to trasnfer the data of the work area into another work area, but their structure are not the same. Some of the columns of the one is not available in the other. Of course there is common fields in both of them.

How can I transfer the data to other?

I said.

move wa1 into corresponding fields of wa2.

But it did not worked?

Thanks in advance.

Deniz.

9 REPLIES 9
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,011

Hi

try

<b>use move-corresponding wa1 to wa2.</b>

Regards,

Sreeram

Message was edited by:

sree ram

Read only

Former Member
0 Likes
1,011

Hi,

use move-corresponding wa1 to wa2.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
1,011

Hi,

well you can use move-corresponding wa1 to wa2. But the statement is obsolete. Normally you should move each field separately.

regards

Siggi

Read only

Former Member
0 Likes
1,011

hi,

u move the entire contents if both structure are same...

else if it is diffrent , then u hav to assign each & every data....like this..

wa2-pernr = wa1-pernr

wa2-ename = wa2-ename.

With Regards,

S.BArani

Read only

Former Member
0 Likes
1,011

Hi,

Please try

MOVE-CORRESPONDING WA1 TO WA2

Regards,

Srinivas

Read only

Former Member
0 Likes
1,011

Hi,

Declare a Field Symbol for the second structure.

field-symbols <fs1> type c.

assign (second structure) to <fs1> casting.

Move the first structure to the <fs1>...then move the field symbol to second structure.

Regards,

Diwakar.

Read only

Former Member
0 Likes
1,011

we have only one method to move the data form one table to another........

Move-corresponding WA1 to WA2.

Read only

Former Member
0 Likes
1,011

Hi Deniz ,

Try like this.

data: v_wa2char type string.

loop at l_doc-xekeh into ekeh.

CALL FUNCTION 'SO_STRUCT_TO_CHAR'

EXPORTING

ip_struct = wa2

IMPORTING

EP_STRING = v_wa2.

CALL FUNCTION 'SO_CHAR_TO_STRUCT'

EXPORTING

ip_string = v_wa2

ip_structname = 'EKEK'

IMPORTING

EP_STRUCT = wa1

.

Please reward points .

Thanks,

Rajesh.

Read only

Former Member
0 Likes
1,011

use - move-corresponding wa1 to wa2.

but one thing structure will be diffrent from wa1 to wa2.

field names should match otherwise it will not work.

data : begin of wa1 ,

matnr like mara-matnr,

maktx ike makt-maktx,

end of wa1.

data : begin of wa2,

matnr like mara-matnr,

erdat like mara-erdat,

maktx like makt-maktx,

end of wa2.

in this move-corresponding wa1 to wa2 will work.

data : begin of wa1 ,

matn1 like mara-matnr,

maktx ike makt-maktx,

end of wa1.

data : begin of wa2,

matnr like mara-matnr,

erdat like mara-erdat,

maktx like makt-maktx,

end of wa2.

in this move-corresponding wa1 to wa2 will not work.

Reward Points if it is helpful

Thanks

Seshu