2007 Mar 27 6:19 AM
Can anyone tell me, how many values system variable SY-SUBRC may have.
And what are the significance of each values and at which condition, what value will be fired ?
2007 Mar 27 6:21 AM
Return Value
SY-SUBRC
Return value set by the following ABAP statements. In general, a content of 0 means that the statement was executed without problems.
ASSIGN sets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.
ASSIGN <dref>->* sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.
AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.
CALL DIALOG with USING sets SY-SUBRC to 0, if processing was successful, otherwise <>0.
CALL FUNCTION sets SY-SUBRC according to the exception handling.
CALL METHOD sets SY-SUBRC according to the exception handling.
CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.
CALL TRANSACTION with USING sets SY-SUBRC to 0 if processing was successful, otherwise <>0.
CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.
COMMIT WORK sets SY-SUBRC to 0.
COMMIT WORK AND WAIT sets SY-SUBRC to 0 if update was successful, otherwise <>0.
COMMUNICATION INIT DESTINATION RETURNCODE sets SY-SUBRC as specified.
CONCATENATE sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.
CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled.
CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.
DELETE sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or <> 0 depending on cause.
DEMAND MESSAGES INTO sets SY-SUBRC to 0 if a message table is empty, otherwise <> 0.
DESCRIBE LIST sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.
EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.
FETCH sets SY-SUBRC to 0 if at least one row was read, otherwise 4.
GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if generation was successful, otherwise 8.
GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.
GET PARAMETER sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
LOAD REPORT sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or 8 depending on cause.
LOOP sets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.
LOOP AT sets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
MODIFY LINE sets SY-SUBRC to 0 if list row was changed, otherwise <> 0.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.
OPEN DATASET sets SY-SUBRC to 0 if the file was opened, otherwise 8.
Open SQL commands set SY-SUBRC to 0 if operation was successful, otherwise <>0.
OVERLAY sets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.
READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.
READ LINE sets SY-SUBRC to 0 if list row exists, otherwise <> 0.
READ TABLE sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.
REPLACE sets SY-SUBRC to 0 if search string could be replaced, otherwise <> 0.
ROLLBACK WORK always sets SY-SUBRC to 0.
SCROLL sets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.
SEARCH sets SY-SUBRC to 0 if search string was found, otherwise 4.
SELECT sets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.
SET COUNTRY sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.
SET BIT sets SY-SUBRC to 0 if bit was set, otherwise <> 0.
SET TITLEBAR sets SY-SUBRC to 0 if title exists, otherwise 4.
SHIFT UP TO sets SY-SUBRC to 0 if position was found in character string, otherwise 4.
SPLIT sets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.
UPDATE sets SY-SUBRC to 0 if operation successful, otherwise 4.
WRITE TO sets SY-SUBRC to 0 if assignment successful, otherwise 4.
Regards,
Pavan P.
2007 Mar 27 6:22 AM
Hi,
Return value set by the following ABAP statements. In general, a content of 0 means that the statement was executed without problems.
<b>ASSIGN</b> sets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.
<b>ASSIGN <dref>->*</b> sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.
<b>AUTHORITY-CHECK</b> sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.
<b>CALL DIALOG with USING</b> sets SY-SUBRC to 0, if processing was successful, otherwise <>0.
<b>CALL FUNCTION</b> sets SY-SUBRC according to the exception handling.
<b>CALL METHOD</b> sets SY-SUBRC according to the exception handling.
<b>CALL SELECTION-SCREEN</b> sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.
<b>CALL TRANSACTION with USING</b> sets SY-SUBRC to 0 if processing was successful, otherwise <>0.
<b>CATCH SYSTEM-EXCEPTIONS</b> sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.
<b>COMMIT WORK</b> sets SY-SUBRC to 0.
<b>COMMIT WORK AND WAIT</b> sets SY-SUBRC to 0 if update was successful, otherwise <>0.
<b>COMMUNICATION INIT DESTINATION RETURNCODE</b> sets SY-SUBRC as specified.
<b>CONCATENATE</b> sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.
<b>CREATE OBJECT</b> sets SY-SUBRC if the exceptions of the instance constructor are handled.
<b>CREATE OBJECT</b> in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.
<b>DELETE</b> sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or <> 0 depending on cause.
<b>DEMAND MESSAGES INTO</b> sets SY-SUBRC to 0 if a message table is empty, otherwise <> 0.
<b>DESCRIBE LIST</b> sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.
<b>EXEC SQL - ENDEXEC</b> sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.
<b>FETCH</b> sets SY-SUBRC to 0 if at least one row was read, otherwise 4.
<b>GENERATE SUBROUTINE POOL</b> sets SY-SUBRC to 0 if generation was successful, otherwise 8.
<b>GET CURSOR</b> sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.
<b>GET PARAMETER</b> sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.
<b>IMPORT</b> sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
<b>IMPORT</b> sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
<b>LOAD REPORT</b> sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or 8 depending on cause.
<b>LOOP</b> sets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.
<b>LOOP AT</b> sets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.
<b>MODIFY</b> sets SY-SUBRC to 0 if operation was successful, otherwise 4.
<b>MODIFY LINE</b> sets SY-SUBRC to 0 if list row was changed, otherwise <> 0.
<b>MODIFY</b> sets SY-SUBRC to 0 if operation was successful, otherwise 4.
<b>OLE2 automation,</b> bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.
<b>OPEN DATASET</b> sets SY-SUBRC to 0 if the file was opened, otherwise 8.
<b>Open SQL</b> commands set SY-SUBRC to 0 if operation was successful, otherwise <>0.
<b>OVERLAY</b> sets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.
<b>READ DATASET</b> sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.
<b>READ LINE</b> sets SY-SUBRC to 0 if list row exists, otherwise <> 0.
<b>READ TABLE</b> sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.
<b>REPLACE</b> sets SY-SUBRC to 0 if search string could be replaced, otherwise <> 0.
<b>ROLLBACK</b> WORK always sets SY-SUBRC to 0.
<b>SCROLL</b> sets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.
<b>SEARCH</b> sets SY-SUBRC to 0 if search string was found, otherwise 4.
<b>SELECT</b> sets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.
<b>SET COUNTRY</b> sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.
<b>SET BIT</b> sets SY-SUBRC to 0 if bit was set, otherwise <> 0.
<b>SET TITLEBAR</b> sets SY-SUBRC to 0 if title exists, otherwise 4.
<b>SHIFT UP TO</b> sets SY-SUBRC to 0 if position was found in character string, otherwise 4.
<b>SPLIT</b> sets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.
<b>UPDATE</b> sets SY-SUBRC to 0 if operation successful, otherwise 4.
<b>WRITE TO</b> sets SY-SUBRC to 0 if assignment successful, otherwise 4.
Reward if helpful.........
2007 Mar 27 6:24 AM
Hi
Go through the following thread.
You will get sufficient information provided there.
/community [original link is broken]
threadID=354063&messageID=3201627#3201627
Reward if it helps you.
Regards,
Sandhya
2007 Mar 27 6:27 AM
It's a big list..
SY-SUBRC
Return value set by the following ABAP statements. In general, a content of 0 means that the statement was executed without problems.
ASSIGN sets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.
ASSIGN <dref>->* sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.
AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.
CALL DIALOG with USING sets SY-SUBRC to 0, if processing was successful, otherwise <>0.
CALL FUNCTION sets SY-SUBRC according to the exception handling.
CALL METHOD sets SY-SUBRC according to the exception handling.
CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.
CALL TRANSACTION with USING sets SY-SUBRC to 0 if processing was successful, otherwise <>0.
CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.
COMMIT WORK sets SY-SUBRC to 0.
COMMIT WORK AND WAIT sets SY-SUBRC to 0 if update was successful, otherwise <>0.
COMMUNICATION INIT DESTINATION RETURNCODE sets SY-SUBRC as specified.
CONCATENATE sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.
CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled.
CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.
DELETE sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or <> 0 depending on cause.
DEMAND MESSAGES INTO sets SY-SUBRC to 0 if a message table is empty, otherwise <> 0.
DESCRIBE LIST sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.
EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.
FETCH sets SY-SUBRC to 0 if at least one row was read, otherwise 4.
GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if generation was successful, otherwise 8.
GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.
GET PARAMETER sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
LOAD REPORT sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or 8 depending on cause.
LOOP sets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.
LOOP AT sets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
MODIFY LINE sets SY-SUBRC to 0 if list row was changed, otherwise <> 0.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.
OPEN DATASET sets SY-SUBRC to 0 if the file was opened, otherwise 8.
Open SQL commands set SY-SUBRC to 0 if operation was successful, otherwise <>0.
OVERLAY sets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.
READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.
READ LINE sets SY-SUBRC to 0 if list row exists, otherwise <> 0.
READ TABLE sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.
REPLACE sets SY-SUBRC to 0 if search string could be replaced, otherwise <> 0.
ROLLBACK WORK always sets SY-SUBRC to 0.
SCROLL sets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.
SEARCH sets SY-SUBRC to 0 if search string was found, otherwise 4.
SELECT sets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.
SET COUNTRY sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.
SET BIT sets SY-SUBRC to 0 if bit was set, otherwise <> 0.
SET TITLEBAR sets SY-SUBRC to 0 if title exists, otherwise 4.
SHIFT UP TO sets SY-SUBRC to 0 if position was found in character string, otherwise 4.
SPLIT sets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.
UPDATE sets SY-SUBRC to 0 if operation successful, otherwise 4.
WRITE TO sets SY-SUBRC to 0 if assignment successful, otherwise 4.
Reward if helpful....
2007 Mar 27 6:28 AM
hi,
see this thrid.
the values that have generally 0,4,8. Depending on context it will come.
but in case of function modules u can get any value whar ever u handle for exceptions.
SY-SUBRC
Return value set by the following ABAP statements. In general, a content of 0 means that the statement was executed without problems.
ASSIGN sets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.
ASSIGN <dref>->* sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.
AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.
CALL DIALOG with USING sets SY-SUBRC to 0, if processing was successful, otherwise <>0.
CALL FUNCTION sets SY-SUBRC according to the exception handling.
CALL METHOD sets SY-SUBRC according to the exception handling.
CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.
CALL TRANSACTION with USING sets SY-SUBRC to 0 if processing was successful, otherwise <>0.
CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.
COMMIT WORK sets SY-SUBRC to 0.
COMMIT WORK AND WAIT sets SY-SUBRC to 0 if update was successful, otherwise <>0.
COMMUNICATION INIT DESTINATION RETURNCODE sets SY-SUBRC as specified.
CONCATENATE sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.
CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled.
CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.
DELETE sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or <> 0 depending on cause.
DEMAND MESSAGES INTO sets SY-SUBRC to 0 if a message table is empty, otherwise <> 0.
DESCRIBE LIST sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.
EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.
FETCH sets SY-SUBRC to 0 if at least one row was read, otherwise 4.
GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if generation was successful, otherwise 8.
GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.
GET PARAMETER sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
LOAD REPORT sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or 8 depending on cause.
LOOP sets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.
LOOP AT sets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
MODIFY LINE sets SY-SUBRC to 0 if list row was changed, otherwise <> 0.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.
OPEN DATASET sets SY-SUBRC to 0 if the file was opened, otherwise 8.
Open SQL commands set SY-SUBRC to 0 if operation was successful, otherwise <>0.
OVERLAY sets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.
READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.
READ LINE sets SY-SUBRC to 0 if list row exists, otherwise <> 0.
READ TABLE sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.
REPLACE sets SY-SUBRC to 0 if search string could be replaced, otherwise <> 0.
ROLLBACK WORK always sets SY-SUBRC to 0.
SCROLL sets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.
SEARCH sets SY-SUBRC to 0 if search string was found, otherwise 4.
SELECT sets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.
SET COUNTRY sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.
SET BIT sets SY-SUBRC to 0 if bit was set, otherwise <> 0.
SET TITLEBAR sets SY-SUBRC to 0 if title exists, otherwise 4.
SHIFT UP TO sets SY-SUBRC to 0 if position was found in character string, otherwise 4.
SPLIT sets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.
UPDATE sets SY-SUBRC to 0 if operation successful, otherwise 4.
WRITE TO sets SY-SUBRC to 0 if assignment successful, otherwise 4.
for different statements
ASSIGN sets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.
ASSIGN <dref>->* sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.
AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.
CALL DIALOG with USING sets SY-SUBRC to 0, if processing was successful, otherwise <>0.
CALL FUNCTION sets SY-SUBRC according to the exception handling.
CALL METHOD sets SY-SUBRC according to the exception handling.
CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.
CALL TRANSACTION with USING sets SY-SUBRC to 0 if processing was successful, otherwise <>0.
CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.
COMMIT WORK sets SY-SUBRC to 0.
COMMIT WORK AND WAIT sets SY-SUBRC to 0 if update was successful, otherwise <>0.
COMMUNICATION INIT DESTINATION RETURNCODE sets SY-SUBRC as specified.
CONCATENATE sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.
CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled.
CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.
DELETE sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or <> 0 depending on cause.
DEMAND MESSAGES INTO sets SY-SUBRC to 0 if a message table is empty, otherwise <> 0.
DESCRIBE LIST sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.
EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.
FETCH sets SY-SUBRC to 0 if at least one row was read, otherwise 4.
GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if generation was successful, otherwise 8.
GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.
GET PARAMETER sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
LOAD REPORT sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or 8 depending on cause.
LOOP sets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.
LOOP AT sets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
MODIFY LINE sets SY-SUBRC to 0 if list row was changed, otherwise <> 0.
MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.
OPEN DATASET sets SY-SUBRC to 0 if the file was opened, otherwise 8.
Open SQL commands set SY-SUBRC to 0 if operation was successful, otherwise <>0.
OVERLAY sets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.
READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.
READ LINE sets SY-SUBRC to 0 if list row exists, otherwise <> 0.
READ TABLE sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.
REPLACE sets SY-SUBRC to 0 if search string could be replaced, otherwise <> 0.
ROLLBACK WORK always sets SY-SUBRC to 0.
SCROLL sets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.
SEARCH sets SY-SUBRC to 0 if search string was found, otherwise 4.
SELECT sets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.
SET COUNTRY sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.
SET BIT sets SY-SUBRC to 0 if bit was set, otherwise <> 0.
SET TITLEBAR sets SY-SUBRC to 0 if title exists, otherwise 4.
SHIFT UP TO sets SY-SUBRC to 0 if position was found in character string, otherwise 4.
SPLIT sets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.
UPDATE sets SY-SUBRC to 0 if operation successful, otherwise 4.
WRITE TO sets SY-SUBRC to 0 if assignment successful, otherwise 4.
Message was edited by:
sunil kumar
Message was edited by:
sunil kumar
2007 Mar 27 6:29 AM
Hi Sangram,
The SY-SUBRC will contain 0 when the above statement get successfully executed, if the statement is not successfully executed then it contains the value 4.
I think I have answered your doubt.
Thanks and regards
Vipin Das