on 05-11-2009 8:29 AM
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
Hi,
Check by changing line
input.setValue(material, "MATERIAL");
to
input.setStructure(), if it is present
Regards,
Ganga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.