2007 Jan 29 8:50 PM
what sy-subrc do?whats the use of it
2007 Jan 29 8:55 PM
Hi,
It checks for the return value after a statement is executed.
If the prior statement executed successfully it will have a value 0, otherwise it would have a non-zero value.
Regards
Subramanian
2007 Jan 29 9:01 PM
hi,
its a system variable which is used to check whether a particular stmt was successful or not.
if sy-subrc = 0.-->it means the stmt was successful.
if sy-subrc has a non-zero value it means the stmt was unsuccessful.
regards,
priya.
2007 Jan 29 9:10 PM
Hi,
SAP provided us with predefined Data objects. One such object is SUBRC in the table SYST.
The purpose of this field to indicate success/failure of any action in SAP. After each statement in SAP is executed, the SY-SUBRC is set depending on the result of the statement. the SY-SUBRC can contain the following values.
0 - This value is set when the statement is executed successfully.
2 - This value is set when the statement is executed unsuccessfully.
4 - This value is set when the statement is executed unsuccessfully.
8 - This value is set when the statement is executed unsuccessfully.
Check the following link
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb304e358411d1829f0000e829fbfe/content.htm
Regards,
Vara
Message was edited by:
varaprasad bhagavatula
2007 Jan 29 9:44 PM
hi
itz a sys variable used to check whether particular operation is successful or not.
Jus chk the correponding statment key word documentation for the same.
Cheers,
Hakim
2007 Jan 30 4:44 AM
Hi,
hi,
SY-SUBRC is a system variable which is used to check a particular statement is successful or unsuccessful.
if SY-SUBRC = 0.-- means the statement is successful.
if SY-SUBRC = 2 or 4 or 8 or not equal to zero means the statement is unsuccessful.
please reward if useful.
2007 Jan 30 4:53 AM
Sy-subrc is a system variable that indicates the status of execution of a statement. A value of 0 indicates that the statement is successful and a non-zero value indicates an unsuccessful execution.
sy-subrc is also used to check the output of FMs where exceptions are being handled. The FM always returns the exception number defined inside the FM in the sy-subrc field.
Reward points if found useful..!
Cheers
Abhishek
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |