Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Cannot convert a value from type JCO.Structure to CHAR at field MATERIAL

Hi,gurus:

I created a program to test jco,but it threw the exception as follows:

Caught an exception:

com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Cannot convert a value from type JCO.Structure to CHAR at field MATERIAL

part of the code is below.

-


JCO.ParameterList input = function.getImportParameterList();

IMetaData metaMaterial = repository.getStructureDefinition("BAPIMATALL-MATERIAL");

JCO.Structure material = JCO.createStructure(metaMaterial);

input.setValue(material, "MATERIAL");

material.setValue('Z001', "MATERIAL");

material.setValue("THE MATERIAL WAS CHANGED", "MATL_DESC");

Edited by: xinjiang li on May 11, 2009 3:30 PM

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question