
https://exercism.org/tracks/abap/exercises/reverse-string
Reverse String in ABAP on Exercism
Can you solve Reverse String in ABAP? Improve your ABAP skills with support from our world-class team of mentors.
exercism.org
알고보니 엄청 쉬운 방법이 있었다..ㅎ
내가 쓴 답변
CLASS zcl_reverse_string DEFINITION PUBLIC.
PUBLIC SECTION.
DATA : GV_LEN TYPE I.
METHODS reverse_string
IMPORTING
input TYPE string
RETURNING
VALUE(result) TYPE string.
ENDCLASS.
CLASS zcl_reverse_string IMPLEMENTATION.
METHOD reverse_string.
" Please complete the implementation of the reverse_string method
GV_LEN = STRLEN( INPUT ) - 1.
CLEAR RESULT.
DO GV_LEN + 1 TIMES.
result = result && input+GV_LEN(1).
GV_LEN = GV_LEN - 1.
ENDDO.
ENDMETHOD.
ENDCLASS.
다른 사람의 모범답변
METHOD reverse_string.
result = reverse( input ).
ENDMETHOD.
| SAP ABAP - RFC 개발 (0) | 2025.09.19 |
|---|---|
| SAP ABAP - BAdI 추가 (0) | 2024.09.13 |
| SAP ABAP - OOP Class 연습 #2 문자열 점수 매기기(Scrabble Score) (0) | 2024.01.12 |
| SAP ABAP - OOP Class 연습 #1 헬로 월드(Hello, World!) (0) | 2024.01.09 |
| SAP ABAP - 다른 SAP끼리 데이터 송수신하는 RFC 펑션 프로그램 (1) | 2023.08.23 |