cancel
Showing results for 
Search instead for 
Did you mean: 

JCo (in UDF) throws: "...uses or overrides a deprecated API."

Former Member
0 Kudos

Hi everybody,

when using JCO in UDF I get the error:

<b>MyMapping_.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 1 error</b>

Does anybody know how to solve the problem?

The problem occurs only when I try to access the tableParameters:

<i> codes = function.getTableParameterList().getTable("COMPANYCODE_LIST");</i>

Regards Mario

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mario,

With every latest Java version its APIs keep changing and some functions are removed or "deprecated", so if you are getting this error which means JRE you are using not have that function available so compile your code with Java -deprecation to suppress that error.

To check JRE version type Java - version on command prompt and then refer to Java API (also available online) to get detail about that particular function, otherwise you can also chose alternate function to achieve your programming objecting. I prefer if you see JCO API for help on this function.

Refer to sample code : http://www.sapdevelopment.co.uk/java/jco/jco_callfunc.htm

Regards,

Gourav

Former Member
0 Kudos

Hi Gourav,

where do I get the lastest JAVADOC (JCO API).

As I use the JCo in an UDF I have not set up a IDE like ECLIPSE.

So I need a JAVADOC.

Thanks regards Mario

Former Member
0 Kudos

Hi,

Here you can find comprehensive information on JCO:

http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/frameset.htm

Regards,

Gourav

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you all!

prateek
Active Contributor
0 Kudos

Are u sure u have imported all the corresponding jar files?

Regards,

Prateek