cancel
Showing results for 
Search instead for 
Did you mean: 

MOVE-CORRESPONDING with FIELD SYMBOLS

Former Member
0 Kudos

Hi,

Move corresponding is giving me a syntax error when used with field symbols pointing to two structures.

Can anyone suggest a work around, other than assigning each component and copying them individually.

Regards,

Pavan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

This makes sense if the field-symbols have not been defined with a type specification, otherwise it should work OK.

eg.


FIELD-SYMBOLS:
  <f1> TYPE zmystructure1,
  <f2> TYPE zmystructure2.

...

MOVE-CORRESPONDING <f1> TO <f2>.

Scott

Former Member
0 Kudos

Actually I just verified and even when the field-symbols are not typed, it works OK. Something else must be wrong.

The code I used is:


REPORT Z.

TABLES:
  t006,
  t006t.

FIELD-SYMBOLS:
  <f1>,
  <f2>.

ASSIGN t006  TO <f1>.
ASSIGN t006t TO <f2>.

MOVE-CORRESPONDING <f1> TO <f2>.

Of course, as an aside, you should avoid using untyped field-symbols for performance reasons.

Scott

Former Member
0 Kudos

Hi Scott,

The move-corresponding is working perfectly in 47. But when I tried the same code in 46c server i was getting a problem.

Regards,

Pavan