2006 May 27 7:49 AM
hello
if operation is successfull, value of sy-subrc is 0 else 4
but why 4 only? not 2/3/5???//
plz help
aafaq
hello
if operation is successfull, value of sy-subrc is 0 else 4
but why 4 only? not 2/3/5???//
plz help
aafaq
2006 May 27 7:52 AM
Different values for sy-subrc are for different purpose.
Rest of the values are reserved for exception handlings.
Reward points if it helps.
2006 May 27 11:12 AM
subrc has been assigned diff value to make sure based on the kind of exception that occurs they can b catched in this field and based on the message for error handling can be invoked..remember while calling function module u r provided with 3,4 parameters and based on those values exceptions can be raised..
reward points if it helps
gunjan
2006 May 27 11:46 AM
HI,
<b>SY-SUBRC</b>
As with other ABAP/4 statements, the return code value in the system field SY-SUBRC indicates after each Open SQL operation whether or not the operation was successful. If an operation is successful, SY-SUBRC = 0. If an operation is unsuccessful SY-SUBRC <> 0
Regards,
Santosh
2006 May 27 8:31 AM
hi,
check this link
in some cases it will return 1, 2 and 3 also.
CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.
OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause
http://help.sap.com/saphelp_47x200/helpdata/en/7b/fb96c8882811d295a90000e8353423/frameset.htm
sudheer.A
Message was edited by: sudheer Addepalli
Message was edited by: sudheer Addepalli
2006 May 27 12:44 PM
HI
as an ABAP Developer you don't need to worry all these things.SAP will take care of all these return code values.Whatever SAP says regarding this jus we need to nod our heads..Dont spend time on this investigation...
Cheers,
Abdul
2006 May 27 1:50 PM
Hi !
Very often SY-SUBRC = 4 means ERROR and SY-SUBRC = 8 means "Warning".
The results of any command and function is explained in the online-help of the command.
Regards
Rainer
Some points would be nice if that helped a bit.
2006 May 28 10:16 PM
A non-zero value for sy-subrc doesn't necessarily mean that an operation 'failed'. It just gives you some information about the results of an operation. For example - did a read statement find anything or not.
As a programmer, you have control over sy-subrc and can set it yourself.
Rob
2007 Apr 12 1:26 PM