Application Development 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: 

Function module ‘ISU_MR_ORDER_PREPARE’

Former Member
0 Kudos

The function module ‘ISU_MR_ORDER_PREPARE’ is supposed to return the meter reading orders according to input parameters set.

Only when the meter reading orders are read successfully sy-subrc value is to 0.

However for some reason this function module is setting sy-subrc value to zero even when no meter reading orders are fetched.

Is it a bug in FM?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

It appears to me that you need to act upon sy-subr > 0, and if it's zero, you need to look at the tables returned and decide what to do.    By supplying a set of parameters that are initial and blank tables, I'd expect zero return code and the same empty table.  Does the program check for available input before it calls the FM?

3 REPLIES 3

Former Member
0 Kudos

It appears to me that you need to act upon sy-subr > 0, and if it's zero, you need to look at the tables returned and decide what to do.    By supplying a set of parameters that are initial and blank tables, I'd expect zero return code and the same empty table.  Does the program check for available input before it calls the FM?

0 Kudos

Yes the program checks for availability of input parameters.
When there are no meter reading orders which match the criteria it should ideally
set sy-subrc value to zero.
But I see sy-subrc value is set to zero even when no meter reading orders are returned.
I have gone through FM but could not figure out why it would set sy-subrc to zero even when no Meter reading orders are found.

0 Kudos

"However for some reason this function module is setting sy-subrc value to zero even when no meter reading orders are fetched" - It's not documented any where that this function will return subrc <> 0 if it doesn't match you condition.

Better check for available BAPI's for same operation, which itself has a return parameter.