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

Getting Price of material


I am using SAPJCO to get the price of a material and i set the import parameters as follows and i get the output as Table parameter.<b>The problem is i dont get a result when i execute the function and when i write to html it says <i>no fo records found 0</i> but when i execute with same values over sapgui tool its fetches the record with price</b>.Any ideas appreciated.

JCO.Function jcofunction = aConnector.createFunction ("ZZ1IF_FG001_002");

JCO.ParameterList input= jcofunction.getImportParameterList();

JCO.ParameterList tables=jcofunction.getTableParameterList();

JCO.ParameterList output=jcofunction.getExportParameterList();

input.setValue("000000000010045512","I_MATNR");//Material Number

Timestamp astamp=new Timestamp(Calendar.getInstance().getTimeInMillis());




System.out.println("OUT " +output.toString());

JCO.Table aTable=tables.getTable("T_KONP");

System.out.println("PRICE "+ aTable.getDouble("KBETR"));


System.out.println("result :" + aTable.toString());


Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2004 at 03:54 PM

    Hi Jakeer,

    on the first glance, the timestamp might be the reason. java.sql.Timestamp (i guess, you are using this, it's difficult to say without import statements) returns the ISO format "yyyy-MM-dd" on toString(). R/3 "timestamps" are expected in the format yyyyMMdd without the '-' normally. Remove the '-'s and see what happens.

    Hope that helps.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      The prob is solved,the problem occured bcoz the RFC function will work only with internal representation of material number and now this is resolved in RFC.