Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am getting below error while invoking customized function through JCo. Please see the image for input parameters and types.

com.sap.conn.jco.JCoException: (104) JCO_ERROR_SYSTEM_FAILURE: Exception condition "CNTL_ERROR" triggered

Below is the code snippet to assign values to input parameters to function and passing date and time values as string in format yyyyMMdd and HHmmss :

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);

Here is the error trace:

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

Function import parameter list and datatypes:

Your called RFM ZMARC_AUT10 threw an undeclared system exception CNTL_ERROR. You need to analyze the error in the ABAP system. Have a look into the dumps with transaction ST22 and/or debug your ABAP Remote Function Module. In general, I furthermore recommend to avoid throwing undeclared exceptions.

I can't be sure about the reason of the exception, since it is a custom rfc, but usually the CNTL_ERROR is related to the GUI objects call (ALV for example)

I believe you are trying to instantiate one of these objects, but via RFC you don't have a GUI available.

Please check the RFC code looking for a custom container or alv or similar

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.