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

add-corresponding

Former Member
0 Likes
364

hi,

i have 2 internal table and want to do add-corresponding.

the problem is i have character type field, example ekgrp (purchasing group) where the value is i38.

when run i got runtime error says unable to interpret 'i38' as a number.

how should i avoid the character field being added as i need to use add-corresponding.

thanks

2 REPLIES 2
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
343

Hi,

This is taken from Documentation.

You can explicitly specify the field name.

DATA: BEGIN OF VECTOR,

X TYPE I,

Y TYPE I,

LENGTH TYPE I,

END OF VECTOR,

BEGIN OF CIRCLE,

VOLUME TYPE P,

Y TYPE P,

RADIUS TYPE I,

X TYPE I,

END OF CIRCLE.

...

The subfields X und Y appear in the two structures VECTOR and CIRCLE; therefore, the ADD-CORRESPONDING statement here is equivalent to the following two statements:

ADD VECTOR-X TO CIRCLE-X.

ADD VECTOR-Y TO CIRCLE-Y.

Read only

Former Member
0 Likes
343

hi,

for doing add-corresponding the 2 fields from the 2 table should be <b>of same data type and the name of the variable should also be same</b> otherwise it wont add it.....

reward if helpful

ravi