SAP JCo에서 작업하고 있습니다. 및 DATE '12 .16.2016 설정하는 동안 예외를 받고 'com.sap.conn.jco.ConversionException : (122) JCO_ERROR_CONVERSION : 문자열을 날짜 필드
예외 : com.sap.conn.jco.ConversionException : (122) JCO_ERROR_CONVERSION : '12 .16.2016의 값을 변환 할 수 없습니다'java.lang.String 타입에서 DATE 필드에서 STRUCTURE로 이동합니다.
내 코드 JCO.Functions해야 문자열의
public static void YP_ECA_VIN(String date, String plant) throws Exception {
try {
JCoDestination destination;
JCoRepository sapRepository;
destination = JCoDestinationManager.getDestination(DST1);
JCoDestinationManager.getDestination(DST1);
JCoContext.begin(destination);
sapRepository = destination.getRepository();
if (sapRepository == null) {
System.out.println("Couldn't get repository!");
JCoContext.end(destination);
System.exit(0);
}
JCoFunctionTemplate template = sapRepository.getFunctionTemplate("YP_ECA_VIN");
if (template == null) {
System.out.println("Couldn't get template for YP_ECA_VIN!");
} else {
JCoFunction function = template.getFunction();
function.getImportParameterList().setValue("DATE", "12.16.2016");
function.getImportParameterList().setValue("PLANT", plant);
function.execute(destination);
int numTRows = 0;
int numTCoulmns = 0;
JCoTable table = function.getExportParameterList().getTable("OUTPUT");
// some code
}
기능 모듈의 서명도 게시합니다. – vwegert