on 09-10-2009 9:47 PM
I have a need to prevent an IDoc segment being mapped if several fields are the same as a segment already mapped (prevents duplicate segments). I looked at the node manipulation functions of the graphical mapper (I am not very good with this tool) and think I could do it much more easily with xsl.
If it is possible to do this with the graphical mapping tool, could somebody please advise me? Remember, it has to be a combination of several elements that determine if a segmetn is to be mapped.
BR,
Tony.
Hi,
I was facing [same kind of issue |;before some days ago, so I created an udf for this.
Choose Cache as Context or Queue while creating the UDF, base on requirement.
String[] v_current = new String [var1.length];
v_current[0] = "";
for(int i = 0; i<var1.length ; i++)
{
if( var1.length == 1 )
{
result.addValue( var1<i> );
}
else if( var1<i>.compareTo(v_current[0]) != 0)
{
result.addValue( var1<i> );
v_current[0] = var1<i>;
}
}
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anthony,
I have a link that might be helpful to you.
https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79955426
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anthony,
You can very well do with standard functions else you can use udfs to do this. If you can give an example payload somebody can help you out here.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As an example, suppose that I am going to map from a structure like this:
<HEAD>
<ITEM>
<number>10</number>
<material>10014</material>
<plant>FP24</plant>
<due>20091010</due>
</ITEM>
<ITEM>
<number>10</number>
<material>10014</material>
<plant>FP24</plant>
<due>20091012</due>
</ITEM>
<HEAD>
I want to map to say IDoc element <E1EDP01> ONLY if <material> and <plant> keys are different, otherwise do not construct a target <E1EDP01> element and sub elements. So the elements above only create one element below, because <MATNR> and <PLANT> are the same in both cases:
<E1EDP01>
<POSNR>10</POSNR>
<MATNR>10014</MATNR>
<PLANT>FP24</PLANT>
</E1EDP01>
Can this be done?
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.