Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 02:32 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 02:23 PM

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

    Regards,

    Prateek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 02:55 PM

    Thank you all!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.