Application Development 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: 

comparison of numbers

Former Member
0 Kudos

I would like to compare two numbers from two different tables. Example of numbers are 120000001 and 0000120000001. i would like to remove the zeros on the second number so that these numbers become equal.

4 REPLIES 4

Former Member
0 Kudos

hi.

use shift command

shift fld1 left deleteing leading 0.

Former Member
0 Kudos

USE THIS CODE.

DATA: A TYPE STRING,

B TYPE STRING.

A = NO1.

B = NO2.

TNEN COMPARE A = B.

REWARD POINTS IF USEFUL......

Former Member
0 Kudos

Hi,

Use the function module CONVERSION_EXIT_ALPHA_OUTPUT

to remove leading zeroes.

Former Member
0 Kudos

if both are numeric fields then you can compare with leading zeros itself...no problem..

if both are string then follow like below.

data: k type string value '121',

j type string value '0000121'.

shift j by 4 places left.

if k = j.

write 'sub'.

endif.

Message was edited by:

Muthurajan Ramkumar