on 06-22-2009 3:23 PM
Dear experts,
i have a file to file scenario where in the graphical mapping i have to write a RFC lookup to get some data from R3 system ...
i have written the following RFC lookup and it is working fine....
java.lang.;java.util.;com.sap.aii.mapping.lookup.;java.lang.reflect.;com.sap.mw.jco.;java.io.;
JCO.Repository mRepository;
// Change the logon information to your own system/user
JCO.Client mConnection = JCO.createClient(
"500", // SAP client
"test", // userid
"temp", // password
"EN", // language
"gadrp700", // host name
"03" ); // system number
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "SAPLookup", mConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("Zlookup_test");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( a , "REC" );
mConnection.execute( function );
String ret = function.getExportParameterList().getString( "PAR" );
mConnection.disconnect();
return ret;
only problem is i have to hardcode the system details user id and pwd...i know that i can create a business service and RFC communication channel which i have done ...but i do not know what addition needs to be done in the code...can you pls help me regarding what addition needs to be done in code...
my business service name is : BS_test
RFC channels name is : RFC_channel.
Edited by: Ravi Mehta on Jun 22, 2009 4:23 PM
Hi Ravi,
You are doing a RFC lookup using JCO connection. It is very old. So please see this help and do accordingly. In this you dont need to hardcode anything. For business system, you can do a UDF for getting the system name. So based upon the system name do a Fix Values. Only thing you need to maintain is the communication channel when you transport.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do something like this:
If your service is a receiver or a sender, use the node Receiver /sender from the constants options. Create value mapping for your service, RFC CC pair in ID and use this in the mapping and give these two as inputs to your lookup.
Regards,
Merrilly
Edited by: Merrilly Don Thomas on Jun 22, 2009 8:39 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.