on 04-26-2011 3:56 PM
Hi XI experts ,
I have source :
<ReferenceCoded>
<ReferenceTypeCoded>Other</ReferenceTypeCoded>
<ReferenceTypeCodedOther>Percent</ReferenceTypeCodedOther>
<PrimaryReference>
<Reference>
<RefNum>60,00</RefNum>
</Reference>
</PrimaryReference>
<SupportingReference>
<Reference>
<RefNum>0001</RefNum>
This <ReferenceCoded> is : 0 to unbounded .
The ReferenceCodedOther has value :Percent <ReferenceTypeCodedOther>Percent</ReferenceTypeCodedOther> has the Cost centre precentage data .
If this node has only once , then dont pass constant (2) to -> DISTR_PERC (field of BAPI)
If this node occurs more than once , then pass constant (2) to -> DISTR_PERC
Appreciate your input .
Thanks,
Vara
Checked few blogs , tried with counter ( Count of Percent cosntant occuring in : ReferenceCodedOther ) , it hasn't worked .
Hello,
You try using this mapping
RefTypeCodedOther -> equalsS -> ifWithoutElse -> removeContext -> count -> greater -> ifWithoutElse -> DISTR_PERC
Constant: Percent -> / / Constant: 2 -> / Constant: 2 -> /
RefTypeCodedOther -----------> /
The above logic passes the values which are equal to Percent and then counts its occurrence.
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think it can be easilt handled with standard functions only.
ReferenceTypeCodedOther-> RemoveContext>count (statistics function) >1 --> ifwoithoutelse (pass 2 as constant in then branch)->DISTR_PERC
Just check the contexts of the fields properly and play around with removeContext, Collapsecontext etc...
It should work...else let us know the error~~
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc , Puneeth and All ,
Yes this worked !! Thank you so much .
I used logic as below:
Since there are couple of node of : ReferenecTypeCodedOther repeating , I used :Removecontext
ReferenceTypeCodeOther| Remove Context | EQUALS |Constant :Pecent| IF WITHOUT ELSE (Then) |ReferenceTypeCodeOther|Remove Context| -
>The output of this is fed to |Count| Greater|Constant(1) |If then else| then Constant 2| -> remove context | DISTRIB
Else Cosntant(Null --pass nothing) -> DISTRIB
- Remove context supress the value .
Thank you once again to everyone who helped in providing the instant solution
Best Regards,
Vara
You can try index function (statistic) with increment 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try using an udf that always returns a suppress for when you don't want anything to be populated.
And the solution with count should still work.
[http://help.sap.com/javadocs/pi/SP3/xpi/index.html?com/sap/aii/mappingtool/tf7/rt/ResultList.html]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
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.