on 08-17-2009 5:36 AM
HI Friends
I need a UDF to iterate the loop with Number of Formids in the given file.
Actual process is i need to do some steps in BPM based on form ids coming from third party(webservices)
If formd count is 4 then need to iterate the loop 4 times every time next form need to send for BPM flow
1 st iteration --fromid1
2nd iteration--- Formid2.....and so on..
can anyone please help me on this into this
Regards,
Deep
u can use std function
formid-->removecontext---->target field.
or udf you can use as
for(int i =0; i<formid.length;i++)
{
result.addValue(formid<i>);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How does the form id comes from the third party?Do you have to read a text file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
select the UDF type as Queue.. following is the code to loop at element occurance
for(int i =0; i<formid.length;i++)
{
//ur code here
}
http://help.sap.com/saphelp_erp2004/helpdata/en/b1/83a09f668320419dbe00a741e0fe6a/content.htm
~SaNv...
Santhosh, thanks for your reply..
i guess, your logic will not return new form id on every iteration.
Loop count should be FormId number of times and in every time iteration formID has to be changed..
For Example..
<List>
<FormId>1234</FormId>
<Guid>asdfefas2312</Guid>
</List>
<List>
<FormId>4342</FormId>
<Guid>hgasdf3453</Guid>
</List>
<List>
<FormId>3543</FormId>
<Guid>fsdrawe4532</Guid>
</List>
on first iteration formid has to be sent as 1234
second iteration formid has to be sent as 4342
......
till number form of ids..
Regards,
Deeps
>>i guess, your logic will not return new form id on every iteration.
did u try....? I have given code to only loop @ formid.... refer the help page also....
>>Loop count should be FormId number of times and in every time iteration formID has to be changed..
for(int i =0; i<formid.length;i++) - this would loop as many time as formid is in the source file
result.addValue(formid<i>); - will add all the i'th occurance to target..
this is ur UDF..
for(int i =0; i<formid.length;i++)
{
result.addValue(formid<i>);
}
~SaNv...
Hi sandeep,
Can you please explain your requirement properly...If you want to get the same Formid like what you have explained below..
on first iteration formid has to be sent as 1234
second iteration formid has to be sent as 4342
For this no need of UDF. You can achieve this using Standard Functions suggested by Kubra.
Thanks
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.