Skip to Content
author's profile photo Former Member
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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • 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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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

    Add a comment
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.