Regarding Message Mapping
Hi All,
The problem is I have created 2 Message Mappings and Two Message Interfaces
Two Messages Mappings and Message Interfaces are activated successfully, my question is which Message Mapping will execute among them(Message Mapping). If it Executes latest one Message Mapping ok, if I want to Execute Old one how can I execute that. I dont know whether we can create more than one Message Mapping, if it is possible here then can I Execute any one among all these Message Mapping help me in this problem.
Thanks & Regards,
Ashok.
hi,
in your scenarios your mappings
are executed on the basis of the <b>interface mappings</b>
one interface mapping can have a few message mappings
that will all be executed :
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
you always use interface mappings (in directory)
so you need to check how which message mappings
are included in your interface mapping
to find out which will be used in your scenarios
Regards,
michal
Similar Messages
-
Regarding Message Mapping in JDBC Scenario
Hello Experts,
I got struct up in message mapping. In message mapping we can able to see different types of Functions. So I need some clarifications on it. Functions are available like...
Conversions
Boolean
Node Functions
Constants
Date
Text
Static
Arithmetic
So please explain in simple for each functions.
Points will be rewarded.
Thank youHi
*Boolean*:-
And -- checks for 2condition, return a true value if both condition are satisfied
Or --checks for 2condition, return a true value if one condition is true.
Not - checks if the condition is not equal to.
Equals - Check whether 2 Boolean values are equal
NotEquals
If u2013 Returns second value if the first argument is true. otherwise returns third argument
If WithoutElse u2013 Returns value of second argument, if first argument is true.
Node Functions:-
createIf - Produces empty value if argument is true; Resultlist.SUPPRESS otherwise
removeContexts u2013 Produces plain stream of values with No context changes
replaceValue u2013 replaces value of source field to value specified in Function Properties.
Exists u2013 Returns true, if Node exists otherwise false
SplitByValue u2013 inserts context changes after event specified
collapseContexts u2013 Produces one empty string value out of each arguments context. All arguments are in one context
useOneAsMany u2013 Use First Argument as IS on same level as third argument. second argument defines when next value of first argument is used
sort u2013 sorts values in each context
sortByKey u2013 Sorts values in second queue by keys from first queue
mapwithDefault u2013 Inserts default values specified in the function properties into empty contexts
formatByExample u2013 Takes values from the first queue and inserts them in the structure of second queue.
Constants:-
Constant u2013 Generates constant value
CopyValue u2013 Takes specified value in argument stream and copies it an infinite number of times
Sender u2013 Sender System
Receiver u2013 Receiver System
Date:-
CurrentDate u2013 Return current date in specified format
DateTrans u2013 Transforms date from input format to output format
Dateafter u2013 Returns True if first date is after second otherwise false
DAteBefore - Returns True if first date is before second otherwise false
CompareDates u2013 Compares two dates
Text:-
Substring u2013 Returns substring depending upon the given parameters
Concat u2013 concatenates 2 strings inserting delimiter string parameter between them
Equals u2013 Check whether Strings are equal
indexOf2 u2013 returns the index where the second string is found for the first time in the first string
indexOf3 u2013 As with indexOf with 2 parameters, But starting search at the specified position
lastindexOf2 u2013 Returns the index where the second string is found for the last time in the first string
lastIndexOf3 u2013 As with lastIndexOf with 2 parameters starting search at the specified position
compare u2013 compares 2 strings lexicographically
replaceString u2013 Replaces each occurrence of pattern(2nd argument ) of source string(1st arg). By third string
length u2013 returns length of string
endsWith u2013 Tests whether string ends with specified suffix
startsWith2 u2013 Tests whether string starts with specified prefix
startsWith3 u2013 Tests whether string starts with specified prefix beginning at specified location
toUpperCase u2013 Converts all characters in string to upper case
trim u2013 Removes white space from both ends of string
toLowerCase u2013 Converts all characters in String to Lower case
Statistic:-
sum u2013 calculates sum of all numbers in each context
average u2013 calculates the average of all numbers in each context
count u2013 Counts number of values in each context
Index u2013 For each incoming value, this Function returns the index number of the incoming value in the context, String from the initial index and increasing by the increment defined in the parameters.
Arithmetic:-
Add u2013 add two values
Subtract u2013 subtracts second value from the first value
equalsA u2013 Returns true; If float numbers represented by argument strings are equal otherwise returns false
abs u2013 returns Absolute value of argument
sqrt u2013 Returns square root of the number
sqr u2013 Returns square of the number
sign u2013 Returns -1 if number is negative, +1 if positive, 0 if 0
neg u2013 Multiplies number to -1
1/x u2013 calculates 1/x
Power u2013 Returns value of the first argument to the power of the second argument
Less u2013 Returns true if the first number is less than the second number otherwise false
Greater - Returns true if the first number is greater than the second number otherwise false
Multiply u2013 Multiplies 2 values
Divide u2013 Divides first value by the second value
Max u2013 Returns maximum of 2 numbers
Min u2013 Returns Minimum of the 2 numbers
Ceil u2013 Returns the smallest (closest to the negative infinity) initial value that is not less than the argument and it is equal to the mathematical integer.
Floor - Returns the largest (closest to the negative infinity) initial value that is not Greater than the argument and it is equal to the mathematical integer.
Round u2013 Returns closest initial value to the argument
Counter u2013 Counts number of invocations. Initial value and increment defined by Parameters.
FormatNum u2013 Formats Number with given pattern.
Conversions:-
FixValues u2013 Creates a Local Table to perform a value Mapping
ValueMapping u2013 Define jump to Value Mapping table of Integration Directory.
Message Mapping(Node Function) Part-1
Message Mapping Simplified - Part I
Sravaya Talanki- Message Mapping(Node Function) Part-2
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Standard Functions
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
Advanced mapping function(mapwithdefault,formatbyexample,sort,sortbykey)
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
Hope this is useful
Saiyog
Edited by: Saiyog Gonsalves on Jul 11, 2008 1:14 PM -
Regarding Message Mapping Logic ...!
Hi Experts ,
I am working on the the below requirement JDBC to IDoc scenarion in the mapping i need the below logic
based on the existence of the Transaciton ID . the idoc followed by the segments should be created . for ex
If Interface_Trasaction_ID= 456 THEN Idoc 1 followed by Segments and line items
E1BPACHE09,
E1BPACCR09
E1BPACCR09,
E1PACEXTC .
Field value=456
If Interface_Transaction_ID =457 THEN Idoc 2 followed by Segments and line items
E1BPACHE09,
E1BPACCR09
E1BPACCR09,
E1PACEXTC .
Field value=457
To satisfy the above logic i have mapped Transaction id > SplitByValue->CollapseContext--->Idoc
But the same Mapping Logic is not working when Sender payload is triggred having Repeated Transcation_Id value ias given below if Transaction ID= 456 ,
Transaction ID= 457,
Transaction ID= 457,
Transaction ID= 456 .
then output should have only 2 Idoc Followed by segments where Field Value will be 456, 457
I have mapped Transaction id -->Field Value .
let me know how can achive the above logic ...!!Hi Aziz,
you can use UDF
Transaction IDRemoveContext-->sortUDF- SplitByValue->CollapseContext--->Idoc
public void removeDuplicate(String[] Value, ResultList result, Container container) throws StreamTransformationException{
String temp = Value[0];
result.addValue(Value[0]);
for(int i=0;i<Value.length;i++)
if(!(Value<i>.equals(temp)))
result.addValue(Value<i>);
temp=Value<i>; -
Hi,
1)I need some information regarding Message Mapping. I need to map the field TDLINE of segment E1EDKT2 of IDOC ORDERS05 to the target fields. But based upon the index number of the record of this segment, I must map it to different fields (eg.E1EDKT2[10], E1EDKT2[3]). How can I incorporate this in Message Mapping?
2)And one more scenario is as follows.Use PARTN if exists or use LIFNR to map to target and it must satisfythe conidtion PARVW = AG. Should we need Java code or can we achieve this using two 'If' conditions.
3)We are looping at a source segment and it has multiple occurances.How to create multiple segments in target based on condition.
Can anyone help me.
Thanks,
Srinivas> 1) I need to map the field TDLINE of segment E1EDKT2
> of IDOC ORDERS05 to the target fields. But based upon
> the index number of the record of this segment, I
> must map it to different fields (eg.E1EDKT2[10],
> E1EDKT2[3]). How can I incorporate this in Message
> Mapping?
You can use the index function (with SP13):
E1EDKT2* - index
equalS
constant(10) /
ifWithoutElse - target
TDLINE - removeContexts /
check the correct context
> 2)And one more scenario is as follows. Use PARTN if
> exists or use LIFNR to map to target and it must
> satisfy the conidtion PARVW = AG. Should we need Java
> code or can we achieve this using two 'If'
> conditions.
Sure you can chain if statements:
PARVW
equalS
constant(AG) /
ifWithoutElse
PARTN /
PARTN - exist - if - target
LIFNR
This mapping assumes, that PARVW = AG is available, when PARTN is available.
> 3)We are looping at a source segment and it has
> multiple occurances. How to create multiple
> segments in target based on condition.
Here is a pattern:
condition - createIf - target
condition has to be a queue of true and false with the same occurrency as source.
All sub nodes of source are now arranged correctly under the target node.
Regards
Stefan
Message was edited by: Stefan Grube -
Message Mapping for multiple item levels
Hi,
My query is regarding message mapping
Example of source data structure & Target data structure
Source data Structure
<item>
--<no>1</no>
--<address/>
--<ITEMS>
----<item>
------<Name>a</Name>
----<item>
------<Name>b</Name>
<item>
--<no>2</no>
--<address/>
--<ITEMS>
----<item>
------<Name>c</Name>
----<item>
------<Name>d</Name>
Expected Target data structure
<Item>
-- <no>1</no>
-- <name>a</name>
<Item>
-- <no>1</no>
-- <name>b</name>
<Item>
-- <no>2</no>
-- <name>c</name>
<Item>
-- <no>2</no>
-- <name>d</name>
How I can map the '<no>' field to target '<no>' field to repeat value until to second sub item level occurance complete ?
Thank you
SateeshHi Sateesh,
Please see the solution below.
The are 2 contect changes you need to do on field level. Right click and go to context and select your context you need.
Context on ITEMS - Should be on Root Structure(In my mapping it is MT_Multiple_Item_Level_Source)
Context on Name - Should be on Item (The first Item Tag)
Good Luck.
Regards,
Jannus Botha -
Query Regarding Multi-Message Mapping in Interface Mapping.
Hi All,
I've a query that can we use Multi-Message Mapping in Interface Mapping if:
One mapping structure is simple one-2-one mapping and
Second mapping is calling a stored procedure.
Please give me some links if the answer is YES.
Thanks in Advance.
Regards,
Sreedhar.
Edited by: Sreedhar Av on Oct 12, 2009 1:26 PMHi,
Your question not clear buddy..what i understood is..
If you want execute multiple message mappings in Interface mapping we can ,just add two mapping programs in interface mapping.first mapping program output is input to the second mapping program.
If first mapping program is very simple,if you want to execute stored procedure in second level mapping write used defned fun ction to conect to data base or create JDMC receiver communication channel ,cal the communictaion channel in udf.write stored procedure in UDF.
SEARCH for more info in sdn how to perform DBLOOKUPS.
regards,
Raj -
Regarding nodes shown in red colour in message mapping under test (tab)
hi all.
i just want to confrom one thing.
i just created a file to rfc scenario and when i was tested and look in sxmb_moni its showing like the message was sucess but when i ltested in message mapping in design there were some nodes in sender Message type which were displayed in red colour.
and when i look in runtime workbench the message is showing like system error.
so can you guys tell me what could be the reason for this.
waiting for your response.
bye.
regards.
seeta ram.hi rinku .
i think you havent understand my problem.
here the message in moni was showing as succes but when i tested the same message which was in moni in message mapping (design) there were some nodes which were in red colour and these nodes are not populated to reciever message type .but it was in sxmb_moni with all the nodes .
what could be the reason for this.
can u tell me fast and i case if u still havent understand the Q u can ask me.
waiting for your response.
bye.
regards.
seeta ram. -
Error while activating any message mapping in IR: very strange
hi forum i m getting an error in IR while activating any messageMapping.
the error is too long to be posted....i m posting a few lines of that:
Internal error while checking object Message Mapping MM_sdptestFileToFile | http://sdzpoc.com.test/sdptest (ZPOC_TEST, 1.0 of zpoctest); see details (CHECK_EXCEPTION)
Internal error while checking object Message Mapping MM_sdptestFileToFile | http://sdzpoc.com.test/sdptest (ZPOC_TEST, 1.0 of zpoctest); see details (CHECK_EXCEPTION)
/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapdddd0cb0100311dca6090012799eddc6/source/com/sap/xi/tf/_MM_sdptestFileToFile_.java (No such file or directory (errno:2))
/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapdddd0cb0100311dca6090012799eddc6/source/com/sap/xi/tf/_MM_sdptestFileToFile_.java (No such file or directory (errno:2))Sudeep,
Let we try this way. I'm sure you might have some existing mapping objects in IR.
Try to change that object(Description give some name) and activate again the object.
Reply your results whether you are getting the same error.
One sec before changing the object just test the mapping and change the object.
Best regards,
raj. -
Error while activating message mapping
Hi,
We are trying to activate message mappings and getting error as CHECK_EXCEPTION and in error details its showing that usr/sap/server.........................../classpath_resolver/Map.......................no such file or directory.........
What can be the issue?We can activate all other objects(DT,MT,IM,etc)
Best Regards,
Harleen Kaur ChadhaHi
Check this thread you can find the reason for this error CHECK_EXCEPTION solved here
Activating Object in IR - Getting Null Pointer Exception
Re: mapping test error
Internal error while checking object Message Mapping...
Problem Activating Mappings in the IR
Message Mapping activation Error
Regards
Abhishek -
How to use the variables used in the message mapping
Hi ,
In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
Please guide me how to use the variables declared in the JAVA section in the message mapping .
Thanks
Anita YadavAnita,
I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
If you declare a variable in the Declaration Section ,
int i;
then in any udf you can use if directly. No need to re declare the variable in the UDF. If you do this, then it becomes a local variable.
Regards,
Bhavesh -
To get exception value in Message Mapping
Hi folks,
I would like catch bpm step exception in one message mapping, for example:
I have create on ccBPM using one block, in block i have createad "ex" exception variable and set ex in all step (send and transformation), i have created one exception branch in block using "ex" exception.
How can i get "ex" value and pass for one message mapping ?
In MM how can i get text values from excpetion ocurred in ccBPM ?
Im am trying using Global Variables but not found any parameter of exceptions.
Can anybody help me, please?hi,
>>In MM how can i get text values from excpetion ocurred in ccBPM ?
this is not possible
Regards,
Michal Krawczyk -
I am receiving errors when trying to activate my MM. I believe the issues are in one of two UDF's. These UDF's do work in another MM without error. Below are the error's and UDF's.
ERRORS:
Activation of the change list canceled Check result for Message Mapping MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE | http://wawa.com/xi/erp/pos: Starting compilation Source code has syntax error: /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map5420e070cabe11dcab4b00306ef38da9/source/com/sap/xi/tf/_MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE_.java:3291: cannot resolve symbol symbol : variable container location: class com.sap.xi.tf._MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE_ map = container.getTransformationParameters(); ^ /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map5420e070cabe11dcab4b00306ef38da9/source/com/sap/xi/tf/_MM_WPDBBY_WPDBBY01_TO_POS_WAWAFILE_.java:3293: cannot return a value from method whose result type is void return constant; ^ 2 errors
UDF's:
public String getSender(Container container){
String constant;
java.util.Map map;
// get constant map
map = container.getTransformationParameters();
constant = (String) map.get (StreamTransformationConstants.SENDER_SERVICE);
return constant;
IMPORTS: com.sap.xi.mapping.parse.dom.;javax.xml.parsers.;java.io.;com.sap.aii.mapping.lookup.;org.w3c.dom.*;
public String getSeqNum(String fileType,String objNum,String Sender,Container container){
String request = "<ns0:ZRFC_NUMBER_GET_NEXT xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><NR_RANGE_NR>" + fileType + "</NR_RANGE_NR><OBJECT>" + objNum + "</OBJECT><QUANTITY/></ns0:ZRFC_NUMBER_GET_NEXT>";
InputStream isRequest = new ByteArrayInputStream(request.getBytes());
SystemAccessor accessor = null;
String num = null;
try{
// 1. Determine a channel.
Channel channel = LookupService.getChannel(Sender, "R_RFC_ERP");
// 2. Get a system accessor for the channel.
accessor = LookupService.getSystemAccessor(channel);
// 3. Create a payload according to the data type which the adapter expects.
// Use service.getBinaryPayload() for binary payload,
// and service.getTextPayload() for text payloads.
Payload payload = LookupService.getXmlPayload(isRequest);
// 4. Execute lookup.
Payload response = accessor.call(payload);
//Parse response
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
InputStream resStream = response.getContent();
Document doc = builder.parse(resStream);
Element sequence = doc.getDocumentElement();
NodeList number = sequence.getElementsByTagName("NUMBER");
//Extract Number
num = DOMUtil.getSimpleElementText((Element) number.item(0));
} catch (Exception e) {
return e.getMessage();
} finally {
try {
if (accessor != null) accessor.close();
} catch (Exception e) {
return e.getMessage();
GlobalContainer gc = container.getGlobalContainer();
gc.setParameter("Num", num);
return num;
Any help is appreciated.
Regards,
DarrellFauver,
Just to narrow down the problem first remove the first udf and only use the 2nd user defined function. Also in the 2nd udf you have to change this line:
try{
// 1. Determine a channel.
Channel channel = LookupService.getChannel(Sender, "R_RFC_ERP");
In the above line instead of Sender you use the business service or business system where R_RFC_ERP RFC communication channel is created in Integration Directory. So you are hardcoding it first.
Once you have done this changes do save and test it once again. If this works then you can change back to original and your first udf needs to be checked.
Regards,
---Satish -
Error Activating Message Mapping
HI All,
I am getting the below error when i try to activate any message mapping in the IR. Any ideas?
" Starting compilation Source code has syntax error: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main Exception in thread "main"
Thank you in Advance.
DHi,
Is there recently been an update like WAS ABAP and WAS JAVA to SPS13(nw2004s)?
Please check this thread there are some pointers in it:
Re: 500 internal server error
Best regards,
Guido -
Additional message mapping in the operation mapping-use
Hi Friends,
I could find the option for adding more than one message mappings in the operation mapping(Interface mapping). What is the actual purpose of it. when it is used. If there is any blogs regarding the same. refer any link for the same.
Regards
PremHi Prem
Refer the blog provided by Sarvesh
What is the actual purpose of it. when it is used. If there is any blogs regarding the same
You can use more than one mapping programs for requirement where your message mapping cannot generate the desired structure you want or you want to do some transformations in a sequence for meeting your requirement.
Example: You want to generate a excel sheet as a mail attachment but you have to read a flat file. What you can do here is you can read the Flat file in a single string variable itself. Use XSLT mapping1. Now in a sequence using XSLT Map2/Java mapping program to convert to excel and send as attachment over email
Thanks
Gaurav -
Error while forming Structur in Message Mapping.
Hi ,
I have taken source payload from Moni and tried to test the Message mapping.
When i paste the Pay load in Test tab,under XML, my structure is getting well formed., But 3 feilds from structure is showing in Red color.
Please advice
Regards
DineshHi Dinesh,
Please cross check with filling the values into the test tab and display it in source xml format and copy in notepad and compare with the payload data there must be some tag problem.
Thanks!
Edited by: Sudhir Tiwari on Nov 25, 2008 2:20 PM
Maybe you are looking for
-
continued but yes that message keeps popping outand i dont wana loseall my musc i try redownlding itunes but it wont let me becuase i hae i tunes installed already but wontlet me opn because supposebly dont havethe righ localized version it was work
-
Create SPFILE from pfile not working
Experts, I have edited SPFILE by mistake....but.... I do have a good pfile and am able to startup oracle from pfile. I am trying create SPFILE from pfile: create spfile='path/file' from pfile='path/file' as soon as I execute this command prompt is sh
-
How to find "the remote button" in iTunes 11
I spent about 20 minutes trying to figure out how to re-connect my iPhone Remote app to my computer, so hopefully I can save some people some time: When you open the app and try to re-connect your iTunes library, it will give you a code, and some biz
-
I am going to be writing a custom report for my b2b messages and was looking at the b2b.B2B_INSTANCEMESSAGE table to build my reports off of. However, I notice that this table is cleared out every day or two. Is there a better table that I could buil
-
Card: Intel Hda Audio Chip: Stac9205 How Do I Get 2 Outputs?