on 04-12-2006 9:13 PM
hi,
scenario -> IDOC -> XI - >XML
These are 3 line items whose total cost including the Tax should be mapped to a <Total> tag in the xml.
How do we do this?
From the same 3 line items we need to take the tax and show it in the Target <Tax> tag in the xml.
how do we do this?
Thanks,
tirumal
Hi,
You could make <tax> as a global container element.
now, add the three line items line1,line2,line3 to <total> tag. i assume here, that all these line items are in the same context.
Since the <tax> element is global, it can again be mapped to the target <tax> element.
Regards,
Smitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do this by using the standard SUM function.
I guess your total tag is for the total of all the element in that particalular message . So u can do a context change and make it for the whole document.
For the line Item tax total u just need to use the sum function and map them together.
Regards
Vijaya
Hi Tirumal,
You can use container variables/Global Container to find out the Total and use the same in the target structure.
http://help.sap.com/saphelp_nw04s/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm
/people/michal.krawczyk2/blog/2005/03/04/globalcontainer--in-graphical-mapping-xi
/people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
Even you can try with Java User Defined Functions.
Hope this helps,
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Write the advanced user defined function in message mapping and do the total, using this function map it to the target node.
Sample code..
int tempCount = 0;
int tempSum = 0;
int temp = 0;
tempCount = a.length;
for (int i = 0; i<tempCount.length; i++)
{
temp = Integer.parseInt(a<i>.trim());
tempSum = tempSum + temp ;
}
}
result.addValue(tempSum);
Thanks,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.