2005 May 04 10:42 AM
Hi,
data: o_pricecond type zpricecond_struct.
data: o_pricemat type zpricematerial_struct.
..some code for filling objects.
I now have 2 different objects .
I want to copy all fields from one object to another.
The field names are the same...
This gives me an error!
o_pricemat = o_pricecond.
If this isn't supported I will have to do like this:
o_pricemat-f1 = o_pricecond-f1.
o_pricemat-f2 = o_pricecond-f2.
o_pricemat-f3 = o_pricecond-f3.
...
o_pricemat-f18 = 'MARTIN'
append o_pricemat to i_price_tab.
That's lots of coding...
//Martin
2005 May 04 11:30 AM
Hi Martin,
<b>o_pricecond</b> and <b>o_pricemat</b> seem to be structured variables. Since they are declared with different types, a direct assignment is not possible. You can try using
move-corresponding o_pricecond to o_pricemat.
Regards,
Anand Mandalika.
Hi,
data: o_pricecond type zpricecond_struct.
data: o_pricemat type zpricematerial_struct.
..some code for filling objects.
I now have 2 different objects .
I want to copy all fields from one object to another.
The field names are the same...
This gives me an error!
o_pricemat = o_pricecond.
If this isn't supported I will have to do like this:
o_pricemat-f1 = o_pricecond-f1.
o_pricemat-f2 = o_pricecond-f2.
o_pricemat-f3 = o_pricecond-f3.
...
o_pricemat-f18 = 'MARTIN'
append o_pricemat to i_price_tab.
That's lots of coding...
//Martin
2005 May 04 11:30 AM
Hi Martin,
<b>o_pricecond</b> and <b>o_pricemat</b> seem to be structured variables. Since they are declared with different types, a direct assignment is not possible. You can try using
move-corresponding o_pricecond to o_pricemat.
Regards,
Anand Mandalika.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |