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

Increment the character

Former Member
0 Likes
834

Hi,

I want to increment the Character . e.g

A + 1 = B. Can any body tell me how it can be done?Saurabh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
710

IF sy-abcde CA lettre.

sy-fdpos = sy-fdpos + 1 .

lettre = sy-abcde+sy-fdpos(1).

ENDIF.

don't forget the reward plz

Hi,

I want to increment the Character . e.g

A + 1 = B. Can any body tell me how it can be done?Saurabh.

5 REPLIES 5
Read only

Former Member
0 Likes
711

IF sy-abcde CA lettre.

sy-fdpos = sy-fdpos + 1 .

lettre = sy-abcde+sy-fdpos(1).

ENDIF.

don't forget the reward plz

Read only

0 Likes
710

Is it solved now ?

Read only

0 Likes
710

Thanks a lot ,

Solution worked.

Regards

Saurabh.

Read only

Former Member
0 Likes
710

Check this program,

REPORT ZSRIM_TEMP5.

DATA : V_C1 TYPE C VALUE 'X',

V_POS TYPE I.

IF SY-ABCDE CS V_C1.

IF SY-FDPOS = 25.

*--I am assuming After 'Z', 'A' has to appear.

V_POS = 0.

ELSE.

*--increment to next character

V_POS = SY-FDPOS + 1.

ENDIF.

V_C1 = SY-ABCDE+V_POS.

ENDIF.

now V_C1 will have the next character in the alphabet

Message was edited by: Srikanth Kidambi Maruthi

added comments to the program

Message was edited by: Srikanth Kidambi Maruthi

Read only

Former Member
0 Likes
710

Thanks a lot STEPHEN ,

Solution worked.

Regards

Saurabh.