04-26-2007 12:46 PM
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
04-26-2007 12:50 PM
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
04-26-2007 12:58 PM
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
04-26-2007 1: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
04-26-2007 1:13 PM
04-26-2007 1: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
04-26-2007 1: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
04-26-2007 2: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>