‎2009 Aug 24 7:13 AM
hi,
ihave written a FM for which there are no exceptions. after using this FM in the report i am checking for sy-subrc. like if sy-subrc = 0..then success else failure..but when i run SLIN i am getting error mesg saying sy-subrc will always be zero. how to handle this.
‎2009 Aug 24 7:40 AM
Hi,
You can add Exceptions to the function module which you are using.
Regards,
Rajitha.
‎2009 Aug 24 7:45 AM
Hi,
As because you created the function module , you can add exception also.
So I think if you add an exception and and after calling your FM check the SY-SUBRC issue will be solved.-
Regards
Pinaki
‎2009 Aug 24 7:51 AM
If you do not tell the caller if everything is ok or not what sense does it make to check sy-subrc?
- tell the caller if everything is ok or not (the only way to do that are exceptions)
- delete the check of sy.subrc afterwards
Anyhow, i feel a little bit like this is a kind of April Fool's joke: i would like to take a shower without getting wet.
‎2009 Aug 24 7:54 AM
Hi,
What is the purpose of using SY-SUBRC when you have not defined any exceptions (Not raising any exceptions) in the function module ?
Regards
‎2009 Oct 28 11:40 AM
‎2009 Oct 28 11:47 AM
with out exceptions we cant use Sy-subrc check.
2 options avalibale ..
1) define exceptions use sy-subrc according to that ..
2) If you are using table statements chekc the values of that
using intial or not initial.