cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI - Looping Process Issue

07-30-2021 9:23 AM
navepras Explorer
8279 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi All

I have a scenerio having multiple record for each record there is a field with count value i need to loop and create a position based on the count for each record. so i am using loop process call and end loop or throw exception based on condition when the condition reaches the count.

The condition is Count Value = Loop counter value.

But it is not getting into process loop from second time, only once it is getting called.

My property value is 3 and i have hard coded condition as 1, according to our condition it should throw error in the 4th loop but it is not working

Can any one help me to solve this probelm?

PFA - loop-process-call.jpg

over-all-integration.jpg

Regards

Naveen

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Hi Naveen,

My property value is 3 and i have hard coded condition as 1, according to our condition it should throw error in the 4th loop but it is not working<br>

This is not how the looping process call works. LIP works in the way do { some statements ...} while(condition) works. So when the initial call happens for LIP it enters the loop and then at end of the flow the condition is checked in your case "3 = 1" which is false and it does not enter into the second loop.

You can use a counter and then compare it with your property. Try to use header CamelLoopIndex which is created and incremented for every call(0,1,2,3,4...) by looping process call.

Thanks,

Manoj

navepras
Explorer
0 Likes

Thanks Manoj

Answers (1)

Answers (1)

babruvahana
Contributor
0 Likes

Hi Naveen,

Can you share the condition added in the looping process call and the value where you are setting the counter ?

BR,

Pavan

navepras
Explorer
0 Likes

Hi Pavan

Here is the attachment on I-Flow

1. Condition

2. Over all Flow

3. Condition for head value is constant '3'

Regards

Naveen