on 05-30-2006 4:13 PM
Hi,
I've 12 fields to check(message mapping using IDoc segments) if anyone of them have value 03 then I want to read the associated field value into target field.
e.g.
if dar01 eq 03
move dat01 to target_dat.
elseif dar02 eq 03
....
elseif dar03 eq 03
....
elseif dar12 eq 03
move dat12 to target_dat
else
do not populate the target segemnt.
endif.
I've tried this using graphical mapping but it looks like a real mess, any idea pls...
cheers
Taj
Hi Taj,
Make use of Gloobal COntainer Object to set the flag. and then based the flag, do the rest of the mapping.
For more on Global COntainer-
http://help.sap.com/saphelp_nw2004s/helpdata/en/e0/7d8e40496f6f1de10000000a1550b0/content.htm
/people/michal.krawczyk2/blog/2005/03/04/globalcontainer--in-graphical-mapping-xi
Regards,
Moorthy
Message was edited by: Krishna Moorthy P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
now we know what you need:)
>>>>if there is alternative to ifelse condition of graphical mapping and yes it
of course there is - you can connect all nodes to
a simple user function and put some java code inside:
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/if.html
and this will generate your result
(very easy and it will look ok for sure
you can also use <b>equals</b> method (to work with strings)
if you just need this no need to use globalcontainer then
this is simple if else if in a simple user defined function - nothing more
Regards,
michal
hi,
you can try this code in your simple function
with all 12 inputs (I assume that you name the inputs dar01, dar02 etc and not a,b,c..)
String finalResult;
if (dar01.equals("03")) {
finalResult = dar01;
} else if (dar02.equals("03")) {
finalResult = dar02;
} else {
finalResult = " ";
}
return finalResult;
for simple user defined fucntions check out this guide:
https://websmp102.sap-ag.de/~sapdownload/011000358700003604872004E/MappingXI30.pdf
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
Michal,
I've tried creating the simple user function but can you explain the argument count should this be equal to no. of fields I need to parse if yes then its max value is 10 and I need to check 12 fields and further 12(24 in total) are the associated fields which contain the actual value that I need to get to.
Taj
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.