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

Offset last 5 digits

Former Member
0 Likes
726

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
Read only

Former Member
0 Likes
658

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

Vinodh Balakrishnan

Read only

Former Member
0 Likes
658

MOVE F1+10(5) TO F2

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

Read only

Former Member
0 Likes
658

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.

Read only

Former Member
0 Likes
658

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.