Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error in slin

Former Member
0 Likes
797

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.

6 REPLIES 6
Read only

Former Member
0 Likes
754

Hi,

You can add Exceptions to the function module which you are using.

Regards,

Rajitha.

Read only

Former Member
0 Likes
754

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

Read only

rainer_hbenthal
Active Contributor
0 Likes
754

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.

Read only

Former Member
0 Likes
754

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

Read only

Former Member
0 Likes
754

thanks

Read only

kamesh_g
Contributor
0 Likes
754

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.