Sum quantities in message mapping
Hello there.
I'm trying to map a xml message with items (material/quantity) into another one with exact same structure but collecting the lines by material.
The XML's structure is like:
header_fields ...
<items>
<item>
<matnr>1</matnr>
<qty>1</qty>
</item>
<item>
<matnr>2</matnr>
<qty>10</qty>
</item>
<item>
<matnr>1</matnr>
<qty>5</qty>
</item>
</items>
When mapping <item> tag, I used a user-defined function Like this:
public void addMaterial(String[] material,ResultList result,Container container){
Vector vMats = new Vector();
for (int i = 0; i < material.length; i++ ){
if (!vMats.contains(material<i>)){
vMats.addElement(material<i>);
for (int i = 0; i < vMats.size()-1; i++){
result.addValue("");
This is working well (I think) because i only get different materials in output queque in mapping.
Now, I want to actually calculate quantities, mapping qty tag, collected by material, and i'm trying something like:
public void sumQuantities(String[] material,String[] units,ResultList result,Container container){
Vector vMats = new Vector();
Vector vQuant = new Vector();
for (int i = 0; i < material.length; i++ ){
if (!vMats.contains(material<i>)){
vMats.addElement(material<i>);
vQuant.addElement(units<i>);
else {
for (int i = 0; i < vQuant.size()-1; i++){
result.addValue("");
I'm creating a vector vMats to have an array with not repeated material, and a vQuant array to sum quantities. There is the ???? part ...
I'm sorry for the SIMPLE question but i'm an abaper trying a bit in the java workd
The needed result is:
header_fields ...
<items>
<item>
<matnr>1</matnr>
<qty>6</qty>
</item>
<item>
<matnr>2</matnr>
<qty>10</qty>
</item>
</items>
Regards,
Valter Oliveira.
Hello VJ.
Thanks for your input. There were some problems in the type convertion in your code, but using your idea with small changes found in java foruns I got one of the possible solutions (probably not the best one). I've tryied it with several complex combinations and so far so good ... always got what we need.
The code for the 3 UDF's that I created is:
For <Item> (non-repeated materials)
public void additem(String[] material,ResultList result,Container container){
Vector vMats = new Vector();
for (int i = 0; i < material.length; i++ ){
if (!vMats.contains(material<i>)){
vMats.addElement(material<i>);
result.addValue("X");
For <matnr> (non-repeated materials)
public void addmaterial(String[] material,ResultList result,Container container){
Vector vMats = new Vector();
for (int i = 0; i < material.length; i++ ){
if (!vMats.contains(material<i>)){
vMats.addElement(material<i>);
result.addValue(material<i>);
For <qty> (collected by material)
public void sumQuantities(String[] material,String[] units,ResultList result,Container container){
Vector vMats = new Vector();
Vector vQty = new Vector();
for (int i = 0; i < material.length; i++ ){
if (!vMats.contains(material<i>)){
vMats.addElement(material<i>);
vQty.addElement(units<i>);
else {
int p = vMats.indexOf(material<i>);
int actual = Integer.parseInt(units<i>);
String[] aux = (String[])vQty.toArray(new String[vQty.size()]);
int previous = Integer.parseInt(aux[p]);
int sum = actual + previous;
String strsum = Integer.toString(sum);
vQty.set(p, strsum);
String[] end = (String[])vQty.toArray(new String[vQty.size()]);
for (int i = 0; i < vQty.size(); i++){
result.addValue(end<i>);
After the UDF's, to achieve <matnr> and <qty> in output XML, I had to use SPLIT by VALUE.
I'll keep this open for a while to see if anyone has a better solution.
Regards,
Valter Oliveira
Similar Messages
-
Message Mapping - SUM a field per unique combination of 2 other fields?
I'm receiving a proxy with detail records, and I need to create a subtotals file. Here an example:
BEFORE MAPPING
<ROW>
<KOSTL>0000010300</KOSTL>
<POSID>DUMMY</POSID>
<FTE>0.51</FTE>
</ROW>
<ROW>
<KOSTL>0000010400</KOSTL>
<POSID>123</POSID>
<FTE>0.49</FTE>
</ROW>
<ROW>
<KOSTL>0000010400</KOSTL>
<POSID>DUMMY</POSID>
<FTE>0.72</FTE>
</ROW>
<ROW>
<KOSTL>0000010400</KOSTL>
<POSID>123</POSID>
<FTE>0.82</FTE>
</ROW>
<ROW>
<KOSTL>0000010300</KOSTL>
<POSID>DUMMY</POSID>
<FTE>0.18</FTE>
</ROW>
AFTER MAPPING:
<ROW>
<KOSTL>0000010300</KOSTL>
<POSID>DUMMY</POSID>
<FTE>0.59</FTE>
</ROW>
<ROW>
<KOSTL>0000010400</KOSTL>
<POSID>123</POSID>
<FTE>1.31</FTE>
</ROW>
<ROW>
<KOSTL>0000010400</KOSTL>
<POSID>DUMMY</POSID>
<FTE>0.72</FTE>
</ROW>
How do I create a new record for all unquie combinations of KOSTL and POSID? And total the FTE field for each line? Can this be done in a message mapping?Hello,
How do I create a new record for all unquie combinations of KOSTL and POSID? And total the FTE field for each line? Can this be done in a message mapping?
Yes, very much possible with or without UDF. See sample mapping below without using UDF:
For ROW:
KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> collapseContext -> ROW
POSID(set context to row) -> /
For KOSTL:
KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> collapseContext -> splitByValue:eachValue -> KOSTL
POSID(set context to row) -> / KOSTL(set context to row) ->/ /
KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
POSID(set context to row) -> /
For POSID:
KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> collapseContext -> splitByValue:eachValue -> POSID
POSID(set context to row) -> / POSID(set context to row) ->/ /
KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
POSID(set context to row) -> /
For FTE:
KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> sum -> splitByValue:eachValue -> FTE
POSID(set context to row) -> / FTE(set context to row) ->/ /
KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
POSID(set context to row) -> /
Hope this helps,
Mark -
Message Mapping - Sum of all Element1.Field1 where Element1.Field2 = X
Hi!
Has everyone an idee of how to do the following message mapping ?
My input message is :
E1EDP01
E1EDP26
QUALF = 001
BETRG = 5
E1EDP26
QUALF = 003
BETRG = 3
E1EDP26
QUALF = 002
BETRG = 5
E1EDP26
QUALF = 003
BETRG = 3
I want to get the sum of all E1EDP26.BETRG where E1EDP26.QUALF = "003". There can be more than one E1EDP26 with field QUALF = "003". So expected result is 6.
Thanks in advance,
LaurenceInput structure :
INVOIC02 1.1
IDOC 1.1
E1EDP01 0..999999
E1EDP26 0..20
QUALF 0..1
BETRG 0.11
Output structure :
root 1..1
GoodsDeclaration 1..1
Invoice 0..1
ExchangeRate 0..1
exchangeRate 0..1
currrency 1..1
exchangeDate 0..1
invoiceAmount 0..1
The target field root/GoodsDeclaration/Invoice/invoiceAmount must be mapped with the sum of fields BETRG belonging to nodes E1EDP26 with field QUALF = "003".
Sample :
<INVOIC02>
<IDOC>
<E1EDP01>
<E1EDP26>
<QUALF>001</QUALF>
<BETRG>5</BETRG>
</E1EDP26>
<E1EDP26>
<QUALF>003</QUALF>
<BETRG>1</BETRG>
</E1EDP26>
<E1EDP26>
<QUALF>002</QUALF>
<BETRG>5</BETRG>
</E1EDP26>
<E1EDP26>
<QUALF>003</QUALF>
<BETRG>2</BETRG>
</E1EDP26>
</E1EDP01>
</IDOC>
</INVOIC02>
In this case, target field root/GoodsDeclaration/Invoice/invoiceAmount must have the value 3 :
<root>
<GoodsDeclaration>
<Invoice>
<ExchangeRate>
<exchangeRate/>
<currrency/>
<exchangeDate/>
</ExchangeRate>
<invoiceAmount>3<invoiceAmount>
</Invoice>
</GoodsDeclaration>
</root>
Laurence -
Message Mapping activation error-Source code has syntax errors in UDF
Hi all,
I wrote a small UDF for sum of 2 numbers:
import
udf.*
public String getsum(String a, String b, Container container) throws StreamTransformationException{
int c = Integer.parseInt(a);
int d = Integer.parseInt(b);
int e = packageDemo.getSum(c,d);
return e+"";}
In imported archives, i imported pack.jar
In D:\udf , I have packageDemo.java, packageDemo.class, aii_map_api.jar, pack.jar(has the other 3)
packageDemo.java :-
package udf;
public class packageDemo{
public static int getSum(int a,int b)
int c= a+b;
return c;
Did i miss anything?? Icant activate message mapping for 2 errors:-
1.package udf does not exist
2.Function getsum, Line 3:
cannot find symbol symbol : variable packageDemo location: class com.sap.xi.tf._xml_mm_int e = packageDemo.getSum(c,d); ^Note: /usr/sap/P7R/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd4214d3099dc11dd9470001d090e4bbe/source/com/sap/xi/tf/_xml_mm_.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.Note: /usr/sap/P7R/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd4214d3099dc11dd9470001d090e4bbe/source/com/sap/xi/tf/_xml_mm_.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.2 errors
Edited by: NagaDurga Nannapaneni on Oct 16, 2008 1:07 PMHi ,
Think the error is coming because the content in imported archive is not being taken into message mapping at all...so package, class, method ..nothing is identified.
Can anyone suggest the solution..
Thanks,
Durga -
Message mapping in sap pi 7.3
Hi all,
I am using SAP PI 7.3. In ESR, I have declared one source data type & message type and one target data type & message type. I have also completed message mapping. But in message mapping, If I do right click on the target message type, I am getting one option "Add variable" in the context.
Can anyone tell me what is the use of it?
Thanks & Regards,
MoumitaHi Moumita
This is mainly used to store some values in it and then use it later in the same mapping.
For example suppose there is a field which contains amount and it occurs in many times in the source structure.
So we can populate the sum of all this fields into this variable and later used that for populating any target field.
Another example is suppose we want to make an RFC look up in PI to store some data in ECC tables.
In that also we map the RFC look up function to this variable.
This variable will be not present in the map output.
Check this
SAP PI 7.1 Mapping Enhancements Series: Using Graphical Variable -
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 -
Require a Message mapping for this Logic.
Hi Experts,
I require a Message mapping for this Logic.
In the Source there are 4 fields and, the Target side, the fields should appear like this.
Source Structure- File
Record
|-> Header
Order_No
Date
|-> Item
Mat_No
Quantity
Target Structure-IDoc
IDoc
|-> Header
|-> Segment
Delivery_Order_No
Recv_Date
|-> Item
|-> Segment
Delivery_Order_No
Material_Num
Recv_Quantity.
The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
For example:-
we have
Source Structure- File
Order-no Date Mat_No Quantity
1 01/02/2011 A 10
1 01/02/2011 B 15
1 01/02/2011 A 10
2 01/02/2011 C 10
2 01/02/2011 C 10
3 01/02/2011 D 20
3 01/02/2011 D 10
3 01/02/2011 E 25
Target Structure-IDoc
Delivery_Order_No Recv_Date Material_Num Recv_Quantity
1 01/02/2011 A 20
1 01/02/2011 B 15
2 01/02/2011 C 20
3 01/02/2011 D 30
3 01/02/2011 E 25
So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
Thanq very much in advance..
Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PMHi Prashanth,
Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
formatByExample>collapseContext>SplitByEachValue-->Recv_Date
FormatByExample:
input1:resulrOfSortByKey
input2:concatination>removecontext>sort-->SplitByValuChange
sortByKey:
input1:concatination-->removecontext
input2:date-->removecontext
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
formatByExample>sum>Recv_Quantity
FormatByExample:
input1:sortByKey
input2:concatination>removecontext>sort-->SplitByValueChange
SortByKey:
input1:concatination-->removecontext
input2:Quantity-->removeContext
Regards,
Priyanka. -
Problem with Message-Mapping: Loop over Elements possible?
Hi all,
I want do create a Message-Mapping for an IDoc-to-File Scenario. In the Source Structure there are some Elements which can appear more than once (1..unbounded). I need a mechanism which loops over these elements and search for specified values. From the Element which contains an element with this specified value the mapping should write a value in the target structure.
Here a simple example (source structure) for better understanding:
<root>
<invoice>
<number> 10 </number>
<sum> 200.00 </sum>
</invoice>
<invoice>
<number> 20 </number>
<sum> 150.00 </sum>
</invoice>
<invoice>
<number> 30 </number>
<sum> 120.00 </sum>
</invoice>
</root>
Now the duty of the Mapping should be to search in the elements <invoice> for the number 30. And then the sum of the invoice with the number 30 should be written in a field of the target structure.
I tried it out with a constant togehter with an equalsS-function and an ifWithoutElse-function, but it is working only then, if the invoice with the number 30 has the first position in the root context.
Can anybody help me? Thanks
With kind regards
ChristopherHi,
Write a UDF to sum the required values and map to target node.
See while writing the UDF select the type as queue.
number -- removecontext-UDF targetnode
sum----removecontext--/
number abd sum or the two inputs
in UDF
int nsum = 0;
for(int i;i < number.length;i++){
if number(i).equals("30") then
nsum = nsum + valueOf(sum(i));
result.addValue(nsum); // convert the nsum into string
Regsrds
Chilla -
Message mapping - Duplicate subtree
Hi Experts,
I am working on 7.0 server.
In the existing message mapping I found that target nodes are duplicated.
For example
/ns0:FiletoFile_ib_mt/Record/Emp[1]
/ns0:FiletoFile_ib_mt/Record/Emp
And the order for the node in the target message structure is same as above.
And in the output, the order is reversed as below
/ns0:FiletoFile_ib_mt/Record/Emp
/ns0:FiletoFile_ib_mt/Record/Emp[1]
But when am duplicating one more node in the existsing mapping the order is
/ns0:FiletoFile_ib_mt/Record/Emp[2]
/ns0:FiletoFile_ib_mt/Record/Emp[1]
/ns0:FiletoFile_ib_mt/Record/Emp
And now the output is
/ns0:FiletoFile_ib_mt/Record/Emp[2]
/ns0:FiletoFile_ib_mt/Record/Emp[1]
/ns0:FiletoFile_ib_mt/Record/Emp
But I need the output as
/ns0:FiletoFile_ib_mt/Record/Emp
/ns0:FiletoFile_ib_mt/Record/Emp[1]
/ns0:FiletoFile_ib_mt/Record/Emp[2]
Please let me know if you have faced similar issue.
If am creating a new message mapping and duplicating the subtrees the order is given below
/ns0:FiletoFile_ib_mt/Record/Emp
/ns0:FiletoFile_ib_mt/Record/Emp[1]
Why in the existing mapping duplicate subtree is going in the top order and for new message mapping duplicate subtree is going in the bottom. Please advice
Thanks
Suma SHi Lucas
I checked this sap note but I used PI 7.0.
This happens from 7.10 onwards and this is primarily due to the reason that the occurence of the duplicated node was not remembered when the mapping program gets executed. So, the mapping program was expecting data from the payload for the duplicated node and hence the error -
I got the following dump, when I executed the Message Mapping. Eventhough I have fixed the problem, I am not quite sure to read the dump, i.e by reading the dump I was not sure which FIELD has caused the Dump. could some one help me , how I can read a Dump and Pin point the Field that has caused the error. Thanks Friends.
Dump
Messages:
Exception:[java.lang.IllegalArgumentException: Cannot cast sUpPresSeD to float. ] in class com.sap.aii.mappingtool.flib3.Stat method sum[com.sap.aii.mappingtool.flib3.Plainer@2c2f6468]
com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.IllegalArgumentException: Cannot cast sUpPresSeD to float. ] in class com.sap.aii.mappingtool.flib3.Stat method sum[com.sap.aii.mappingtool.flib3.Plainer@2c2f6468]
at com.sap.aii.mappingtool.tf3.rt.C2CFunctionWrapper.cacheContext(C2CFunctionWrapper.java:95)
at com.sap.aii.mappingtool.tf3.rt.C2CFunctionWrapper.gotoNextContext(C2CFunctionWrapper.java:45)
at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java(Compiled Code))
at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java(Compiled Code))
at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java(Compiled Code))
at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java(Compiled Code))
at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java(Compiled Code))
at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java(Compiled Code))
at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:287)
at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:63)
at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:232)
at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:432)
at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:170)
at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52)
at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:259)
at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java(Compiled Code))
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java(Inlined Compiled Code))
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java(Compiled Code))
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java(Compiled Code))
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java(Compiled Code))
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java(Compiled Code))
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java(Compiled Code))
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java(Compiled Code))Karen,
I don't think these dumps are going to ever give you your answers directly. It's a good start. All you know from here is that the sum function broke. Where? Which one? Who knows? What I would do is go into SXMB_MONI and copy the data that was sent and broke this mapping. Then I would copy into the Integration Repository Message Mapping. I would click on the test tab in my Message Mapping and put the data in that I copied from SXMB_MONI and execute. I should get the same error. Then I would by process of elimination change the data in each of the mappings that use the sum function until I found the problem. XI tries to give smart messages, but sometimes you have to dig for your answers.
Hope that gives you at least one method of debugging.
- Emmett -
Message mapping: Insert LineBreak into Element Value
Hi everybody,
we use a mapping for generating the content of an email body.
I have to insert lineBreaks.
How can I do this in message mapping?
Regards MarioMario,
Your question is already answered.
Did using \n helped you?
You seem to have marked the thread as answered and didnt award points.
So i feel anyone who has a similar issue and searches for this thread wont know which thing to do to solve the problem.
This is one of the reasons why points system are there.
Regards,
Sumit
ps: i know you are a big time contributor in sdn. I think doing a little bit extra will help everyone. -
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 -
Error while opening Message Mapping
Hi All,
I have one MM in ESR, IDoc to EDI, it has been developed before, and the interface is working successfully.But when I open this MM in ESR, it given a STOP error with desc as 'For input string: ""'.
and then there is nothing displayed on Screen under Definition,Test and Functions tab of MM.The Signature tab content is visible properly.
I am working on PI 7.1.
Is this issue is because of version comapatibilty or missing object. Please provide your inputs to resolve this issue,
Thanks,
RuchiHi All,
I have checked with my basis team, but they suggested that the patches can not be installed as this problem is happening with single message mapping.
When I open this MM, it gives the same STOP error :For input string: "". and when I click on Message Mapping -> Check button, it prompts a message 'Parameter #ParamName# has the invalid value null'.
Please help me to resolve this.As the mapping itself is not getting loaded, so not getting how to set this parameter value(if it is used in MM). -
PI 7.11: IDoc Message mapping
Hi there,
I'm currently working on a graphical message mapping using IDoc HRMD_A06 as source structure (HR master data transferred via PFAL).
In my result structure I have to fill a field CostCenter with the following logic:
If field KOSTL (cost center) is filled in node E1P0315, map this field to CostCenter in result structure, otherwise take KOSTL of node E1P0001.
The end date (ENDDA) has to be '99991231' in each case.
This is how the result structure looks like:
<e> [1...1]
<CostCenter> [1...1]
</e>
This is the simplified source structure:
<E1PLOGI SEGMENT="1">
<E1PITYP SEGMENT="1"> [0...n]
<E1P0001 SEGMENT="1"> [0...n]
<INFTY>0001</INFTY> [0...1]
<ENDDA>99991231</ENDDA> [0...1]
<KOSTL>0000012345</KOSTL> [0...1]
</E1P0001>
</E1PITYP>
<E1PITYP SEGMENT="1"> [0...n]
<E1P0315 SEGMENT="1"> [0...n]
<INFTY>0315</INFTY> [0...1]
<ENDDA>99991231</ENDDA> [0...1]
<KOSTL>0000024001</KOSTL> [0...1]
</E1P0315>
</E1PITYP>
</E1PLOGI>
How can I do the check if field KOSTL of node E1P0315 is null?
I've tried an existence check for the whole node (E1P0315->exists), but then it fails, because all E1PITYP nodes are processed.
I hope my problem is clear to you.
Would it be better to use another mapping type?
As I'm an ABAP developer, I would of course prefer some lines of code to this graphical drag&drop thing.
Thanks in advance!Cheers, guys!
I did it now like that:
http://www.abload.de/image.php?img=mappingflknz.jpg
Click on the image to enlarge it!
The logic is as following (ABAP Pseudo-code ):
IF 0315_KOSTL and 0315_ENDDA are populated.
IF 0315_ENDDA equals '99991231'.
map 0315_KOSTL to Cost_Center.
ENDIF.
ELSE.
IF 0001_KOSTL and 0001_ENDDA are populated.
IF 0001_ENDDA equals '99991231'.
map 0001_KOSTL to Cost_Center.
ENDIF.
ENDIF.
ENDIF.
Is that a good way to do that mapping?
Do I also have to use the removeContexts function or is it ok like that?
Could I also do that with an ABAP mapping program?
Thanks in advance!
Maybe you are looking for
-
Additionaly, why isn't it possible to – add an image/movie from within Mail while composing a message? – add multiple images oder movie files at once? – sort messages by other criteria from within Mail? – switch between html and plain text formatting
-
Problem with direct input program while uploading data into database
TABLES: BGR00, " Mappensatz BMM00, " MM01/MM02 BTCI-Kopfdaten BMMH1, " MM01/MM02 Hauptdaten BMMH2, " Länderdaten (Steuern)
-
How can i find out which of my contacts do not use whatsapp?
I am using iPhone 5S on iOs 7.0.2 I am conducting an event where I want to send invitations to almost all my contacts. Since there is daily limit on the number of Text Messages I can send out in a single day in my country, I want to segregate my cont
-
Note : This Problem has occurred with Genius Tablet ... not with the mouse .. Thanks In Advance ,,
-
The new iPhone 4S is touted as having an improved aperture of f2.4 That made me wonder what is the aperture on the current iPhone 4? Can't find the info elsewhere