Monday, December 20, 2010
This sample program is used to find the next letter. For example, If you give 'X' on selection-screen, it displays 'Y' on output.
REPORT zvenkat_notepad4.
DATA: g_position    TYPE i,
g_next_letter TYPE c.
PARAMETERS p_given.

START-OF-SELECTION.
IF p_given = 'Z'.
WRITE 'A'.
ELSE.
FIND p_given IN sy-abcde IGNORING CASE MATCH OFFSET g_position.
g_position = g_position  + 1.
g_next_letter = sy-abcde+g_position(1).
WRITE / g_next_letter.
ENDIF

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.