on 06-18-2010 10:26 AM
Hi all,
We are using PI7.0, we have a requirement where we need to count the number of fields occurring in the target and that count has to be given in one of the field. The target elements vary according to the input. To be clear, for example
If 5 fields are formed in the target, the 5th field should have the number 5 as the output.
Can this be achieved in message mapping ?
If so, kindly help me .
Regards,
Sherin Jose
You can use a UDF, have a global variable as a counter and use it in your UDF to count the occurances.. Ideally its possible to do it with graphical functions.
THanks
S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>> Can this be achieved in message mapping ?
Yes... Use index function as sugested by Stefan
Regards,
Abid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How will that work ? Help me how i can achieve by using that.
Index function is used to find the position in a string right. Correct me if i am wrong.
My requirement is,
I have 10 fields in source and 10 fields in target. Based on the input the number of fields formed at the target may vary. What i exactly need is that when 8 fields are formed in the target in that structure, a field in that structure should have the number of fields that were formed in the target.
Source Target values
FirstName Name Raghu
EmpNo ID 005
Salary pay 12000
Fields Field 4
As highlighted, the fourth field should say the number of occurrences of the target fields. I need to know how i can get the last field dynamically when the target is formed.
Regards,
Sherin Jose
http://wiki.sdn.sap.com/wiki/display/XI/CountofRecords-%27Countontheeasiestway+through%27
this wiki should show u some solutions
use index function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.