STRING 의 LENGTH 구하기
```
L_LEN = **STRLEN**( L_STRING ).
```
COMMA (,) , 다른 표시들 교체 할때 쓰는
```
REPLACE '$' WITH '' INTO L_MONEY.
```
공백 제거
```
CONDENSE L_MONEY NO-GAPS.
```
앞자리 0 채우기
```
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_DATA1
IMPORTING
OUTPUT = P_DATA2.
```
0빼기
```
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = P_DATA1
IMPORTING
OUTPUT = P_DATA2.
```
NUMERIC CHECK
```
FORM NUMC_CHK USING P_DATA
CHANGING P_TYPE.
CLEAR P_TYPE.
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
STRING_IN = P_DATA
IMPORTING
HTYPE = P_TYPE.
ENDFORM. " NUMC_CHK
RETURN = CHAR, NUMC
```
*&& 파일 명과 경로 알아내기
```
FORM GET_FILENAME USING P_DIR
CHANGING P_NAME
P_PATH.
DATA: L_FULLNAME LIKE RLGRAP-FILENAME,
L_FILENAME LIKE RLGRAP-FILENAME,
L_FILEPATH LIKE RLGRAP-FILENAME.
L_FULLNAME = P_DIR.
CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
EXPORTING
FULL_NAME = L_FULLNAME
IMPORTING
STRIPPED_NAME = L_FILENAME
FILE_PATH = L_FILEPATH.
P_NAME = L_FILENAME.
P_PATH = L_FILEPATH.
ENDFORM. " GET_FILENAME
```
메세지
```
MESSAGE E000 WITH 'There is no selected data.'.
MESSAGE S000(ID) WITH 'TEXT'.
MESSAGE E000(ZMM01) WITH LV_LGORT.
```
나누기
```
SPLIT L_DATE_SPLIT AT '/' INTO L_DATE L_MONTH L_YEAR.
```
'ABAP' 카테고리의 다른 글
[ABAP] 동적 Dynamic select (0) | 2024.11.27 |
---|---|
[ABAP] 문자열 자릿수만큼 split (0) | 2024.11.27 |
[Field symbol] 가로데이터->세로로 (0) | 2023.03.10 |
[New syntax] 정리 (0) | 2023.03.02 |
[New Syntax] COLLECT (0) | 2023.03.02 |
댓글