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: 

7 digit Value(1234567) how to move each digit value in each variable(v1..v7

former_member184112
Active Contributor
0 Kudos

Hi,

In Sap Script:

7 digit Value(1234567) how to move each digit value in each variable( 7 variablesvar1,var2,var3,....var7).

How it is possible in SAP Script..What is the Logic?

Thanks and Regards,

Prabhakar Dharmala

like this

Move 1 - var1, 2 - var2, 3 - var3 , 4 - var4, 5 - var5, 6 - var6, 7 - var7.

Edited by: Prabhakar Dharmala on Mar 31, 2008 11:01 AM

2 REPLIES 2

Former Member
0 Kudos

Hi,

One way of doing this is:

v_variable = '1234567'.

v_var1 = v_variable+0(1). "1

v_var2 = v_variable+1(1). "2

v_var3 = v_variable+2(1). "3

v_var4 = v_variable+3(1). "4

v_var5 = v_variable+4(1). "5

v_var6 = v_variable+5(1). "6

v_var7 = v_variable+6(1). "7

Reward if helpful

Thanks,

Anil

Former Member
0 Kudos

Hi,

var = '1234567'.

var1 = var1+0(1).

var2 = var1+1(1).

var3 = var1+2(1).

var4 = var1+3(1).

var5 = var1+4(1).

var6 = var1+5(1).

var7 = var1+6(1).

Regards,

V.Balaji

Reward if Usefull...

Edited by: Balaji V on Mar 31, 2008 7:59 AM