met with a problem when I want to search for Material with Part Number.
Using the following code, no results are returned. The parameter "1788260211" is exist as it is from SAPGui.
....
JCO.Client client =null;
try{
IFunctionTemplate ftemplate=repository.getFunctionTemplate("BAPI_MATERIAL_GETLIST");
if(ftemplate!=null)
{
JCO.Function function=ftemplate.getFunction();
client=JCO.getClient(SID);
JCO.ParameterList input=function.getImportParameterList();
input.setValue(100,"MAXROWS");
JCO.Table partners = function.getTableParameterList().getTable("MANUFACTURERPARTNUMB");
partners.appendRow();
partners.setValue("1188220011","MANU_MAT");
partners.setValue("","MFR_NO");
client.execute(function);
function.writeXML("materialList.xml");
}
....
But when I set the both parameter empty
partners.setValue("","MANU_MAT");
partners.setValue("","MFR_NO");
there are some results.
anybody can tell me whether I use the BAPI,Table or parameter properly?
Thanks alot!