메뉴 건너뛰기

SAP 한국 커뮤니티

명령어 결과에 따른 SY-SUBRC

sapjoy 2014.09.16 13:56 조회 수 : 6984 추천:1

SY-SUBRC is a return code, set by the following ABAP statements.As a rule, if SY-SUBRC = 0, the statement was executed successfully.
1. ASSIGN sets SY-SUBRC to 0 if the field symbol assignment was possible, otherwise to 4.
2. AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the required authorization, otherwise to 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause of the authorization failure.
3. CALL DIALOG with USING sets SY-SUBRC to 0 if the processing is successful, otherwise to a value other than 0.
4. CALL FUNCTION sets SY-SUBRC in accordance with the defined exception handling.
5. CALL METHOD sets SY-SUBRC in accordance with the defined exception handling.
6. CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chooses Enter or Execute, and 4 if the user chooses Cancel.
7. CALL TRANSACTION with USING sets SY-SUBRC to 0 if the processing is successful, otherwise to a value other than 0.
8. CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC after the ENDCATCH statement if a system exception occurs. The value is set in the program.
9. COMMIT WORK sets SY-SUBRC to 0. COMMIT WORK AND WAIT sets SY-SUBRC to 0 if the update is successful, otherwise to a value other than 0.
10. COMMUNICATION INIT DESTINATION ... RETURNCODE sets SY-SUBRC as specified.
11. CONCATENATE sets SY-SUBRC to 0 if the result fits into the target variable, otherwise to 4.
12. CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled in the program.
13. CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object could be created, otherwise to 1, 2, or 3, depending on the cause.
14. DELETE sets SY-SUBRC to 0 if the operation is successful, otherwise to 4 or another value other than 0, depending on the cause.
15. DEMAND ... MESSAGES INTO sets SY-SUBRC to 0 if the message table is empty, otherwise to a value other than 0.
16. DESCRIBE LIST sets SY-SUBRC to 0 if the line or list exists, otherwise to 4 or 8.
17. EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in nearly all cases. It does, however, set SYSUBRC to 4 if no entry is read in a FETCH statement.
18. FETCH sets SY-SUBRC to 0 if at least one line was read, otherwise to 4.
19. GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if the generation was successful, otherwise to 8.
20. GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise to 4.
21. GET PARAMETER sets SY-SUBRC to 0 if a corresponding value exists in SAP memory, otherwise to 4.
22. IMPORT sets SY-SUBRC to 0 if the import is successful, otherwise to 4.
23. INSERT sets SY-SUBRC to 0 if the operation is successful, otherwise to 4.
24. LOAD REPORT sets SY-SUBRC to 0 if the operation is successful, otherwise to 4 or 8 depending on the cause of the error.
25. LOOP sets SY-SUBRC to 0 if there is at least one pass through the extract. Otherwise, it is set to a value other than 0.
26. LOOP AT sets SY-SUBRC to 0 if there is at least one loop pass through the internal table, otherwise to 4.
27. MODIFY sets SY-SUBRC to 0 if the operation is successful, otherwise to 4.
28. MODIFY LINE sets SY-SUBRC to 0 if a line in the list was changed, otherwise it sets it to a value other than 0.
29. MODIFY sets SY-SUBRC to 0 if the operation is successful, otherwise to 4.

30. OLE2 Automation, executed successfully, otherwise 1, 2, 3, or 4, depending on the cause of the error.
31. OPEN DATASET sets SY-SUBRC to 0 if the file could be opened, otherwise to 8.
32. Open SQL statements set SY-SUBRC to 0 if the operation is successful, otherwise to a value other than 0.
33. OVERLAY sets SY-SUBRC to 0 if at least one character is overlaid, otherwise to 4.
34. READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise to 4 or 8, depending on the cause of the error.
35. READ LINE sets SY-SUBRC to 0 if a list line exists, otherwise to a value other than 0.
36. READ TABLE sets SY-SUBRC to 0 if table lines are found, otherwise to 2, 4, or 8, depending on the context and cause of the error.
37. REPLACE sets SY-SUBRC to 0 if the search string was replaced, otherwise to a value other than 0.
38. SCROLL sets SY-SUBRC to 0 if the scrolling within the list was successful, otherwise to 4 or 8, depending on the cause.
39. SEARCH sets SY-SUBRC to 0 if the search string was found, otherwise to 4.
40. SELECT sets SY-SUBRC to 0 if at least one line was read, otherwise to 4, or possibly 8 in SELECT SINGLE FOR UPDATE.
41. SET COUNTRY sets SY-SUBRC if the country code exists in table T005X, otherwise to 4.
42. SET BIT sets SY-SUBRC to 0 if the bit could be set, otherwise to a value other than 0.
43. SET TITLEBAR sets SY-SUBRC to 0 if the title exists, otherwise to 4.
44. SHIFT ... UP TO sets SY-SUBRC to 0 if the position could be found within the string, otherwise to 4.
45. SPLIT sets SY-SUBRC to 0 if the sizes of the target fields are adequate, otherwise to 4.
46. UPDATE sets SY-SUBRC to 0 if the operation is successful, otherwise to 4.
47. WRITE ... TO sets SY-SUBRC to 0 if the assignment is successful, otherwise to 4.
번호 제목 글쓴이 날짜 조회 수
167 TABLE INDEX 추가 및 후속작업 [16] file 루베루베루베룹 2009.04.22 6669
166 특수 문자 표현 [8] ecbase 2006.12.02 6680
165 BAPI_PR_CREATE 구매요청 생성시에 사용하세요. 이렇게도 쓸 수 있군요. [1] 노름마치 2007.12.10 6684
164 자주 사용하는 시스템변수 [8] 열공아밥 2009.12.20 6715
163 유용한 Abap Sample Package [2] 양키(이경환) 2014.03.31 6720
162 LIKE (% _)의 사용법 [8] ecbase 2006.12.02 6736
161 Second index 생성시 MANDT 필드 필요 없다. [2] 모포 2012.05.08 6749
160 Difference between select single and up to 1 row [2] sapjoy 2006.12.12 6817
159 프로그램간 테이블 넘김 [6] ecbase 2006.12.02 6821
158 Email 전송 Sample [6] 양키(이경환) 2014.03.12 6828
157 [TIP] FILE_OPEN_DIALOG시 바탕화면을 기본경로로 설정하기 [16] file 고양이야옹 2010.06.29 6853
156 AT 의 사용법(LOOP) [19] ecbase 2006.12.02 6865
155 SAP 지뢰 찾기 [10] file 버미! 2010.06.09 6869
154 message table의 각 필드들을 모아서 하나의 문장으로 [4] 꿀단지 2011.10.11 6877
153 GUI_DOWNLOAD 펑션(메소드) 사용시 Leading Zero현상 해결방법 [3] 양키(이경환) 2014.02.17 6900
152 debug 시 문장 skip 요령 [36] 하마대왕 2013.10.04 6904
» 명령어 결과에 따른 SY-SUBRC [5] sapjoy 2014.09.16 6984
150 IE 9.0 설치 시 se80 다운되는 문제 해결 [5] Jey 2011.03.16 6998
149 SAPLINK - 소스 업&다운 프로그램 입니다. [5] file abaper_qj 2014.06.18 7000
148 문자열 자를 때 자르는 위치에 2BYTE문자가 있는지를 체크하는 방법입니다. [8] 꿈하루 2007.12.01 7066