RFC Adapter - Java Mapping
Hello
is it possible to map all incoming calls from SAP -> XI (RFC) to a single Java Mapping
in detail:
- in SAP (ABAP) i call a number of remote function modules with the same RFC destination
- in XI i'd like to map all these calls to a single java mapping (i think this should be possible with RFC sender adapter)
if it is possible, maybe someone could me give me advise how to implement this in XI or some useful links
thanks
franz
Hi,
You can go for BPM.
So you can "collect" all messages coming from Sender in collect step.
Then do the Transformation where you can give your java mapping.
Regards,
Akshay Jamgaonakr.
Similar Messages
-
RFC Sender Adapter - Java Mapping
Hello
i want to make a call from R3 -> XI via the RFC Sender Adapter, process the R3 Call inside a Java Mapping and return to results to R3 (synchronous RFC call)
how do i setup Interface and Message mappings and the corresponding sender and receiver agreements?
regards franzi've got some java services from a sap business connector application
these java services where called from R3 -> SAP/BC, BC did some proecessing and filled return parameters (synchronous RFC call from R3 -> SAP BC)
I now have to convert these SAP BC Services to XI Services because SAP BC won't be supported any more
any ideas how to do do this? -
Problem in java mapping - request reject when enter to the XI
hello
I have WS 2 RFC with JAVA MAPPING. I try to run it and recieve an error in the sxmb:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
<SAP:P1>Exception in method processFunction.</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>"SYSTEM FAILURE" during JCo call. Exception in method processFunction.</SAP:Stack>
<SAP:Retry>N</SAP:Retry>
</SAP:Error>
in the xml spy the return is:
<text><![CDATA[
com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:JCO_SYSTEM_FAILURE:
at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)
at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:133)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:850)
at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
]]></text>
any suggestion why the xi doesnt recieve the request:
Thanks
KfirTest RFC destination AI_RUNTIME_JCOSERVER. You may delete and recreate it.
how exactly do I test it? in the XID or the SAP DEV?
how can I delete and recreate?
since I never did it, details will be appreciated.
Kfir -
File to Idoc : Java Mapping
Hi Experts,
The scenario is file to idoc. In the file i'll be getting name,value pairs. For ex:
Structure is
MT
....Root(1..unbounded)
............Name
............Value
File contains:
Vishal....1
Raj.........2
RFC......10
Rahul.....20
Azhar....15 and so on..
I need to loop through the file. When Name="RFC", I need to make an RFC call with Value as it's input. RFC returns 4 values which will be used for mapping.
Then I need to continue looping through the file. On encountering a particular Name, I need to map corresponding Value to target field.
For this, I should have 2 mappings. One to read the file and the other for mapping. I've never used RFC and Java mapping, Can someone provide me a link or a solution for this?
Thanks,
VishalHi,
You can do this using a UDF.
first let the source message contain first line and last line which you want to eliminate.
change the context of the Value to MT ..
start a for loop in UDF ignoring first & last line like
for(int i = 1; i< input.length() - 1; i++) // here i = 1 & not zero & input length is -1 so that first & last field eliminates
//carry on string operation to separate name & value on delimeter space
String name = input<i>.subString(0,.... to the indexOf space);
//similar for value also....
now you have name & value
check for name == 0052
if(name == 0052)
perform rfc lookup
else -
Without BPM:Call RFC using JCO in interface mapping using java mapping
Hi all
I have a very small scenario where REQUEST from the customer comes via Web Service all i have to do is to read the request using SOAP adapter and call an interface mapping(lets say the name is IM_TEST) inside which there is a JAVA MAPPING program written which will call an RFC in CRM using JCO.
Now this was really simple and i cud test the Interface mapping successfully, but the problem is when loading the scenario in integration directory i have certain things to do
1. to set the SENDER AGREEMENT which i did correctly
2. set the RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT now here i am stuck because there is no receiver in my case as the RFC is called inside the mapping only.
can i call one more message mapping in IM_TEST which will write file onto the XI directory and then in RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT i can mention the reciever as FTP.
I tried it but i gives the following error
Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_TEST_WRITE_FILE: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Parsing an empty source. Root element expected!
Please help me how to complete the scenario so that customer can run it end to end.
<REMOVED BY MODERATOR>
Edited by: Prateek Raj Srivastava on May 12, 2010 1:44 PMStefen
What do i do then...actually this is the project requirement. They want a very fast response from PI and thats why they wnt us to omit BPM and the Graphical mapping from the scenario.
I am able to test the interface mapping which calls the the Java mapping inside which there is an RFC call, but i cannot implement it end - to - end as there is no receiver business system in this case. The only business system i have is the SOAP sender.
I am really troubled now, please help me with a solution.
Is there any other possible way through which the process can become very fast whic hcan meet their requirement.
Regards
Naina -
Java Mapping (not UDF) and Adapter-Specific Message Attributes
Hello everybody,
is it possible to create an Adapter-Specific Message Attributes in a java Mapping?
I found in the SAP Help that the API com.sap.aii.mapping.api.DynamicConfiguration allows only to read, change or delete the attributes.
best regards.
Adnane ElgouteHi,
try the follwoing code
import com.sap.aii.mapping.api.*;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
public class JavaProgram
implements StreamTransformation
public JavaProgram()
public void setParameter(Map map)
param = map;
if(param == null)
param = new HashMap();
public void execute(InputStream inputstream, OutputStream outputstream)
try
DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");
DynamicConfigurationKey dynamicconfigurationkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
String s = dynamicconfiguration.get(dynamicconfigurationkey);
//Your logic
catch(Throwable throwable)
throwable.printStackTrace();
private Map param; -
How to set adapter specific message attributes on Pi 7.1 inside a Java map.
Hello,
how can I set adapter specific message attributes in a Java mapping on PI 7.1.? The TransformationInput grants access to the DynamicConfiguration but the TransformationOutput doesn't. I have found threads refering to the old way of implementing Java mappings (e.g. Get dynamic filename in a Java Mapping (NOT UDF)). But there doesn't seem to be one refering to the actual PI.
Kind regards,
HeikoUsing DynamicConfiguration from the TransformationInput works.
-
Read Filename form Adapter-Specific Message Attributes in Java Mapping
Hi,
I have scenario File to Mail adapter. How can i read filename from Adapter-Specific Message Attributes
in java mapping.
Thank you and Best regards
FernandHello Fernand,
Are u using DOM or SAX parser?
In any case just put the Dynamic config code in the execute function or the other option is to define it as a private functionand call it in the execute,My personal advice would be the former.
Just put this code in ur java mapping
As fellow sdn ers have mentioned there is no need of the container method,just initialise the set param method and use it in the dynamice config code as follows
public class YourClass implements StreamTransformation
private Map map;
public void setParameter(Map param)
map = param;
public void execute(InputStream in, OutputStream out) throws StreamTransformationException
DynamicConfiguration conf =(DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// read value
File = conf.get(KEY_FILENAME);
Now just call File in the mapping program,
Should help u out
Regards,
Tauseef -
XI Mail Adapter: sending emails with attachment with help of java mapping
Hi ,
On trying out the scenerio mentioned in the blog, using the java mapping provided
"XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
The scenerio works just fine.
But the payload as the content of the attachment is not getting generated in proper XML format.
I suppose it's because of the replace special characters code part..
Can anyone help me state the modification required in the code.
Thanks!
Regards,
Faria MithaniIt might be a codepage issue. Is your original payload UTF-8?
-
RFC Lookup using Java Mapping program - Examples
Dear Experts,
I am working on a scenario which is using 1:N mapping. For deciding the target message I have to use RFC Lookup to call the backend ERP system and there are 2 ERP systems involved in this integration. As I am using Java Mapping and never did a RFC Lookup in Java. I kindly request you to give me some examples which I could use for my RFC calls in my Java Mapping. Simple example will do.
Client is adamant to use Java mapping, I could achieve this easily using XSLT or Graphical Mapping.
Advance Thanks,
PradeepHello,
why don't you use Extended Receiver Determination Defining Extended (Dynamic) Receiver Determination - Integration Directory - SAP Library?
What you can do is create a Message Mapping between your source message and Receivers message type. In this message mapping you can use your RFC to generate the target message.
For example, lets say we have the function ZFM_GET_INTERFACE_INFO used to generate the List of Receivers given a source message. You could create a Message Mapping as below:
In this case, the RFCLookup box look as below:
The receiver determination configuration would look as follows:
Afterwards, you will need two specific message mappings for the two ERP systems.
Summarizing, you'll need:
1.- A Message Mapping: Source Message to Receivers Message Type (This one uses the RFC Lookup)
2.- A Message Mapping: Source Message to Target Message for ERP 1
3.- A Message Mapping: Source Message to Target Message for ERP 2
In Integration Directory you'll have 1 Receiver Determination(Source system, Target System determined Dynamically) and 2 Interface Determinations (Source System to ERP1, Source System to ERP2), etc.
I hope you find it useful.
Regards! -
Java Mapping Or Adapter Module for MultiLevel File Content Conversion ??
Hi Experts,
Hi All,
As we all know file content conversion cannot parse more than three level even if we use FCC paramenters or MessageTransform Bean /StrictXmlToPlain Bean.
Currently i am facing an scenario where i can expect an content coversion with four or five levels.
for ex.
Target Message Looks like
Header(0..1)
|_____X
|_____Y
|_____Detail(0.n)
|____A
|____B
|____SubDetail(0.n)
|_____Trailer(0.n)
|______rec1
|______rec2
|______rec3(0..n)
|______Subrec1
|______Subrec2
So my question how can i do the FixedLength/CSV in the target system ???
Shall i do java mapping ? if yes then any code example relevant to this type of scenario
Shall i do adapter module development ?if yes then any code example relevant to this type of scenario
Thanks In Advance
Ronit MishraTarget Message Looks like
Header(0..1)----
Level 1
|_____X
|_____Y
|_____Detail(0.n)----
Level 2
|____A
|____B
|____SubDetail(0.n)----
Level 3
|_____Trailer(0.n)----
Level 4
|______rec1
|______rec2
|______rec3(0..n)----
Level 5
|______Subrec1
|______Subrec2 -
Webservice to RFC Scenario - Through Java Mapping
Hello All,
In my integration scenario, I will receive a request from a webservice consumer. The webservice is my outbound interface.
Now I have to write a Java Mapping for it because a similar interface (file to RFC) has been implemented using it and the customer wants minimum deviation from that functionality.
One question, that I have at this point in time is:
I must define a Java class that implements the Java interface com.sap.aii.mapping.api.StreamTransformation. This interface has two methods, one of them is:
public void execute(java.io.InputStream in, java.io.OutputStream out). In the existing interface the InputStream object say 'input' has been initialized to FileInputStream:
InputStream in = new FileInputStream(new File("Sample7.xml"));
What shall I initialize it to in my case? One probable is a InputSource, but does the execute method accept an InputSource?
Please help,
Regards,
VarunHello Jose,
Thanks for your reply, but what I have mentioned above is how it is being done in a similar interface. That being a file to RFC interface, it makes sense to initialize 'in' with the file name.
But if you mean that I do not need to initialize in my case (Webservice to RFC), then I'll surely give it a try and if useful, will get back to you.
Thanks again,
Varun -
Cannot resovle the Symbol error in UDF - Java mapping - RFC Lookup ?
Hi Friends ,
We are working on Java mapping - UDF for RFC Lookup . It is giving the Cannot resolve Symbol for all imported archive java class files even if we give again all imported files in import section of UDF we are still getting the same cannot resolve error .
We are using SP 12 of XI 3.0 . What could be the reason ?
Thanks.,
V.RangarajanHi,
Can you try to open imported archive in IR and check if the path(folder structure like com.abc.xyz.etc) for classes is same as in import statement in UDF.Since we had experienced the same problem.
Thanks.
Regards,
Shweta -
RFC response from Java mapping
Guys,
I am RFC response in my java mapping as < & >. Any ideas why and how we can make it to get in xml < > format. The problem is parser does not identify this format.
<?xml version="1.0" encoding="UTF-8"?><rfc:BAPI_COMPANYCODE_GETDETAIL.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><COMPANYCODE_ADDRESS><ADDR_NO></ADDR_NO><FORMOFADDR></FORMOFADDR><NAME></NAME><NAME_2></NAME_2><NAME_3></NAME_3><NAME_4></NAME_4><C_O_NAME></C_O_NAME><CITY></CITY><DISTRICT></DISTRICT><CITY_NO></CITY_NO><POSTL_COD1></POSTL_COD1><POSTL_COD2></POSTL_COD2><POSTL_COD3></POSTL_COD3><PO_BOX></PO_BOX><PO_BOX_CIT></PO_BOX_CIT><DELIV_DIS></DELIV_DIS><STREET></STREET><STREET_NO></STREET_NO><ST R_ABBR></STR_ABBR><HOUSE_NO></HOUSE_NO><STR_SUPPL1></STR_SUPPL1><STR_SUPPL2></STR_SUPPL2><LOCATION></LOCATION><BUILDING></BUILDING><FLOOR></FLOOR><ROOM_NO></ROOM_NO><COUNTRY></COUNTRY><LANGU></LANGU><REGION></REGION><SORT1></SORT1><SORT2></SORT2><TIME_ZONE></TIME_ZONE><TAXJURCODE></TAXJURCODE><ADR_NOTES></ADR_NOTES><COMM_TYPE></COMM_TYPE><TEL1_NUMBR></TEL1_NUMBR><TEL1_EXT></TEL1_EXT><FAX_NUMBER></FAX_NUMBER><FAX_EXTENS&g t;</FAX_EXTENS></COMPANYCODE_ADDRESS><COMPANYCODE_DETAIL><COMP_CODE>0001</COMP_CODE><COMP_NAME>SAP A.G.</COMP_NAME><CITY>Walldorf</CITY><COUNTRY>DE</COUNTRY><CURRENCY>EUR</CURRENCY><LANGU>D</LANGU><CHRT_ACCTS>INT</CHRT_ACCTS><FY_VARIANT>K4</FY_VARIANT><VAT_REG_NO></VAT_REG_NO><COMPANY></COMPANY><ADDR_NO></ADDR_NO><COUNTRY_ISO>DE</COUNTRY_ISO><CURRENCY_ISO>EUR</CURRENCY_ISO><LANGU_ISO>DE</LANGU_ISO></COMPANYCODE_DETAIL><RETURN><TYPE>W</TYPE><CODE>FN021</CODE><MESSAGE>Address data not found for company code 0001</MESSAGE><LOG_NO></LOG_NO><LOG_MSG_NO>000000</LOG_MSG_NO><MESSAGE_V1>0001</MESSAGE_V1><MESSAGE_V2></MESSAGE_V2><MESSAGE_V3></MESSAGE_V3><MESSAGE_V4></MESSAGE_V4></RETURN></rfc:BAPI_COMPANYCODE_GETDETAIL.Response>If you check Michal's guide on RFC Loopkup, it also comes with < and > chars.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c#search=%22site%3Asdn.sap.com%20lookup%20rfc%22
What happens if you output this string directly to output stream? I think XI will be able to understand it as a XML. Then, you could execute another mapping program to parse this XML and get the fields you want. In a same interface mapping, you can use more than one mapping programs.
Regards,
Henrique. -
RFC adapter not started (Error starting AS Java Service XPI Adapter)
Dear Experts,
We have recently Upgraded our sustem from XI3.0 to PI 7.1, and have encountered a peculiar error in RFC adapter which could not be started
error says: Error starting AS Java Service XPI Adapter: RFC
corresponding instance when started says
Error starting AS Java Service XPI Adapter: RFC on DVEBMGS00
Hence our RFC channels are not functioning
Please help
Regards,
Rana Decan you try to restart XPI Adapter:RFC in NWA. if still it throws error then try to restart java stack.
Maybe you are looking for
-
Dynamically switch back-end servers...
Hi, ours is a middleware layer that connect directly to back-end systems. There is a new layer coming in between our layer and one of our back end system. I want to device a system that will skipp this layer and directly start communicating to the ba
-
Dear all, I am converting script to PDF format, after convention other than English text is problem. (English is text is visible and other language text is converting into symbol) how to solve this problem. When I am taking a printout or print previe
-
Dynamic Email with Complete PDF sent
I have a Livecycle form with multiple email list and I need to send the complete PDF to the dynamic email can anyone help me please?
-
We'd like to include a bit of detailed information if a SOAP fault is generated by our Web services. Is there a good way to modify SOAP faults before returning them to the client ? Maybe intercepting them ? We are using Workshop 9.2 and XMLBeans ...
-
Batch input session for Recurring Entry
Hello All, i have created Batch input session for Posting document's for recurring entries creted and job executed in background through SM35 and done successfully, but i am unable to find the Batch input session in SM35 which i have created to run t