‎2007 Dec 11 5:08 AM
‎2007 Dec 11 5:15 AM
Hi Kushagra,
Inside the loop, the value of sy-subrc always remains zero..
Reward points, if useful.
Regards,
Nitin.
‎2007 Dec 11 5:10 AM
‎2007 Dec 11 5:13 AM
Hi Kushagra
Once you enter the LOOP, it means a record is found and so SY-SUBRC will always be 0 inside the LOOP.
Merlin
‎2007 Dec 11 5:15 AM
Hi Kushagra,
Inside the loop, the value of sy-subrc always remains zero..
Reward points, if useful.
Regards,
Nitin.
‎2007 Dec 11 5:16 AM
HI
SY-SUBRC VALUE ALLWAYS DEPENDS UP ON THE CONIDTION
POSSIBLE SY-SUBRC VALUES IS ZERO OR ANY VALUE
IF ITS VALUE IS ZERO MEANS ITS VALUE IS TRUE
IF ITS VALUE IS OTHER THAN ZERO MEANS ITS A FAILURE
THE VALUE ALLWAYS DEPENDS ON THE ABOVE CONDITION , I.E WHAT EVER THE LINE ABOVE THE SY-SUBRC IT CONSIDERS THAT CONDITION
REWARD IF USEFUL
‎2007 Dec 11 5:17 AM
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
‎2007 Dec 11 5:17 AM
Hi,
Its a return code n its depends on condtion which ur passing.
If condtion is true then sy-subrc is 0 otherwise ioots not zero.
Reagrds,
Prashant