We are having a BAPI that uploads the specified document to SAP.
The BAPI accept three parameters: ID, FILE_LOC and FOLDER_NAME. And I'm setting the values as follows in the JCo code:
JCO.ParameterList paramList = function.getImportParameterList();
paramList.setValue("101XS1", "EXTERNAL_ID");
paramList.setValue("tmp", "FOLDER_NAME");
paramList.setValue("D:/upload/foo.txt", "FILE_LOCATION");
But when I'm trying to execute the BAPI, am getting the following exception:
com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Exception condition "NOT_SUPPORTED_BY_GUI" raised.
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1242)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3816)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3261)
The same BAPI is working fine if I execute through thick client(SAP Logon). But through JCo, its giving this error.