on 05-15-2007 12:10 PM
Hi experts.
We want to do a user defined function in message mapping that reads a value in R/3 table. R/3 table is created in XI r/3.
It´s possible?. How i can do it?.
Thanks for all.
yes it is possible by means of RFC lookup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts...
I solve my problem with an Abap Mapping. I acces via Abap Mapping to R/3 table and then, pass a normal message mapping to result variable.
thks for all.
Bye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Julian
For your scenario, u need to create an rfc in the R/3 system and call that RFC from a user-defined function in XI by using the RFC Lookup facility..
Check out this following code...
com.sap.mw.jco.*;
public String Get_Customerl(String a,String b,Container container){
//write your code here
JCO.Repository mRepository;
// Change the logon information to your own system/user
JCO.Client mConnection = JCO.createClient(
"300", // SAP client
"XYZ" , // userid
"XYZ", // password
"EN", // language
"66.248.225.116", // host name
"00" ); // 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("ZGET_MATERIAL");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( a , "CUSTOMER" );
input.setValue( b , "NAME" );
mConnection.execute( function );
String ret = function.getExportParameterList().getString( "CUST");
mConnection.disconnect();
return ret;
}
This takes the customer number and name as input and the rfc maps these values in the table and returns the customer number if it exists in the database...
Hope u find it useful
Regards,
Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julian,
U may find the solution to ur problem here
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julián,
look at this <a href="https://answers.sap.com/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
Regards,
Manuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julian / Hola Julian
As most of people says, in special Mr XI Man, Michal Krawczyk, is dangerous to use these R/3 lookups in message mapping to R3. If you get errors is difficult to view them.
Instead of that i suggest you to use a send/receive step using RFC's and if your SAP R/3 backend is a WAS 6.20 or above, try with ABAP Proxy.
___________________
Hola Julian.
Los Lookups de XI a R3 no son aconsejables ya que si petan, no va a haber forma de monitorizarlos. Yo los he probado y funcionan, pero no me convencen mucho. Para estos casos y si estás con una 6.20 o superior, utiliza ABAP Proxy o RFC normales, pasándole datos y recuperándolos y luego haciendo un nuevo mapeo. Todo esto es lo que leí en la SDN cuando tuve que hacer algo parecido.
Por cierto, eres Julian el amigo de Eduard?
Un saludo, Regards,
Inigo.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.