Former Member

# increment of alphabets

Hi ,

I have to increment alphabet from 'a' to 'b' to 'c' and so on til 'z' with respect to different count value.How can i do it programatically.

Thanks

10|10000 characters needed characters exceeded

### Related questions

• Posted on Apr 26, 2007 at 11:50 AM

Hi,

Take a character variable of length 26 and include 'abcd..xyz'..

depending on your count you can assign the alphabet..

say

x = 'abcdefgh..xyz'.

y = x+0(1) = a,

y = x+2(1) = c and so on..

reward if useful,,

regards,

nazeer

10|10000 characters needed characters exceeded
• Former Member
Posted on Apr 26, 2007 at 11:58 AM

take the system variable SY-ABCDE

and take one character each time u increment

SY-ABCDE = abcd..................z

data : v_cnt type i value 0,

v_char(1).

v_char = SY-ABCDE+V_cnt(1).

Each time v_cnt get incremented the value of v_char will change from a - z

10|10000 characters needed characters exceeded
• Former Member
Posted on Apr 26, 2007 at 12:07 PM

Hai Abhishek Mishra,

Use

CHAR_TO_ASCII FM and then

Add 1 to it.(Use Some temparory number)

Pass this to :

ASCII_TO_CHAR.

Thats all.

Hope you now can do it.

Hope you got it.

Reward points if it helps you.

Regds,

Rama chary.Pammi

10|10000 characters needed characters exceeded
• Posted on Apr 26, 2007 at 12:13 PM

Hi

By adding the ASCII values you can do it na?

Regards,

Sreeram

10|10000 characters needed characters exceeded
• Former Member
Posted on Apr 26, 2007 at 12:16 PM

Hi

Try something like this:

```PARAMETERS: P_IN(1).

DATA: P_OUT(1),
V_NEXT TYPE I.

IF SY-ABCDE CS P_IN.
V_NEXT = SY-FDPOS + 1.
P_OUT = SY-ABCDE+V_NEXT(1).
WRITE P_OUT.
ENDIF.```

Max

10|10000 characters needed characters exceeded
• Former Member
Posted on Apr 26, 2007 at 12:48 PM

Hi,

using shift u can solve this problem

define a string with list of alphabets .

each time pick the first character from the string and shift the string circular so that it always gives correct sequence of alphabets

ex:

Data:l_string type string value 'abcdefghijklmnopqrstuvwxyz'.

do counter times.

shift l_string circular.

enddo.

write:/ l_string+0(1).

i hope this is helpful to u...

reward if needful...

Message was edited by:

ramesh kumar

10|10000 characters needed characters exceeded
• Former Member
Posted on Apr 26, 2007 at 01:40 PM

Hi abhishek..

You can do like this.

data:

w_ctr type i,

w_char.

<b>do 26 times.

w_ctr = sy-index - 1.

w_char = sy-abcde+w_ctr(1).

write: / w_char.

enddo.</b>