on 09-25-2007 5:14 PM
I'm using Excel to upload some data into a custom transaction. My problem is that when there is an exceptlion in the RFC I can't seem to trap it. Basically I doing the following;
ReturnCode = objRFC.call
If not ReturnCode = "True" then
Message = objRFC.imports("E_MESSAGE_ERROR")
msgbox Message
End if
This doesn't work. Can someone please point me in the correct direction.
Thanks,
Bob
Hi Bob,
Personally I would try debugging the RFC from within SAP. To do this go into your RFC in SE37 and go to your source code. Then go to the menu option Utilities -> Settings. In the box that comes up goto the ABAP editor tab. You should see some more tabs further down the screen and click on the debugging tab. Make sure External Debugging is ticked. Then when you set a break point in your code you will get the option of turning on external debugging. Run your Excel macro and when SAP gets called then a SAP session should start up. You can then debug your code to see where the error is and why it isn't being reported. It might be the case that it is leaving the RFC before it hits the error handler.
I hope this helps.
Nath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.