* OPEN DATASET gv_file_name FOR INPUT IN TEXT MODE ENCODING NON-UNICODE. "origin
OPEN DATASET gv_file_name FOR INPUT IN TEXT MODE
ENCODING UTF-8 SKIPPING BYTE-ORDER MARK.
*OPEN DATASET gv_file_name FOR INPUT IN LEGACY BINARY MODE CODE PAGE '8500'.
*OPEN DATASET gv_file_name FOR input IN LEGACY TEXT MODE BIG
*ENDIAN CODE PAGE '8500'. "test
*OPEN DATASET gv_file_name FOR INPUT IN TEXT MODE ENCODING DEFAULT. "test
*OPEN DATASET gv_file_name FOR INPUT IN TEXT MODE ENCODING utf-8. "test
삭제시에..
TRY.
EXEC SQL.
DELETE DATASET gv_file_name.
ENDEXEC.
CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref->get_text( ).
ENDTRY.
IF sy-subrc = 0.
* WRITE :/ 'Success : ' , gv_file_name.
ELSE.
* WRITE :/ 'Error! : ' , gv_file_name.
ENDIF.
혹은..
DATA : ret_var TYPE i,
filename_str type string.
filename_str = gv_file_name.
CALL METHOD cl_gui_frontend_services=>file_delete
EXPORTING
filename = filename_str
CHANGING
rc = ret_var
EXCEPTIONS
file_delete_failed = 1
cntl_error = 2
error_no_gui = 3
file_not_found = 4
access_denied = 5
unknown_error = 6
not_supported_by_gui = 7
wrong_parameter = 8
OTHERS = 9.
'ERP-SAP > ABAP' 카테고리의 다른 글
<ABAP> 라이센스 관리- 중복로그인 제한(Multi Logon) (0) | 2013.07.04 |
---|---|
<ABAP> 숫자 금액을 한글로 변환 -> 1320원 ->일천삼백이십원 (0) | 2013.07.02 |
<ABAP> OPEN DATASET 한글 깨짐 문제 (펌뱅킹, LG U+) (0) | 2013.05.16 |
<ABAP> AL11의 파일 디렉토리와 'RZL_READ_DIR_LOCAL' (0) | 2013.05.13 |
<ABAP> SAP standard menu bar에 리스트 추가 작업 파일 (add custom help menu) (0) | 2013.05.09 |