Code :
REPORT ZVP_PALINDROME.
PARAMETERS: S_NUM TYPE CHAR10.
DATA: REVERSE TYPE CHAR10.
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
STRING = S_NUM
LANG = SY-LANGU
IMPORTING
RSTRING = REVERSE
* EXCEPTIONS
* TOO_SMALL = 1
* OTHERS = 2
.
IF S_NUM EQ REVERSE.
WRITE:/ 'PALINDROME'.
ELSE.
WRITE:/ 'NOT PALINDROME'.
ENDIF.
Output :
IDE Used To Test This Code : ABAP Editor.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
Post a Comment