title: Getting JCO_ERROR_SYSTEM_FAILURE with SAP JCO call
body: <p>I am getting below error while invoking customized function through JCO. Please see the image for input params and types.</p>
  
  <pre><code>com.sap.conn.jco.JCoException: (104) JCO_ERROR_SYSTEM_FAILURE: Exception condition "CNTL_ERROR" triggered
  </code></pre>
  
  <p>Below is the code snippet to assign values to input parameters to function and passing date and time values as string in below format:</p>
  
  <p><strong>yyyyMMdd</strong>  and <strong>HHmmss</strong></p>
  
  <pre><code>JCoFunction function = destination.getRepository().getFunction("ZMARC_AUT10");
  JCoParameterList params = function.getImportParameterList();
  {
  params.setValue("I_DATEFROM",fromDate);
  params.setValue("I_TIMEFROM",fromTime);
  params.setValue("I_DATETO",toDate);
  params.setValue("I_TIMETO",toTime);
  params.setValue("I_USER", username);
  }
  </code></pre>
  
  <p>Here is the error trace:</p>
  
  <pre><code>Caused by: com.sap.conn.rfc.exceptions.RfcGetException: Exception condition 
  "CNTL_ERROR" triggered
  at com.sap.conn.rfc.engine.RfcImp.ab_rfcerror(RfcImp.java:1176)
  at com.sap.conn.rfc.engine.RfcGet.ab_rfcget(RfcGet.java:120)
  at com.sap.conn.rfc.engine.RfcRcv.ab_rfcreceive(RfcRcv.java:33)
  at com.sap.conn.rfc.engine.RfcIoOpenCntl.RfcReceive(RfcIoOpenCntl.java:1982)
  ... 45 more
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/B54PG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B54PG.png" alt="function import parameter list and datatypes"></a></p>