04-09-2008 1:46 PM
Hi all,
a function module is returning 1 as sy-subrc value.
does that mean that it couldnt execute properly because the values imported to the FM were not correct?
Exceptions 1,2,3 exist in this FM. Does the sy-subrc value represent this exception value ?
thanks
04-09-2008 1:52 PM
04-09-2008 1:52 PM
04-09-2008 1:53 PM
04-09-2008 1:53 PM
Hi,
Well, usually SY-SUBRC would be set to 1 when an exception of a function module of class/method is mapped to sy-subrc =1.
For example.........
call function 'ZTEST'
exceptions
not_found = 1
not_here = 2
not_there = 3.
case sy-subrc.
when '1'.
when '2'.
when '3'.
endcase.
Refer
https://forums.sdn.sap.com/click.jspa?searchID=10556063&messageID=3237483
Regards
Kiran
04-09-2008 1:59 PM
Hi
SY-SUBRC allways checks for the above statement is true or false
if it gives value as zero(0) then it is success
other wise it is failed that be 1 or 4 etc..
it allways returns the suuccess or failure of a statement which is above to it