on 03-06-2007 5:45 PM
hello all,
i'm using JCO to monitoring CCMS architecture; i need to read properties of each MTE of CCMS.
my problem is:
i have a TID set of value for an MTE and i want to get results from the bapi:
BAPI_SYSTEM_MTE_GETPERFCURVAL
my code:
nodes = table "TREE_NODES" resulting from BAPI_SYSTEM_MON_GETTREE call;
// set BAPITID structure as import param for bapi
IMetaData metaTid = myJCORepository.getStructureDefinition("BAPITID");
JCO.Structure struTid = new JCO.Structure(metaTid);
struTid.setValue(nodes.getString("MTSYSID"), "MTSYSID");
struTid.setValue(nodes.getString("MTCLASS"), "MTCLASS");
struTid.setValue(nodes.getString("MTNUMRANGE"),"MTNUMRANGE");
struTid.setValue(nodes.getString("MTMCNAME"), "MTNUMRANGE");
struTid.setValue(nodes.getString("MTUID"), "MTUID");
struTid.setValue(nodes.getString("MTINDEX"), "MTINDEX");
struTid.setValue(nodes.getString("EXTINDEX"), "EXTINDEX");
JCO.Function getPerfData = createFunction("BAPI_SYSTEM_MTE_GETPERFPROP");
if (getPerfData != null)
{
JCO.ParameterList input6 = getPerfData.getImportParameterList();
// input param:
input6.setValue(struTid, "TID") ;
input6.setValue(user, "EXTERNAL_USER_NAME");
super.mConnection.execute(getPerfData);
// leggo eventuali errori derivati dalla chiamata alla BAPI
returnStructure = null;
returnStructure = getPerfData.getExportParameterList ().getStructure("RETURN");
System.out.println( "BAPI_SYSTEM_MTE_GETPERFPROP RETURN : " + returnStructure.getString("TYPE") + " " +
returnStructure.getString("ID") + " " + returnStructure.getString("NUMBER") + " " +returnStructure.getString("MESSAGE"));
JCO.Structure propertiesStructure = getPerfData.getExportParameterList ().getStructure("PROPERTIES");
// at this point my code return:
(error type 'E')
RA 341 No additional information available (function BAPI_SYSTEM_MTE_GETPERFCURVAL)
XAL 1.0 documentation write:
RA 341 : An unknown problem occurred during the execution of the method.
any idea?
tx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello i have found a solution, i hope this will be helpful for anyone.
this is an example using html auto generated template.
1. method call
this.debugBAPI_SYSTEM_MTE_GETPERFCURVAL(
nodes.getString("MTSYSID")
,nodes.getString("MTCLASS")
,nodes.getString("MTNUMRANGE")
,nodes.getString("MTMCNAME")
,nodes.getString("MTUID")
,nodes.getString("MTINDEX")
,nodes.getString("EXTINDEX")) ;
2. method definition:
public void debugBAPI_SYSTEM_MTE_GETPERFCURVAL(String MTSYSID, String MTCLASS, String MTNUMRANGE, String MTMCNAME, String MTUID, String MTINDEX, String EXTINDEX)
{
System.out.println("debugBAPI_SYSTEM_MTE_GETPERFCURVAL") ;
JCO.Function function = mRepository.getFunctionTemplate("BAPI_SYSTEM_MTE_GETPERFCURVAL"). getFunction();
System.out.println("function : " + function) ;
JCO.ParameterList input2 = function.getImportParameterList();
JCO.Structure st = input2.getStructure("TID") ;
st.setValue(MTSYSID, "MTSYSID");
st.setValue(MTCLASS, "MTCLASS");
st.setValue(MTNUMRANGE, "MTNUMRANGE");
st.setValue(MTMCNAME, "MTMCNAME");
st.setValue(MTUID, "MTUID");
st.setValue(MTINDEX, "MTINDEX");
st.setValue(EXTINDEX, "EXTINDEX");
input2.setValue(<myR3user>, "EXTERNAL_USER_NAME");
mConnection.execute(function);
JCO.Structure currValStructure = function.getExportParameterList ().getStructure("CURRENT_VALUE");
System.out.println("currValStructure : " + currValStructure) ;
String oldMaxRows = JCO.getProperty("jco.html.table_max_rows");
JCO.setProperty("jco.html.table_max_rows", "99999");
currValStructure.writeHTML("c:
BAPI_SYSTEM_MTE_GETPERFCURVAL.html");
JCO.setProperty("jco.html.table_max_rows", oldMaxRows);
JCO.Structure returnStructure = function.getExportParameterList ().getStructure("RETURN");
System.out.println( "BAPI_SYSTEM_MTE_GETPERFCURVAL RETURN : " + returnStructure.getString("TYPE") + " " +
returnStructure.getString("ID") + " " +
returnStructure.getString("NUMBER") + " " + returnStructure.getString("MESSAGE"));
}
open c:\BAPI_SYSTEM_MTE_GETPERFCURVAL.html and then check the result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.