on 07-06-2009 6:29 PM
Hello Experts!
Please excuse me, if there has been already posted the same or similar question, but I have been looking for ages now without a result.
I am working on a Java-Project using the JCo 3.0. I would need to get a List of all available RFCs in our SAP-System.
Is there such a functionality? Is it built in in the Jco API (I just saw the getFunction(String) method but I would need kind of that but returning a list of Function names)? or is there a remote function in the sap-system that provides a list of all RFCs?
Thank you very much in advance!
Best regards,
Kamil
Him Kamil
I Think there are one RFC which return a list of RFC. I have test in ECC 6 and works fine.
The RFC name is RFC_FUNCTION_SEARCH. You can pass the wildcard * to search all the RFC's.
Regards
Marcos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anis,
Please find then code below
JCoConnection jcoCon = null;
jcoCon = getDefaultJCoConnection();
JCO.Function function = jcoCon.getJCoFunction(" RFC_FUNCTION_SEARCH");
// set the import values
JCO.ParameterList importParams = function.getImportParameterList();
importParams.setValue(FUNCNAME, "*");
importParams.setValue(GROUPNAME, "*");
// call the function
jcoCon.execute(function);
//get the return table
JCO.Table funcDetailsTable = function.getTableParameterList().getTable("FUNCTIONS");
int totalNoFunc = funcDetailsTable.getNumRows();
if (totalNoFunc > 0) {
for (int i = 0; i < totalNoFunc; i++) {
System.out.println("Function Name: "+totalNoFunc.getString("FUNCNAME"));
}
}
Thanks,
Hamendra
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.