Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_FIXEDASSET_GETLIST doesn't work well using SAPJco

fernandopavon
Member
0 Kudos
514

Hi

I'm trying to use BAPI BAPI_FIXEDASSET_GETLIST using SAPJco, but it doesn't work well. From transaction SE37 it works well, but using the same values in the table SELECTIONCRITERIA from Java program, the result is that any record was selected.

This is the Java code


		JCO.Function function = null;
		try{
			function = Asiento.createFunction(mRepository, "BAPI_FIXEDASSET_GETLIST");
		}
		catch (Exception e) {
			ret = 0;
		}
		if (function == null) {
			ret = 0;
		}
		function.getImportParameterList().setValue("EMVI", "COMPANYCODE");
		function.getImportParameterList().setValue("0", "MAXENTRIES");
		function.getImportParameterList().setValue("01", "DEPRECIATIONAREA");
		JCO.Structure rt = function.getImportParameterList().getStructure("REQUESTEDTABLESX");
		rt.setValue("X", "GENERALDATA");
		rt.setValue("X", "INVENTORY");
		rt.setValue("X", "POSTINGINFORMATION");
		rt.setValue("X", "TIMEDEPENDENTDATA");
		rt.setValue("X", "ALLOCATIONS");
		rt.setValue("X", "ORIGIN");
		rt.setValue("X", "INVESTACCTASSIGNMNT");
		rt.setValue("X", "NETWORTHVALUATION");
		rt.setValue("X", "REALESTATE");
		rt.setValue("X", "INSURANCE");
		rt.setValue("X", "LEASING");
		rt.setValue("X", "DEPRECIATIONAREAS");
		rt.setValue("X", "DEPRECIATIONAREAVALS");
		rt.setValue("X", "EXTENSIONOUT");
		JCO.Table tabla = function.getTableParameterList().getTable("SELECTIONCRITERIA");
		tabla.appendRow();
		tabla.setValue("GENERALDATA", "PARAMETER");
		tabla.setValue("ASSET", "FIELD");
		tabla.setValue("I", "SIGN");
		tabla.setValue("EQ", "OPTION");
		tabla.setValue("XXXXXXXXXXXX", "LOW");   
		mConnection.execute(function);

The asset that I'm trying to query exists.

Is I don't use the table, the result is the same. ¿Can anybody help me?

With regards

1 REPLY 1

Former Member
0 Kudos
71

With MAXENTRIES = 0 you dont get Data. This mus be 1 or greater