‎2007 May 25 10:27 AM
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.
‎2007 May 25 10:29 AM
Hi
try
<b>use move-corresponding wa1 to wa2.</b>
Regards,
Sreeram
Message was edited by:
sree ram
‎2007 May 25 10:29 AM
Hi,
use move-corresponding wa1 to wa2.
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 May 25 10:30 AM
Hi,
well you can use move-corresponding wa1 to wa2. But the statement is obsolete. Normally you should move each field separately.
regards
Siggi
‎2007 May 25 10:30 AM
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
‎2007 May 25 10:30 AM
‎2007 May 25 10:33 AM
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.
‎2007 May 25 10:46 AM
we have only one method to move the data form one table to another........
Move-corresponding WA1 to WA2.
‎2007 May 25 3:56 PM
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.
‎2007 May 25 4:17 PM
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