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: 

web service calling wrong version of RFM

Former Member
0 Kudos

I have a web service set up and it was working fine. I added some code to it, and transported the code to production, and the web service still seems to be calling the old code. None of the parameters (import export tables, etc) of the function module were changed. I just added a small chunk of code to select specific sales organizations. The code made it to production, and performs correctly if i call the function module in SE37. But the web service still seems to be executing the old version.

any ideas?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Was just the FM changed or also the web service?

Rob

17 REPLIES 17

Former Member
0 Kudos

Have you checked to see that it has been activated (transactions SICF)?

Rob

0 Kudos

yes, in fact, it said it was active, so we deactivated it and reactivated it (in each server), and nothing changed. Also, thinking it might be cached, we globally invalidated all cache. still calling the old code.

0 Kudos

Clearing the cache would have been my next suggestion.

Have you tried simply refreshing the screen?

Rob

0 Kudos

yes. in fact, the transport went through over a week ago. since we only have a single customer affected by the change, no one noticed it was not working until today.

I also just tried re-transporting the FM from development to production. still getting the old code.

0 Kudos

If there is only one version of the FM in production and it is active, then the problem would appear to be in the service, not the FM. Did you activate/deactivate/activate it as well?

Rob

GrahamRobbo
Active Contributor
0 Kudos

Hi Dave,

you could try restarting the ICM. You can do this from transaction SMICM.

Cheers

Graham Robbo

0 Kudos

i deactivated and reactivated the service, the function module, and now ICM.

Still, i get one result though SE37, and another via the test function of SOAmanager. It is still, i belive, calling the function module as it was before my last change.

I just can't seem to figure this one out. I thought it might be a security issue, to, but checked the Service user and the user i am using in SE37, and they have the same authorizations.

0 Kudos

this is still plaguing me. i put in a ticket to SAP a week ago, and have not heard a peep. Anybody have anything else i can try?

Former Member
0 Kudos

Was just the FM changed or also the web service?

Rob

0 Kudos

only the function module changed. just a couple of lines of logic. no changes to import, export, tables, etc....

0 Kudos

What happened when you tested this through the web in either the development or QA system?

Rob

0 Kudos

i was TOLD it was ok in QAS, but i just tested it and it is doing the same thing. I thought about maybe recreating the web service, but it seemed ridiculous that for adding a few lines of code to the function module, i would have to delete and recreate the web service, so i did not try that.

do you think maybe i have to delete and recreate the service from the function group again? that seems kind of whacky.

0 Kudos

OK - now I think there is an error in the FM. Can you debug the FM through the web?

Rob

0 Kudos

and this is where i get confused. Not that i doubt what you are saying, but the function works in SE37. It returns the correct result. Why it be calling a different set of code for the web service. I can debug the web service, and i will, but i dont understand how the code can be fine when run in SE37, and not when run from the web service. should it not be the same code?

0 Kudos

It should be calling the same code from wherever, but the results are different when called from the web service, so that is where you have to start.

Remember, that the problem may not be in your new code, but in the existing code and only shows up now because of the changes.

I'd make sure that the interface is filled correctly, even though I know that hasn't changed.

Rob

0 Kudos

Rob, You were a huge help, and i appreciate it. The issue was with one of the import parameters. SE37 automatically does the input conversion, whereas the web service does not. Once we put the input conversion exit into the function module, they both return the same result.

Thanks you again for all of your assistance!

0 Kudos

Glad to help.

I actually had a similar problem a few weeks ago. I created a remote enabled FM in our R/3 system that was called by a program in our SRM system. When I ran the FM in R/3 it worked, but from SRM, no joy.

Eventually, I found that I had mispelled a parameter in the calling program. Since, the FM didn't exist in SRM, the calling program couldn't report any syntax error or give a dump. I corrected the spelling and it finally worked.

Rob