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: 

Offset last 5 digits

Former Member
0 Kudos
196

Hi,

I have one number .

100065678984646.

from this number I want add last 5 digits to my final internal table.

regards,

Ajay

4 REPLIES 4

Former Member
0 Kudos
128

Move Number+10(5) to your internal table field.

Vinodh Balakrishnan

Former Member
0 Kudos
128

MOVE F1+10(5) TO F2

where F1 is your number and F2 is your internal table field

Former Member
0 Kudos
128

in case you number length is varying you can this logic....

DATA : l_var(16).

DATA : n_len TYPE i.

l_var = 100065678984646. "you can assign your variable..

n_len = strlen( l_var ).

n_len = n_len - 5.

l_var = l_var+n_len(5).

write l_var.

Former Member
0 Kudos
128

Hi

Use OFFSET command.

Data: var1 type i.

var1 = 100065678984646.

Eg.: itab-var = var1+10(5).

The last 5 digits of var1 will be copied to internal table.

Thanks & Regards

Haritha.