on 09-03-2009 10:05 AM
I am using com.sap.mw.jco for connecting to backend. I want to retrieve the values which are returned by a structure which is a part of export parameters for the RFC.
I am using the code as shown bellow:
-
IRepository repository = null;
JCO.Client client = null;
JCO.addClientPool( SID,MAX_NO_CONNECTION,CLIENT,USERID,PASSWORD,LANGUAGE,HOST_NAME,SYS_ID);
repository = JCO.createRepository("SUPPLIERID", "ISU");
JCO.Function function = null;
IFunctionTemplate functionTemplate = repository.getFunctionTemplate("BAPI_COMPANY_GETDETAIL");
function = functionTemplate.getFunction();
client = JCO.getClient(SID);
JCO.Field objUserIDField = input.getField("COMPANYID");
objUserIDField.setValue("1100");
//For this company id I have values in the backend
client.execute(function);
JCO.Structure companyList = null;
companyList = function.getExportParameterList().getStructure("COMPANY_DETAIL");
-
Now I need to get the values passed on by this structure can you please guide me how to do this
Thanks
hi Puneet,
You can use getString("Fieldname") on the structure to get field value.
[JCO API Link|https://help.sap.com/javadocs/NW04S/current/jc/index.html]
[JCOTutoral|http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25]
Hope this helps!
Monalisa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.