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

Do varying with type-incompatible Issue

Kinsbrunner
Active Contributor
584

Hi all!

I'm having a type cmpatible problem.

TABLES: GLT0.

DATA: REFE1(9) TYPE P,

REFE2(9) TYPE P.

DO 16 TIMES

VARYING REFE1

FROM GLT0-HSL01 NEXT GLT0-HSL02

VARYING REFE2

FROM XZKC1A-UM01S NEXT XZKC1A-UM02S .

REFE2 = REFE1.

ENDDO.

GLT0-HSL01 and GLT0-HSL02 are type CURR lenght 15 with 2 decimals.

XZKC1A-UM01S and XZKC1A-UM02S are type CURR lenght 17 with 2 decimals.

¿Does anyone know how to solve this issue?

Regards,

Alejandro.

2 REPLIES 2
Read only

Former Member
507

hi,

with 'varying', you need to use 'range'.

try:

DO 16 TIMES

VARYING REFE1

FROM GLT0-HSL01 NEXT GLT0-HSL02 range GLT0.

do reward if helpful..

Read only

former_member156446
Active Contributor
507

when ever you have type conflict <field-symbols> are the solutions.