Difference of FixValues and Value Mapping in Message Mapping
Hi
I would like to know the exact difference between the "FixValues" and Value Mapping. And the Scenarios of usage.
If i use Value Mappings, value mappings more for fixed values or can they be used for business data that will change ?
If the flow is from "Non SAP to SAP System" then if i maintain the "Value Mapping Tables" in Message Mapping, Do i need to maintain the same Value Mapping tables on SAP System. If this is the case, it will be over head of maintaining on both sides.
More thankful if you clarify my doudt.
Regards
Shailaja
Hi,
your question is best explained in the following link(PDF).
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
Its given in the 75th page.
>>If the flow is from "Non SAP to SAP System" then if i maintain the "Value Mapping Tables" in Message Mapping, Do i need to maintain the same Value Mapping tables on SAP System.
I think this is not needed.its not needed to maintain value mapping tables in SAP system.
hope this helps.
regards,
P.Venkat
Similar Messages
-
Copy value function in message mapping?
can someone help me understand copy value function in message mapping???
Hi,
Here's a good example providen yesterday by Mark in a thread.
[Re: different contexts to different targets]
And here's SAP help: [http://help.sap.com/saphelp_nwpi71/helpdata/EN/26/d22366565be0449d7b3cc26b1bab10/content.htm]
Then play...
Mickael -
Difference between binding and value
Hi
I am new to JSF
Can you tell me what is the difference between binding and value attribute of a
JSF component ?
Many thanks.Hi,
the binding is the component association to a managed bean (or backing bean). This allows you to manipulate the component in Java code stored in a managed bean.
The value is what the actual component value is.
Frank -
Interface Mapping VS Message Mapping
What is the meaning of Interface mapping and Message mapping in real business?
I think it is something like the difference between the class and object. object is an instance of class.
While talking about the mapping, there are the source interface and target interface. Can two source intefaces map to only one interface, and what about the vs verse? And how about the message mapping?
Thanks a lotHi -
First, an Interface Mapping is not only linked with "Message Mappings" (which is the XI term for a mapping created with the XI graphical tool), but any other XI supported mapping type (e.g. XSLT, Java, or ABAP). So basically, an Interface Mapping is used to link a source interface to a target interface via a mapping (of any of the supported types). At runtime, you can't have an interface mapping without a mapping and a mapping without an interface mapping - they need each other.
<i>>>>Can two source intefaces map to only one interface, and what about the vs verse? And how about the message mapping?</i>
Yes, the ratio of source to target interfaces are n:m. In those multiple cases, Multi-Mappings are typically involved as mentioned in the previous post.
Also, remember that in one interface mapping, you are not limited to one mapping. More than one mapping (of any type) can execute in the sequence you have set up in the Interface Mapping. However, watch out for performance in these back-to-back(to-back) mappings.
Regards,
Jin -
Can we call a Java Map in Message Map
Hello,
Can we call a Java Map in Message Map
Thanks and Regards
HemantHello Vijay,
I think this is your code:
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import java.util.Map;
import java.io.*;
public class PayloadToXMLField1 implements StreamTransformation {
String strXML = new String();
//Declare the XML tag for your XML message
String StartXMLTag = "<DocumentBody>";
String EndXMLTag = "</DocumentBody>";
//String StartXMLTag1 = "<Code>";
//String EndXMLTag1 = "</Code>";
AbstractTrace trace;
private Map param = null;
public void setParameter(Map param) {
this.param = param;
public void execute(InputStream in, OutputStream out) {
trace =
(AbstractTrace) param.get(
StreamTransformationConstants.MAPPING_TRACE);
trace.addInfo("Process Started");
try {
StringBuffer strbuffer = new StringBuffer();
byte[] b = new byte[4096];
for (int n;(n = in.read(b)) != -1;) {
strbuffer.append(new String(b, 0, n));
strXML = strbuffer.toString();
} catch (Exception e) {
System.out.println("Exception Occurred");
String outputPayload =
StartXMLTag
+ "<![CDATA["
+ strXML
+ "]]>"
+ EndXMLTag;
try {
out.write(outputPayload.getBytes());
trace.addInfo("Process Completed");;
} catch (Exception e) {
trace.addInfo("Process Terminated: Error in writing out payload");;
I need this code to be converted in UDF if Java map cannot be called in Message Map.
Can anyone help me how to write UDF for the same java map.
Thanks and Regards
Hemant -
Set a variable in Adapter Module and read it during message mapping
Hi guys,
is there any way, how I could set some variable and store its value during the adapter module processing and read back this value in message mapping and use it? Without using a database or files.. I mean, some j2ee storage or something like that..
Thanks for your help,
OlianHi guys,
thanks for your answers.. just a clarification, what the problem is.
I need to validate a message in the adapter module, if it's digital signature is valid. If it is, I need to send back to the sender a return code (message) OK, otherwise ERROR. I can't modify the message (or dynamic configuration) as I'm using a WSS in the sender channel. The system doesn't allow me to change anything in the message, so I can't find out in the mapping what the validation result was. I then tried to do the validation directly in the message mapping, but I have some issues there with libraries or what, because the validation code, which works in the adapter module, doesn't work in the mapping java class. So my final thought was maybe I could validate the message in the adapter module and pass the result to the message mapping and then create an appropriate return message (in the mapping). However, I see no way of passing a value there. I'm stuck and have no Idea how to resolve the problem. Any hints guys?
Thanks a lot for your help!
Olian -
Get the mapping values from one message mapping into another message mappin
Hi All,
I created two graphical message mappings. In first message mapping i created one user defined function and set one global container parameter and I need to use this parameter in my second message mapping user defined function. But the global container parameters can be used in different user defined functions in same message mapping. So is there any way to use the values which are set in one message mapping into another message mapping. If yes, please help me how to get?Hi Koteswara rao,
As you said global container parameters from first message mapping are not accessible from second message mapping program.
i haven't faced situation like this.but, if you have some unmapped field in target message in first message mapping,you can put global variables data in that unmapped field.
anyway the output of first message mapping would be input for 2nd messages mapping,so you can access global data(unmapped field filled with global data in 1st MM) from 2nd mapping program..
Cheers,
Jag -
PI 7.1 Operation mapping - Multiple message mapping - one to many issue
Dear Experts,
I am facing this issue in PI 7.1 and I beleive i did similar one in PI 7.0 successfully.
I have an operation mapping with two message mappings.
The occurence of source message of operation mapping is 1
The occurence of target message of operation mapping is 0..unbounded
Corresponding i configured two message mappings
For message mapping-1
Source message occurence = 1 and Target message occurence = 1
For message mapping-2
Source message occurence = 1 and Target message occurence = 0...unbounded
When i test message mappings individually they are working good. But when i test it in operation mapping, the operation mapping is not working..as it is not able to convert single occurence output of message mapping -1 to the second message mapping-2.
Any suggestions?
Thanks.The message that i get when testing in operation mapping:
Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_MessageMapping_1_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns0:MT_MessageMapping_1_TargetMessageType/RECORDSET. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
My question is, has somebody mapped similar scenario in your environment? If yes, can you please provide details.
Operation mapping : 1 to 0..unbounded
Message Mapping1: 1 to 1
Message Mapping2: 1 to 0...unbounded -
Enumeration mapping in message mapping
I have a source structure ABC that contains two fields. This structure needs to be transformed into two records that will store the field name of the source as well as the value. It actually creates name/value pair in the target interface. I wonder if message mapping could possibly handle that.
[Source]
ABC
---FIELD_A = 123
---FIELD_B = 456
[Target]
DEF[0]
---NAME = "FIELD_A"
---VALUE = "123"
DEF[1]
---NAME = "FIELD_B"
---VALUE = "456"
Regards
Chong WahHi Chong Wah,
You can use the following java code to solve your problem using java mapping.
* Created on Sep 14, 2005
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.sap.aii.mapping.api.StreamTransformation;
* @author AnanthBabu Chinnaraj
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
public class JavaMapping implements StreamTransformation {
private Map map;
private Document document;
DOMSource domS = null;
Document docOut = null;
HashMap[] xmlData = null;
* method setParamters is required, but we do not anything with it
public void setParameter(Map param) {
map = param;
* method execute is called by the XI mapping program
public void execute(InputStream in, OutputStream out) {
HashMap[] xmlData = null;
xmlData = parseInputXML(in);
createOutputXML(xmlData[0], out);
public static void main(String args[]) throws Exception {
try {
JavaMapping mapObj = new JavaMapping();
FileInputStream in = new FileInputStream("D:/zAnanth/SDN/Src.xml");
FileOutputStream out =
new FileOutputStream("D:/zAnanth/SDN/Trgt.xml");
mapObj.execute(in, out);
} catch (Exception e) {
e.printStackTrace();
* method to process input xml
* return array of HashMap for every 'ABC' tag
public HashMap[] parseInputXML(InputStream in) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
String tagName = null;
String tagValue = null;
// create DOM structure from input XML
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(in);
// look for the tag 'ABC'
NodeList list = document.getElementsByTagName("ABC");
//Initialize array size
xmlData = new HashMap[list.getLength()];
for (int i = 0; i < list.getLength(); i++) {
Node node = list.item(i);
//Initialize hashmap
xmlData<i> = new HashMap();
//Process Child nodes
NodeList childList = node.getChildNodes();
for (int j = 0; j < childList.getLength(); j++) {
Node childNode = childList.item(j);
if (childNode != null) {
if (childNode.getNodeType() == Node.ELEMENT_NODE) {
//Store tag name
tagName = childNode.getNodeName();
//System.out.println("Name *:"+childNode.getNodeName());
//Store tag value
tagValue = processValueNode(childNode);
//Store as name value pair
xmlData<i>.put(tagName.toUpperCase(), tagValue);
} catch (Exception e) {
e.printStackTrace();
return xmlData;
private String processValueNode(Node childNode) {
String tagValue = null;
NodeList valueNodesList = childNode.getChildNodes();
Node valueNode = valueNodesList.item(0);
if (valueNode != null) {
if (valueNode.getNodeType() == Node.TEXT_NODE) {
tagValue = valueNode.getNodeValue();
//System.out.println("Value #:"+valueNode.getNodeValue());
return tagValue;
* Method to create xml document from input hashmaps
* return XML doc in InputStream
public void createOutputXML(HashMap xmlData, OutputStream out) {
try {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transform = tf.newTransformer();
DocumentBuilder builder = factory.newDocumentBuilder();
//Create the output DOM
docOut = builder.newDocument();
//Create Top most Element
Element topRoot = docOut.createElementNS("http://XYZ", "ns:MT_ABC");
docOut.appendChild(topRoot);
Element defNode = null;
Set set = xmlData.keySet();
String[] tagNames = new String[set.size()];
set.toArray(tagNames);
for (int i = 0; i < tagNames.length; i++) {
defNode = createElement("DEF", topRoot);
createElement("Name", defNode, tagNames<i>);
createElement(
"Value",
defNode,
(String) xmlData.get(tagNames<i>));
//Process XML
domS = new DOMSource(docOut);
transform.transform((domS), new StreamResult(out));
} catch (Exception e) {
e.printStackTrace();
//Create an Element and add it into Parent
private Element createElement(String elementName, Element parent) {
Element ele = docOut.createElement(elementName);
parent.appendChild(ele);
return ele;
//Create an Element and Text node and add it into Parent
private Element createElement(
String elementName,
Element parent,
String value) {
Element ele = docOut.createElement(elementName);
ele.appendChild(docOut.createTextNode(value));
parent.appendChild(ele);
return ele;
//Get Values from Map, if value is null pass empty string
private String getValue(HashMap map, String tagName) {
String value = "";
try {
value = (String) map.get(tagName);
if (value == null) {
value = "";
} catch (Exception e) {
e.printStackTrace();
return value;
Regards,
Ananth -
Is it possible to copy segment mapping in message mapping??
Hii Experts,
I want to duplicate one segment and I want to copy all the mappings of one segment into the other in message mapping.
Mapping Templete does not work here.
Anyone knows any other work around ?? The segment contains hell lot of mapping rules and it is difficult to copy each and every rule.
Thanks in advance.
ShriHi shripad
just try one thing right click on target field which you want to copy and select option copy node ..if it is work then it may.....otherwise i donot think its possible..
Thanks
Kunaal -
XSLT-Mapping oder Message Mapping (grafisches Mapping)?
Hallo,
which mapping type is the best? xslt oder message mapping?
JensHi,
In terms of perfromance , XSLT is supposed to be very bad and is to be avoided whenever possibl.e
Graphical Mapping is the best when it comes to performance of the mapping.
But , there are a few features, which are not possible using graphical in which case you might have to go for JAVA/ ABAP / XSLT mapping.
Regards,
Bhavesh -
Does anyone know what is the difference between standard and value print cartridges?
I was wandering does anyone know what the difference is between the 2 I am not sure which one to get.
I do not know what printer and cartridges you are looking at, but there are typically "value" or XL cartridges that have approximately three times the ink at about twice the cost.
You can see the page yield for various printers here.
Bob Headrick, HP Expert
I am not an employee of HP, I am a volunteer posting here on my own time.
If your problem is solved please click the "Accept as Solution" button ------------V
If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V -
Difference bwt default and value
Hello frnds
what is the difference between below two statements:
data : f(5) value 'sap',
f(5) default 'sap'.
thnks,
SUnnyHi,
data: name type char10 value 'Hello'.
*data: name type char10 default 'Hello'. "it throws syntax error
parameters: p_name type char10 default 'Hello'. -
What's the difference between text and value type for SO item category?
Dears,
Could anybody help me on this question?
Many thanks!
Regards,
ShiliangHi Shiliang,
In a Bill Of Material the main item is a composite item which represents what is being sold to the customer. For eg. a computer typically would consist of Monitor, Keyboard,mouse and CPU, speakers. Here computer refers the collection of all these items which are physically existing and basically items present in our inventory ( Value Items ). Where as computer is just a text item meant to describe the collection.
Also to add the for Usage we use it as text sometimes, which is used to say the item has been authenticated by the quality dept and we print " Tested " on it or these days all the items come out with unique article numbers for identification purpose. So we use this usage as text.
Hope it adds. Pl reward if useful.
Thanks & Regards
Sadhu Kishore -
Quantity Mapping in Message mapping
I have the below mapping conditions...
Create for every quantity related to billcode and Sponsorcode. If there is no quantity, create segment with quantity 0.
How to map this? Please help how to map this clearly...
Thanks in advance..Hello,
This can be solved by using the node function mapWithDefault. Since your quantity is 0..1, you can use a logic that looks like this
quantity --> mapWithDefault: 0 --> target
Please take note that for the mapWithDefault to work, there should be no context manipulations in your quantity field.
Hope this helps,
Mark
Maybe you are looking for
-
I can import songs from CD to my ipod, and they will play fine. Why can I not access them on the itunes software? They appear in black text under "Library", but are grayed out whne I look at my ipod. I can not change song titles, etc. or create playl
-
Please help! We got a used Mac Mini and we don't have the former owner's password, so we can't install anything like flash player. Does anyone know how to get around this? I don't know how to wipe the hard drive, and the support online doesn't seem
-
Hi all, I am trying to implement a scenario where n messages of the same type are received and combined together and then sent out. For this I have a loop in which I do a receive step and then I have defined a container variable for the message wh
-
Does apple tv work with ee router
does apple tv work with my ee smartbox router
-
Hi there; In RPM I created user TEST and assigned ABAP roles SAP_XRPM_ADMINISTRATOR and SAP_XRPM_USER by transaction SU01. After that I go in portal (USER ADMINISTRATION > IDENTITY MANAGEMENT TAB) and link standard portal role PORTFOLIO MANAGEMENT wi