Wednesday, February 18, 2009

Interesting SAP JCo error

Exception Details:$Exception
Type conflict when calling a function module (field length).

Possible Source of Error:
Class Name:$Client
File Name:
Method Name: nativeExecute
Line Number: -2

Line Number -2? Those SAP guys sure are tricky with their coding before the file even starts.

BTW, SAP JCo is a major nightmare to get working. If somebody brings you a JCo project and says "this should be easy", my advice is to run away as fast as you can.

UPDATE: I solved this problem, no thanks to the error message. I was trying to pass in a field as an Export instead of an Import. Which makes perfect sense, expect the original VBScript/COM code that I am re-writing this from uses the call "[function].Exports()" for an import (and the code works!).